+ Start a Discussion
Mudasir WaniMudasir Wani 

Perform an alert on detail page save button action using inline VF page

Hello Guys,
  
Have a look on my requirement.
First thing is that I am not allowed to use a validation rule.
and I have to perform the action on detail page save button action and not from the Inline VF page button.

1. I have to perform some action on salesforce detail page save button.
2. I have an inline VF page where I want to use JQuery to dynamically capture salesforce detail page save button action and before saving i need to handle some logic.
3. My actual requirement is that I need to give an alert to the user informing him about filling a value in one of the fields if he wants otherwise we need to save the record.

Any idea is appreciated. 
Hargobind_SinghHargobind_Singh
Hi Mudasir, 

I dont think you can include VF page on edit-view on the record. You can only include them in detail page, and by the time you reach detail page, the record is already saved, so no point giving an exception. 

I would strongly suggest uisng a validation rule as it would allow you to port your logic to Salesforce1 mobile app as well, and also be applicable to API inserts / updates. 

 
Mudasir WaniMudasir Wani
Thanks Hargobing for your reply.

Our requirement was a bit weired we need it with some records and not with others.
Then we used a button and done it a custom way.
Thanks for your time 

Best Regards,
Mudasir.