+ Start a Discussion
shobana shobana 1shobana shobana 1 

How to overide the save button using visualforce pages

The requirement is, When the user tries to update the address field in detail page using inline editing. When he click SAVE button in account,at that time it should save the Account and it should show an pop up window (In that i want to display related contact Name,Address field and checkbox as well as update button).

Am new to Apex coading, can anyone help me how to override the save button to show a pop up window if the address field is updated.
ManojSankaranManojSankaran
Hi Shobana,


Standard save button cant be overridden. If you have a visualforce page for detail section we can display a pop up, as per your requirement.
Let me know if you need more clarification on the implementation part.


Thanks
Manoj S
shobana shobana 1shobana shobana 1
Hi ManojSankaran
Thank you for your reply.  I want to show popup only when the account address field is update. can you give me sample code which helps my requirement..
 
Srinivas SSrinivas S
If you are saving by clicking on 'New' or 'Edit' buttons then by supplying saveURL as parameter, we can decide the navigation which can display a pop up.
Note: New or Edit can be overriden to supply saveURL.

------------
Thanks,
Srinivas
- Please mark as solution if your problem is resolved.
shobana shobana 1shobana shobana 1
Hi Srinivasa Reddy S

Thanks for your reply. For Inline editing i want to override the save button.

 
Cloud_forceCloud_force
If the VF page is inline page then you can simply overide the button with the class custom method and write your own logic to insert/update the record.

Here is a apex/VF basics series for beginners that you may find helpful : http://www.cloudforce4u.com/2014/07/visualforce-for-beginners.html (http://www.cloudforce4u.com/2014/07/visualforce-for-beginners.html" target="_blank)