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
Mohan sharmaMohan sharma 

How to retrive Parent when two lookup for same object exists.

I want to retrive parent object record when two lookup for same object exist. I have a page in which Two lookup foe Account object now i want to retrive account record using chield object id.
Suresh RaghuramSuresh Raghuram
Suppose u have two record types Main office account and Broker office Account u need 2 lookups. but when you are on main account u may not see the broker lookup. vise versa. Some times both are on the same page layout but one may be required and one may not. if both are required ur job is easy.

The required one will have a value always. so go with the required one else go with any one of them if they are not required or query for parent when ever one of them have a value.
I said all the possible options, chose the one which fits ur requirement.
If this answers your question make this as solution.