08-21-2024 09:08 AM
I am reading a csv file from S3, and I need to perform a validation to see if the record exists, and was created within 90 days, from the Opportunity object. If it meets the below criteria, then I need to reject it. I switched from using the Salesforce SOQL snap to a Salesforce Read. I don't know if the Where field can handle multiple conditions or just one. If so, how do I format it? Thank you.
AccountId = $AccountId
and
Product_Need__c = $Product_Need__c
and
CreatedDate = LAST_N_DAYS:90
08-27-2024 02:22 AM
You can go with Salesforce SOQL or Salesforce Read Snap, using both snaps you can apply multiple conditions in the WHERE clause.
"AccountId = '" + $AccountId + "'
AND Product_Need__c = '" + $Product_Need__c + "'
AND CreatedDate = LAST_N_DAYS:90"
In your case, I will go with following approach: