cancel
Showing results for 
Search instead for 
Did you mean: 

Salesforce Read - Where Clause Syntax

samuelrz
New Contributor

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

1 REPLY 1

SpiroTaleski
Valued Contributor

@samuelrz 

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: 

  • Read CSV file
  • Read all Opportunities from Salesforce created within 90 days
  • Match records from CSV file and Salesforce using Join Snap