We have a series of fields on our account and opportunity fields that are lookups to the account entity. By default when you create these fields the system creates an automatic mapping from the field to the Accountid. This pulls the account name into this field on the opportunity when the record is created from the account. We would like to overwrite this value with the companion field that is on the account. IE if we have a associatedaccount field on the account that is a lookup to an account record and a associatedaccount field on the opportunity entity that is a lookup to an account record. We want the value that is in the account associatedaccount field to populate on the opportunity customer field. However what happens is the parent account name populates on the opportunity associatedaccount field rather than the account that is listed in the account associatedaccount field.
I am trying to find a way to write javascript on create of the opportunity form to pull the associatedaccount from the parent account via the relationship of customerid and populate on the opportunity form in the associatedaccount field. Any assistance would be greatly appreciated.
Jenn
*This post is locked for comments