+ Start a Discussion
CyberfireCyberfire 

Time-based workflow not evaulating properly?

For some reason, when setting up a workflow that looks at a roll-up summary field on the account, it's just not working properly. Here is what I have in my formula for the workflow:

 

Evaluation Criteria: When a record is created, or when a record is edited and did not previously meet the rule criteria.

 

Formula:

CreatedBy.A_Agent__c=true && Number_of_closed_won_opportunities__c=null

 

This is what the debug log returns:

 

 

Evaluating Workflow Entry Criteria:
Formula: CreatedBy.A_Agent__c=true && Number_of_closed_won_opportunities__c = null
Value(s) Found: CreatedBy.A_Agent__c=1, Number_of_closed_won_opportunities__c=null
Criteria evaluates to false

 

 

I've tried multiple variations of this, and nothing seems to work! The debug log looks exactly like my formula criteria - why won't it validate and trigger?

 

CyberfireCyberfire

In case others encounter this same issue, I was able to work-around it with the following:

 

I created a formula field called "opps" on the account object, which did the following:

 

Number_of_closed_lost_opps__c + Number_of_closed_won_opportunities__c

 My workflow was then changed to this:

 

CreatedBy.A_Agent__c=true && opps__c = 0

 This caused the workflow to evaluate to true. This allows a time-based workflow to trigger on any account with an open opportunity upon creation. Once a user marks it as closed won or closed lost, the time based trigger no longer applies.