function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Linda 98Linda 98 

Urgent!!!! How to create a custom button for a related list..?????????

Hi 

 

 I have an  object named Details__c and it's look-up is there in Account  object. So obviously we will get a related list of  Details__c over the detail page of  Account..

I would like to create a button such that when user clicks on that that related list will be opened in a seprate window.(We will delete Details__c from related list so user can only access it through custom button)

 

How can i do this???

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Marko LamotMarko Lamot

create a cutombutton (URL) with open in new window option  and put there

https://salesforce_instance/a06?rlid=relatedlistID&id={!account.id}

 

salesforce_instance = your sf instance

relatedlistID = check for the id of the account relatedlist id of Details__c

 

All Answers

Marko LamotMarko Lamot

create a cutombutton (URL) with open in new window option  and put there

https://salesforce_instance/a06?rlid=relatedlistID&id={!account.id}

 

salesforce_instance = your sf instance

relatedlistID = check for the id of the account relatedlist id of Details__c

 

This was selected as the best answer
Marko LamotMarko Lamot

also a06   should be in your case your custom object ID (first three chars)

Linda 98Linda 98
I didnt get where i can get Relatedlist ID.Can you be little clear on that?
Marko LamotMarko Lamot

go to your child object.  there you have lookup field to account.   click it

url is something like  https://eu1.salesforce.com/00ND0000004CajX?setupid=CustomObjects

and here is your ID   -> 00ND0000004CajX

 

Linda 98Linda 98
Thanks a ton!!!

I tired it but it said unable to access page(My bad i was not copying Id correctly)

Appreciate your prompt reply..
Linda 98Linda 98
How can i open detail page.?when i click on the button its opening the list view.