I faced a strange issue that the app can be executed successfully in Mule DEV/QA server but throws SALESFORCE:INVALID_INPUT in the PRD server
Mule Dev/QA servers are standalone of runtime 4.3.0, which connects Salesforce QA env. Mule PRD server is standalone of runtime 4.3.0 which connects Salesforce PRD env.
The app is promoted from Dev to PRD via branches in Git, so the SOQL executed are the same across servers.
SOQL below (removed many fields to make it shorter):
SELECT CAST__c, Competitor_Currency__c FROM specification__c WHERE (recordTypeName__c LIKE 'interior%' OR recordTypeName__c LIKE 'Exterior%') AND ((Status__c = 'Pricing Requested' AND statusChangeDateTime__c > 2021-09-17T01:35:00.011-04:00) OR (Status__c = 'Pricing Provided' AND approvalDateTime__c > 2021-09-17T01:35:00.011-04:00))
I am wondering something is different between Salesforce PRD and QA env, but the Salesforce team said they can execute the SOQL without issue directly in SF PRD.
There is a KB online below, but it is not the same as mine, which is for the MIME type of application/java, and the minutes in my example is not 00 https://mulesoftprm.force.com/s/article/Salesforce-SOQL-Query-throws-SALESFORCE-INVALID-INPUT-with-DateTime
Can anyone share any idea how this can happen? any way to find out the root cause? Thanks a lot!
The issue is actually caused by some fields in the SOQL query statement have different permission settings in Salesforce UAT and PRD env.
After SF team updated the permission settings on those fields in PRD, the issue is fixed. The error "SALESFORCE:INVALID_INPUT" is not quite accurate shown in Mulesoft log.