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
Ruben Smith 2Ruben Smith 2 

Custom button that adds related accounts to a custom object

Hi...
I have a custom object called Contracts - on the account object, I have a lookup to the Contracts object. 
I would like to have a custom button on my custom Contracts object that will allow me to relate many accounts to this contract. 

Thoughts?
Swayam@SalesforceGuySwayam@SalesforceGuy
Hi,

The same way you can create the button on the contract, Just replace the code inside the button as per Account.

You can share the code if you are facing any issue.



Hope this helps !!
--
Thanks,
Swayam
Ruben Smith 2Ruben Smith 2
Can you elaborate? This doesnt make any sense... 
Swayam@SalesforceGuySwayam@SalesforceGuy
Do you know what kind of custom button  Contracts - on the account object, If yes, Simply create a button Account on Contract Object Same as Contracts custom button, and then you have to update the code of that custom button from account to contract.

Now it make sense
Ruben Smith 2Ruben Smith 2
I dont have a custom button on Contracts - I have a lookup on the account object to the contract object. 
When I add the contreact name in the lookup firld, the accounts show up in the related list section of the contract object. 
I am looking for a shortcut to add more accounts to the contract, without having to indiviudlaly add a contract to the account. 

Make sense?