Skip to content

Instantly share code, notes, and snippets.

@kbs5280
Last active June 26, 2019 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbs5280/a9dd9fbaa62117bd7fb3e4023556de80 to your computer and use it in GitHub Desktop.
Save kbs5280/a9dd9fbaa62117bd7fb3e4023556de80 to your computer and use it in GitHub Desktop.
Model 2 QA
FROM Consult_Inventory__c // from the Consult Inventory table
WHERE Scheduled_Time__c >= TODAY // where the Scheduled Time is greater than or equal to today
AND isConsultScheudled__c = 1 // and a Lead or Account is scheduled (it's not an empty block)
AND (Scheduled_Lead__r.Lead_Segment__c = NULL // Lead Segment is null for both Lead and Account
AND Scheduled_Account__r.Lead_Segment__c = NULL)
AND Scheduled_by__r.Name != 'Pat Greenwood' // remove to include Website
AND Scheduled_Lead__r.CreatedBy.Name != 'Website Api' // remove to include Website
AND Scheduled_Account__r.CreatedBy.Name != 'Website Api' // remove to include Website
ORDER BY Scheduled_Time__c // include if you want results ordered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment