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

need to display message on standard detail page

please help me out this

I need to display message on standard detail page when ever child records are inserting.

this is possible by InLineVisualForcePage

but how to give condition child records are inserted then only display message
Vivian Charlie 1208Vivian Charlie 1208

Hi Hemant,

From where are you creating child records?

Assuming you want to display a message on Account detail page when someone is using Contact Tab / Dataloader / Workbench / Webservice etc to insert child records this cannot be done. There is no VF where pagemessages can be added. Triggers are capable of adding object errors and not messages.




Hi Vivian,

lets say you have custom button on account detail page
if you click on the button one vf page will open and it display list of contacts along with one botton
If you select the checkboxs of multiple contacts  and click on the button that contacts will add into account related List and redirect to account detail page

in account detail page i need display message

Vivian Charlie 1208Vivian Charlie 1208

Hi Hemant,

You can create a detail page button. Let this button open a visualforce directly (if page uses Accont standardcontroller) or use onclick javascript to open up a VF page (If page uses a custom controller).

You can create a wrapper class to maintain the selection of the contacts. Please refer to he following help page where you can find an example for how wrapper classes can be used. Your save mnethod can then insert selected Contact records in the Account's related list and redirect to the Account based on the Id parameter passed in the url




HI Vivian,

i'm follwing the same way. after i check the checkbox and click on ADD button the page will redirect to account page. here the case is display message after redirect to account