You need to sign in to do that
Don't have an account?
Vijaya Amarnath
How to query Id of a Custom LookUp or Master-Detail Filed
HI,
I want to query Id of a Custom LookUp or Master-Detail Filed. Example: "Opportunity" is the Parent object for "Project" object, and Opportunity__c is the field API in Project object now I want to query the Id of "Opportunity__c" field in "Project" object. How can I achive this. Can any body help on this. Thanks in Advance...
I want to query Id of a Custom LookUp or Master-Detail Filed. Example: "Opportunity" is the Parent object for "Project" object, and Opportunity__c is the field API in Project object now I want to query the Id of "Opportunity__c" field in "Project" object. How can I achive this. Can any body help on this. Thanks in Advance...
[Select id,Opportunity__r.Id from Project__c]
Please mark it as best solution to your problem if it does solve your problem.
Thank you for ur Reply, but here I want that "Opportunity__c" Field Id not the record Id. Suppose in the Project fields if I click on "Opportunity__c" field "https://ap1.salesforce.com/00N9000000Anshl?setupid=CustomObjects" this will Come here I want to get "00N9000000Anshl" this Id in Apex.