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
susheel1susheel1 

Soql Query issue

I have written a query

 

select Approved_Credit_Amount__c, CA_PA_Verification_CA_Manager__c, CAE_Review_Date__c, CaseNumber, Quality_Leader__r, Containment__c from case Where RecordTypeId = '012800000007HCM' and AccountId= '0013000000EP2l5AAD'

 

Quality Leader is a look field to the user. 

when I run this Query  in Apex explorer Quality Leader__r gives me the name of the quality leader but it gives the name in the first column below Approved_Credit_Amount what I want is to get this information where it is i.e after case number

hisrinuhisrinu

Hi,

 

You can query the name as below.

 

select Approved_Credit_Amount__c, CA_PA_Verification_CA_Manager__c, CAE_Review_Date__c, CaseNumber, Quality_Leader__r.Name, Containment__c from case Where RecordTypeId = '012800000007HCM' and AccountId= '0013000000EP2l5AAD'

 

In the explorer it will show like that only. But if you write this query in your apex, you can use this as your wish.

 

Hope this helps .