You need to sign in to do that
Don't have an account?

how to override a standard save button functionality in salesforce
I have created the custom object.My requiremenet is i need to change the vendor name . So when I change the vendor name i need to get a popup box with check box yes or No to select.
In my custom object ,I have edit option to change the Vendor name but when I save I need to get the pop up box with check box.So i need to overide this save option but in the object under button& link secton I m not able to see save button .so how I can override the save button
for creating the popup box please suggest .Thanks in advance .
In my custom object ,I have edit option to change the Vendor name but when I save I need to get the pop up box with check box.So i need to overide this save option but in the object under button& link secton I m not able to see save button .so how I can override the save button
for creating the popup box please suggest .Thanks in advance .
You cannot override it from Buttons and Links option. Follow below approach for this:
1. Create a visualforce extension class. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm
2. Include the extension in your Visualforce Page
3. Define another a save method in the visualforce extension
4. Now the above code will be executed instead of standard save functionality, this way you can achieve this.
Please mark this as best answer if this answers your query.
Check my online presence here:
My Blog: http://sfdcfacts.com/
Youtube Channel: https://www.youtube.com/SFDCFacts
LinkedIn: https://www.linkedin.com/in/manish-choudhary/
Trailhead: https://trailhead.salesforce.com/en/me/manish-choudhari
Twitter: https://mobile.twitter.com/manish_sfdc
All Answers
You cannot override it from Buttons and Links option. Follow below approach for this:
1. Create a visualforce extension class. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm
2. Include the extension in your Visualforce Page
3. Define another a save method in the visualforce extension
4. Now the above code will be executed instead of standard save functionality, this way you can achieve this.
Please mark this as best answer if this answers your query.
Check my online presence here:
My Blog: http://sfdcfacts.com/
Youtube Channel: https://www.youtube.com/SFDCFacts
LinkedIn: https://www.linkedin.com/in/manish-choudhary/
Trailhead: https://trailhead.salesforce.com/en/me/manish-choudhari
Twitter: https://mobile.twitter.com/manish_sfdc
As I m new to salesforce .Can you please let me know that we can make popup box with check box and we can make the pop upbox to be visible to particular feild.It means I need this pop up box to come when I am editing and saving the Name of vendor
Check out this link which has popup modal example in Visualforce: http://www.salesforcegeneral.com/salesforce-modal-dialog-box/
In Lightning use overlay component: https://developer.salesforce.com/docs/component-library/bundle/lightning:overlayLibrary/documentation
Let me know if this helps.
**Please mark this as best answer if this answers your query.**
Thanks,
Manish Choudhari
14x Certified Salesforce Architect
Certification link: http://certification.salesforce.com/certification-detail-print?conId=003G000002gRrrEIAS
My Blog: http://sfdcfacts.com/
Youtube Channel: https://www.youtube.com/SFDCFacts
LinkedIn: https://www.linkedin.com/in/manish-choudhary/
Trailhead: https://trailhead.salesforce.com/en/me/manish-choudhari
Twitter: https://mobile.twitter.com/manish_sfdc
can we check if a field is changed before save to display in vf page.
I have a requirement to display a warning message on opportunity object's detail page if user enters agreement start date earlier than today ,I can't use validation rule as I have to save the records after showing that error message.Please help me how to achieve this