+ Start a Discussion

Adding custom javascript button to an standard objects page

Hi guys,


im new to SF development and need some help from you experts.


Here is the scenario: I want to add a custom button to a standard object’s page (like account) that invoke a javascript function when its pressed. What I have to do is to show a pop-up dialog when user clicks that button.

I don’t know how to add such a custom button to standard objects.


Probably one of the solutions below should work:


1) create a duplicate version of standard object’s pages and add the button to it’s source code. However, I don’t know if for e.g Account page’s apex source is available.


2) create another page and use a specific tag that includes some/all parts of the standard object page. (e.g. <apex:includeParent>) . I don’t know if there is such a tag.


3) add custom buttons with UI functionalities (javascript friendly) to standard objects. 


I tried to find another way around to overcome this issue but I couldn’t find any. Can you guys help me with your ideas or give me a link to an article that can help?



Any kind of help is appreciated

go to Accounts -> Buttons and Links -> create a New custom button with onclick Javascript behaviour. Include the button into pagelayout.