Activity Forums Salesforce® Discussions How to display a message when the trigger finishes? Reply To: How to display a message when the trigger finishes?

  • Sudhir

    Member
    June 9, 2017 at 2:40 pm

    Firstly, please try to provide a use case of your scenario.

    Now coming to your question, if the motive is to display a message on record detail page or layout, there is a way.

    Create a Vf page with outputPanel having rendered attribute. ReRender this panel id when your controller gets the boolean flag passed from trigger or you can make a query if you are using a boolean field in trigger. Embed this VF age on the layout.

    Initialize a boolean variable(you can use boolean field also) as false in the trigger. When your trigger finishes, paas a boolean variable as true into the vf page controller. Refer that boolean variable into vf page rendered attribute.

    There could be other similar ways. You could give it a try.