function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
LanceCresswellLanceCresswell 

Using Today in Workflow Rule Criteria

Hi,

How do I get a workflow rule to fire when I have criteria such as...

(Account: Activation DateEQUALSTODAY) AND (Account: Provider StatusEQUALSInactive)

and for it to evaluate when...

Evaluate the rule when a record is created, and any time it’s edited to subsequently meet criteria

It needs to perform a field update to make the Provider Status Active whenever Today matches the Activation Date.  The rule is active and I thought this would work but it doesn't seem to be.

I was hoping not to have to write code for it.

Any ideas on the matter would be appreciated.

Regards
Lance Cresswell
Pratik_MPratik_M
Hi Lance,

Will you please try using TODAY().

Thanks,
Pratik
LanceCresswellLanceCresswell
It doesn't allow me to save it - error...

Error: Invalid date (Valid date format 07/10/2014)

Regards
Lance
Pratik_MPratik_M
Hi Lance,

If the field is datetime then just use TODAY. It should work.

Thanks & regards,
Pratik
Pratik_MPratik_M
Here is the screenshot:

User-added image
LanceCresswellLanceCresswell
My field is a Date field and I do not want to change it to DateTime if possible.

What do you suggest?
Pratik_MPratik_M
Hi Lance,

Yes, you don't need to change. Just try using the "TODAY" and save the workflow. Activate the workflow and test it with sample data and let me know if any issues.

Thanks,
Pratik
LanceCresswellLanceCresswell
The workflow works correctly if I change the date or the status, but I want it to work overnight when Today equals the Activation Date. When I left my account record yesterday with a Status of Inactive and an Activation Date of 07/10/2014 I expected the status to be Active when I looked at it today, but it hadn't worked.

Regards
Lance

 User-added image
Pratik_MPratik_M
Hi Lance,

As the "Evaluation Criteria" say "Created, and any time it's edited to subsequently meet criteria" ; so the workflow will only get fired when your "Activation Date matches Today' and that day the record is edited/updated.
That is the reason it's not working in the current scenario. 

This will need to code which will check the date on the daily basis.

Thanks,
Pratik
 
LanceCresswellLanceCresswell
Ok.  I thought so.

Thanks for you help.

Regards
Lance