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
Kathleen Munetz-Vasquez 3Kathleen Munetz-Vasquez 3 

Cross object Formulas.

I need help! Please! So I have created a formula field that I want to reference fields from two objects. I am currently working on two custom objects; Contract Management and Grants. I would like to be able to write a formula that would give me the account name from either objects field so that it populates into another custom object called amendments. Hope this makes sense. I am a new Admin so I would appreciate your thoughts and assistance. Thanks!
Best Answer chosen by Kathleen Munetz-Vasquez 3
Waqar Hussain SFWaqar Hussain SF
To create this formula you must have relationship (lookup/Master-detail) field of Contract Management object and Grant object on Amendment object.

Then you can create a formula field on Amendment object, to check if it founds account name on contract management object then show contract management object name otherwise show the grant's account name.

See example 
IF(NOT(ISBLANK(ContractManagement__r.Account__c)),ContractManagement__r.Account__r.Name,
Grant__r.Account.Name)

 

All Answers

bretondevbretondev
You would need to be a bit more specific.
What is the exact relationship between your objects?
What are the exact names of the fields that are affected?
Waqar Hussain SFWaqar Hussain SF
To create this formula you must have relationship (lookup/Master-detail) field of Contract Management object and Grant object on Amendment object.

Then you can create a formula field on Amendment object, to check if it founds account name on contract management object then show contract management object name otherwise show the grant's account name.

See example 
IF(NOT(ISBLANK(ContractManagement__r.Account__c)),ContractManagement__r.Account__r.Name,
Grant__r.Account.Name)

 
This was selected as the best answer
Kathleen Munetz-Vasquez 3Kathleen Munetz-Vasquez 3
Thank you so much Waqar Hussain SF! It worked like a charm!