Closed CapstoneLogistics closed 10 years ago
@AndrewHess,
Yes, you can write any where clause that's valid into the tool. For instance, the following criteria would be valid: StageName='Closed Won' AND RecordTypeId= 'XXXXXXXXXXXXXXXX' You would need to include StageName and RecordTypeId in the fields list.
I'm willing to bet that relational queries would work as well, but I can't say for certain. An example of that might be: StageName='Closed Won' AND RecordType.DeveloperName = 'myRecordTypeName' You would need to include StageName and RecordType.DeveloperName in the fields list.
A good way to play around with how to create multiple criteria is to use the Query tool in the Workbench (https://workbench.developerforce.com/query.php). You'll see a section called "Filter results by:" where you can create some conditions and see the WHERE clause that's generated from that.
Let me know if you need some more help.
-Wes
@wes1278 Thanks for picking this one up, spot on! :+1:
@AndrewHess Hope this helped, i'll close out the issue for now, please simply add a new comment on this issue if not and we can re-open and help you further. Good lick! :+1:
Hi,
The AND operator works great. But What about the OR? It doesn't works for me (error is 'unexpected token: or').
Thank you for your help.
See #138
Hi,
Thank you aheber but ...
I tried this criteria in Relationship Citeria field : SELECT Nom_session__c FROM Participation_animationc WHERE Presencec = 'Réalisé' or Presence__c = 'Prévu' I tested it with Worbench. It works.
I get this error : Error: Relationship Criteria 'SELECT Nom_session__c FROM Participation_animationc WHERE (Presencec = 'Réalisé' or Presence__c = 'Prévu')' is not valid, see SOQL documentation http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_conditionexpression.htm, error is 'unexpected token: 'SELECT''
I haven't any error when I only use (Presencec = 'Réalisé' or Presencec = 'Prévu') but only 'Prévu' is counted
Thank you for your help
It works !
I needed to remove the Trigger, write my criteria (Presencec = 'Prévu' or Presencec = 'Réalisé' or Presence__c = null) and deploy again the Trigger.
Thanks a lot. Have a good day :)
Is there a way to have multiple criteria for a rollup? I want to pull opportunities that are won and are of a certain Record Type.