0

I have tried all the ways to debug the code, also check the library version between my local machine and server, they are same. Following is the query success at local: sfdc query:

SELECT Id,OwnerId,Name,CurrencyIsoCode,CreatedDate,CreatedById,
    LastModifiedDate,LastModifiedById,SystemModstamp,LastViewedDate,
    LastReferencedDate,RelatedRecordId,ResourceType,IsActive,
    IsCapacityBased,IsOptimizationCapable,LastKnownLocationDate,
    LocationId,ServiceCrewId,FSL__Efficiency__c,FSL__GanttLabel__c,
    FSL__Online_Offset__c,FSL__Picture_Link__c,FSL__Priority__c,
    FSL__Travel_Speed__c,Last_Punch_Date_Time__c,Last_Punch_T__c,
    Last_Time_Sheet_Entry__c 
FROM ServiceResource

Same query which called by bulk API on airflow I got following error: InvalidBatch :

Failed to process query: INVALID_FIELD: LastKnownLocationDate,LocationId,ServiceCrewId,FSL__Efficiency__c
^ ERROR at Row:1:Column:256 No such column 'ServiceCrewId' on entity 'ServiceResource'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

I am not sure what can be the issue, the only difference is my local is mac and airflow been deployed on kubernetes linux.

Any suggestion will be appreciated

1 Answer 1

0

Two possible changes between your local and server process.

  1. Check if api versions are same. Some fields are valid only in certain versions.
  2. Check if user that issuing the soql in server has access to that field
2
  • Sorry, for get to mention, I am using the same api user in my local and airflow Also I have check the library version are same between my local and airflow server: server.simple-salesforce 1.11.2 and salesforce-bulk 2.2.0
    – Dennis Li
    Mar 4, 2022 at 16:10
  • This is really a comment, not an answer. With a bit more rep, you will be able to post comments.
    – identigral
    Mar 4, 2022 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.