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
BrianRheaBrianRhea 

Custom Object Auto Populate from Lookup Field

Hi Developers,

 

I have created a custom object for Order Entry that our sales reps will use when an Opportunity is Won. What I would love is for the Ship-to and Bill-to information from the Contact record to automatically populate those fields in the Custom Object.

 

If you create New Order Entry from the Opportunity record, then the Opportunity field automatically populates, but that's all. And if you create New Order Entry from the Contact record, then the Contact field populates, but no the Opportunity. So, I feel like there must be some sort of communication ... I just don't know how to program it.

 

Any help is greatly appreciated!

 

Pradeep_NavatarPradeep_Navatar

You can create formula fields to achieve this problem. Create Billing City, Billing Country, Billing State / Province, Billing Street, Billing Zip/Postal code as formula fields in the order object and enter formulas as Opportunity__r.Account.BillingCity, Opportunity__r.Account.BillingCountry and so on. Use Insert field option to get these relations.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.