AnsweredAssumed Answered

How do I create a complex SOQL statement using cached data to obtain the Ids of values?

Question asked by ChrisWoolson1041 on Nov 26, 2013
Latest reply on Nov 26, 2013 by ChrisWoolson1041
I am trying to create a complex SalesForce SOQL statement:

FROM Case WHERE ( RecordTypeId in ?AND SystemModstamp >= ? AND ( ( Status in ? AND OwnerId in ? )OR( Status = ? AND OwnerId = ? ) ) )

The RecordTypeIds are specific to each environment (DEV/QA/PROD) therefore I need to cache this data and look it up by DeveloperName... however I receive multiple documents back and need to flatten it for the first parameter.  The same issue for Status and OwnerId.

Any suggestions or examples on how to accomplish this?

Outcomes