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
Jan JulianJan Julian 

Displaying messages after triggers run.

I was wondering if it's possible to display messages/notifications to let the user know that a trigger has run.

 

There's concerns over a trigger automating too much so it would be nice to somehow let the user know that a trigger has made changes.

 

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

The only way that a trigger can communicate information back to the page that started the transaction is if the trigger failed, in which case an error message will be displayed.  One way around this is for the trigger to write some information about the action that it has taken to the record, by appending to a large text area for example.  The onus would still be on the user to examine the record to see the changes though.

All Answers

Rahul SharmaRahul Sharma

Ji Jan Julian, 

I don't think we can notify/display message to a user that trigger is executed.

bob_buzzardbob_buzzard

The only way that a trigger can communicate information back to the page that started the transaction is if the trigger failed, in which case an error message will be displayed.  One way around this is for the trigger to write some information about the action that it has taken to the record, by appending to a large text area for example.  The onus would still be on the user to examine the record to see the changes though.

This was selected as the best answer