+ Start a Discussion
dharmendra kushwah 4dharmendra kushwah 4 

SOQL results correct values in query editor but getting blank values in API for same query

 

We are facing issue while fetching the Training Event fields by using following query:

Select Id,Name,Training_Offering_Id__r.Delivery_Type__c,PEPE_Training_Request__c.Training_Offering_Id__r.Theater_Region__c,PEPE_Training_Request__c.Training_Offering_Id__r.Learning_Partner__c,Local_Contact_Number__c,Training_Location_City__c,ZIP_Code__c,Geography__c,PEPE_Training_Request__c.Training_Offering_Id__r.Technology__c,PEPE_Training_Request__c.Training_Offering_Id__r.Delivery_Team__c,Learning_Partner_Name__c,PEPE_Training_Request__c.Training_Offering_Id__r.Audience__c,Fiscal_Quarter__c,Language__c,PEPE_Training_Request__c.Training_Offering_Id__r.Program__c,CSAT_Score__c,Training_Offering_Id__c,PEPE_Training_Request__c.Training_Offering_Id__r.Name,Actual_Costs__c,PEPE_Training_Request__c.Training_Offering_Id__r.Platform__c from PEPE_Training_Request__c where (Status__c='Event Approved') and (Platform__c='Partner Plus') and (CVENT_Flag__c='Yes') and (CVENT_Status__c='Not Started')

We are able to run this query on SFDC developer console. However if we pass the same query from API we are getting the blank values for fields where we are using syntax like ‘PEPE_Training_Request__c.Training_Offering_Id__r.Theater_Region__c’.

Can you please look into it?

Abu Hashim ShaikAbu Hashim Shaik
Mark TroupeMark Troupe
in PEPE_Training_Request__c.Training_Offering_Id__r.Program__c, is PEPE_Training_Request__c a lookup?

If so, syntax is typically to replace the __c with __r.