I want to have custom button on account detail page on address section and call an apex on OnClick and perform an action on address section only. I do not want the button to be top of the page but in the address section. How can I achieve that in Salesforce Classic ?

enter image description here

  • Don't think you can create a custom button for a section on a page layout. The closest thing that I can think of is to create a custom formula field that will display as a button. There is a youtube video that shows how you can build one: youtube.com/watch?v=fmaSkkHCbf0 – Jason Fung Sep 25 at 19:27

You can't embed buttons at the section level in a Classic page layout.

You could build a Visualforce page and embed it in the layout, allowing you to present whatever UI elements and Apex backing logic you require. However, the user experience of embedded Visualforce pages is often not particularly satisfactory, and you still won't be able to position it within the section header.

You could also hyperlink to a Visualforce page to allow the user to navigate in a separate window to accomplish a task, and position this hyperlink in the section details, but it's not quite the same thing.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.