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
Vegaln1Vegaln1 

Is there a way to display a informational message in just APEX?

I would like to just display a informational message to users at the end of a piece of APEX code to refresh the page. This does not involve a VF page, just a APEX class that creates some child records. Or to avoid this message altogether,  is there a way to refresh the page just from a APEX class and not using a VF page?

 

Regards,

Anand@SAASAnand@SAAS

The key question is how is your apex code invoked?  Is that through a integration or batch apex? 

 

You cannot refresh the page from just apex. However you could use the "Rich Text Area(beta)" and put in some HTML code to inform the user that they should click on Cutom Button XXX to refresh. 

 

If you are looking for "push" notifications, that would be difficult to implement. 

Vegaln1Vegaln1

The APEX code is invoked via a trigger when a button on the object is pressed. Several child records are created in the related list of the parent object and since the APEX is invoked as a @future the user must refresh the page to see the ne records in the related list.

 

Regards,