You need to sign in to do that
Don't have an account?
Christine F.ax367
Not able to reference the Lookup Field in S-Control where both Lookup fields are related to Account
I have the standard object "Opportunity" having two lookup fields to Account. One is the standard "Account Name" that looks up to Account Object. Then, I have another custom field "Consultant_Firm__c" that lookup to Account also.
I wrote a S-Control on Opportunity to override its "New" button and I can reference {!Account.Id} without any problem when I am on an Account that links to the Opportunity through the standard "Account Name' lookup.
However, when I am on an Account that links to Opportunity through the "Consultant_Firm__c" lookup field, neither {!Account.Id} nor {!Opportunity.Consultant_Firm__r.Id} would work.
I still don't understand what merge fields are, how they are defined and I think this probably has something to do with merge fields. Can this format {!.....} work on a custom lookup field?
Thank you!
Christine
To get the actual ID (instead of the text), I'd use a query instead of the merge field:
Select Consultant_Firm__c from Opportunity where id='{!Opportunity.Id}'
It'll add another query to the process but it'll get the job done :smileyhappy:
How about {!Opportunity.Consultant_FirmId__c} ?
That seems to be the standard way of referencing a lookup object's Id from what I've seen.