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
Michael MMichael M 

Automate chatter notification to user

Hello, I have a trigger that updates a Lead field checkbox (to true.) When that checkbox is checked off, I need to send a chatter notification to the owner of that record. What is the best way to do that? Can it be done with workflow rules? I'm afraid if I use process builder, it will fire off several times, because my Lead process is set to fire whenever a record is updated, which I think can sometimes fire more than once even if a field is only update once (unless there's a way to prevent that?) Can it be done in the trgiger itself? What would you recomend?
Best Answer chosen by Michael M
VinayVinay (Salesforce Developers) 
Hi Michael,

You can use email alert and set notication whenever check box is false.

Below are few links which gives you more information.

https://help.salesforce.com/articleView?id=customize_wfalerts.htm&type=0
https://help.salesforce.com/articleView?id=customize_wfalerts_recipienttypes.htm&type=5
https://www.salesforcetutorial.com/salesforce-workflow-automation-workflow-management/

 Please mark as Best Answer if above information was helpful so that it can help others in the future.

Thanks,
Vinay Kumar

All Answers

VinayVinay (Salesforce Developers) 
Hi Michael,

You can try using workflow rule and send notification based on the criteria.

Also Workflow Rules are executed once trigger execution is being done in salesforce order of execution so you shouldn't see issues and this would be a simple configuration.

If you still want to handle in trigger you can do that but you might need to update custom logic accordingly.  So try to use workflow.

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
Michael MMichael M
Hi Vinay,

How can I send a chatter notification from a workflow? Which action would that be?
VinayVinay (Salesforce Developers) 
Hi Michael,

You can use email alert and set notication whenever check box is false.

Below are few links which gives you more information.

https://help.salesforce.com/articleView?id=customize_wfalerts.htm&type=0
https://help.salesforce.com/articleView?id=customize_wfalerts_recipienttypes.htm&type=5
https://www.salesforcetutorial.com/salesforce-workflow-automation-workflow-management/

 Please mark as Best Answer if above information was helpful so that it can help others in the future.

Thanks,
Vinay Kumar
This was selected as the best answer
Michael MMichael M
I understand I can send an email notification, but can I send a chatter post?  Thank you.