function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
S Balaji 8S Balaji 8 

Is it possible to show a bell notification when the Milestone is within 12 hours of being reached.

Is it possible to show a bell notification in salesforce when the case Milestone is within 12 hours of being reached.
VinayVinay (Salesforce Developers) 
Hi Balaji,

Yes you can show bell notification when milestone is reached, below is the sample code on FeedItem.
List<FeedItem> FeedItemList = New List<FeedItem>();

    for (Case caseitem : CaseCreateAlert) {

        FeedItem post = new FeedItem();

        post.ParentId = caseitem.OwnerId;
        post.Body = caseitem.Message_To_Alert__c;
        post.Title = 'Case';
        post.LinkUrl = '/lightning/r/Case/' + caseitem.ID + '/view';

    }

    if (FeedItemList.size()>0) {         
            insert FeedItemList;                
    }
Reference:
https://salesforce.stackexchange.com/questions/256989/bell-notifications-via-apex
https://sudipta-deb.in/2020/10/send-custom-notifications-using-apex.html

Please mark as Best Answer if above information was helpful.

Thanks,