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
bhanu reddy 24bhanu reddy 24 

how to got records child to parent object(Opportunity and account) by using soql query

Dev AggarwalDev Aggarwal
Hi, 

We use . (dot) operator to query for parent in SOQL. 

Query to get Account Name from opportunity is mentioned below.
Opp = [select id, account.name from opportunity where id=:opp.Id]

Incase of custom objects, You may use something like this.
Select Id, Custom_Obj1__r.Name from Custom_Objt2__c

 
bhanu reddy 24bhanu reddy 24
thank you so much responding me
 
bhanu reddy 24bhanu reddy 24

how to put new command link in left side search all link below
bhanu reddy 24bhanu reddy 24
User-added image