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
apelizzo1.3941015382362622E12apelizzo1.3941015382362622E12 

Custom Button to populate new Contract Record Owner with the Account Owner value.

I would like a custom button on Contract related list in Account that creates new Contract, passing the Account Owner to the Contract Owner.
Ramu_SFDCRamu_SFDC
Hi, The post at the link below explains about setting the parent object values on child object which are in lookup relationship just as Accounts and Contracts.

http://salesforce-consultant.blogspot.in/2013/06/trigger-method-to-update-child-records.html

To run the apex on button click you need to use controllers as explained in the link below

http://andyinthecloud.com/2013/07/16/how-to-call-apex-code-from-a-custom-button/