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
Rakesh Anapurapu 6Rakesh Anapurapu 6 

Approval process : Not receiving bell notifications when approved approves Or rejected the record for approval process

I have approval process when i submit it to approval.. Approver is receiving the bell notification but after approving/rejecting the record intial submitter is not receiving any bell notifications.. Privously it used to work for me 
mukesh guptamukesh gupta
Hi Rakesh, 

Starting Winter 21 release you will be able to send notifications directly using apex.

See https://releasenotes.docs.salesforce.com/en-us/winter21/release-notes/rn_apex_send_custom_notifications_from_apex.htm?edition=&impact=

These custom notification are shown on the bell icon in the salesforce org.The blog https://www.forcetrails.com/2020/08/send-custom-notification-using-apex.html provided a good explanation on this functionality.
 
Id typeId = [SELECT Id FROM CUstomNotificationType WHERE Name = 'notification type name'].Id;
Messaging.CustomNotification notification = new Messaging.CustomNotification();
notification.setBody('This is body of the custom notification!');
notification.setTitle('Hi this is first notification sent using apex!');
notification.setSenderId(Userinfo.getUserId());
notification.setNotificationTypeId(typeId );
notification.setTargetId('006B0000005hCxzIAE'); // target object id
notification.send(new Set<String> { Userinfo.getUserId() }); // target user id.

Related: https://salesforce.stackexchange.com/questions/256989/bell-notifications-via-apex
Process builder approach: https://andyinthecloud.com/2019/06/30/getting-your-users-attention-with-custom-notifications/

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh 
SwethaSwetha (Salesforce Developers) 
HI Rakesh,
The functionality to include Approval Submitted By or Approval Submitter as Notification Recipient is currently not possible in salesforce by default.
Currently, the only recipient options are the Record Owner, Created By, Last Modified By, and the standard specific User, Public Group, or Role and Subordinates.

There is this Idea on IdeasExchange too https://trailblazer.salesforce.com/ideaView?id=08730000000Bpa5AAC

You might want to check if it was accomplished previously using custom code.

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Rakesh Anapurapu 6Rakesh Anapurapu 6
Hi swetha / mukesh, 

Thanks for response. 

But i used to get notification whenever the approver approves/reject/reassign the approval process record . 

PFA screenshot of notification i recently got. 
suddenly the notifications not coming to me but approver is geetfimg the notification whever i submit the record for approval. 
User-added image
SwethaSwetha (Salesforce Developers) 
Can you check if there is any custom code/workflow for this functionality. Using IDE like VSCode should be easier to search for any custom code written in your Org. 
Rakesh Anapurapu 6Rakesh Anapurapu 6
There is only approval process and process builder for automation
Jesus Castro 12Jesus Castro 12
Rakesh Anapurapu 6
Did you find the solution for the problem you described? I have the same problem
Irshaad Jaunbocus 9Irshaad Jaunbocus 9

Hello Rakesh,

Did you manage to find a work around for this ? I am currently facing the same issue, approver is being notified instead of the submitter.

Anyone can help if they manage a fix for this ?

Regards,
Irshaad

Lamu SreeharshaLamu Sreeharsha
Hi Rakesh,

Reason: It looks like the approval process does not update the field even the value got changed. when approver rejected or approved the request and This field might be the trigger for process builder or flow which you are using and it doesnt't trigger your automation, so bell notification does not work.

solution:
1) create a custom field (Type->checkbox and set the default value to true) on the object which the approval process is written.
2) create a new process builder to update that field (created in step 1) value to false.
3) use this created field (as ischanged condition) along with your main field in your process builder or flow which is used for bell notification when it is approved or rejected.

I hope it answers your question.
Thank you
Tim CaljeTim Calje
Facing the same issue.
There are no custom automations built for the notifications; we just expect the one who submits the record for approval to get a notification after the aproval process has been accepted/rejected.
It makes no sense that the Approver gets the notification that (s)he approved the request
Paul Holden 6Paul Holden 6

I'm researching the same issue. The approval or rejection result notifications (bell icon) are going to the approver and the submitter is not notified. The submitter is not therefore made aware that their activity has been approved, or rejected and the reason for its rejection.

I'm looking at the ProcessInstanceStep object and the user id in the ACTORID field to see if there is a way of re-assigning the notification.

The IdeaExchange 'Include Approval Submitted By or Approval Submitter as Notification Recipient' suggestion appears to be completely overlooked by Salesforce.