0

I'm having some issues with a Process builder. I want it to fire when the Last Modified Date is some time ago (a couple of minutes in my example below, just for testing) and that the Case Owner is also the last user who modified the Case (ownerId = Last modified by Id).

I've created my criteria node with this formula:

AND(
[Case].LastModifiedById = [Case].OwnerId ,
((NOW() - [Case].LastModifiedDate )*24 ) > 0.05
)

And well, it just doesn't fire.

For testing, I've created a formula checkbox field with the same criteria, and after 3min, it does work and the checkbox gets checked. Here's the formula for the checkbox field:

IF(AND( 
LastModifiedById = OwnerId , 
((NOW() - LastModifiedDate )*24 ) > 0.05 
),true,false)

Any idea of why the Process Builder is not firing?

Thanks, /Y

2

Process builders, Workflows and Triggers are fired only when there is a change made to the record i.e. only when a DML operation is performed on the record.

Your checkbox formula does not have any issues and it correctly checks the checkbox after 3 minutes (when you refresh the page), in the same way your criteria node formula also doesn't have any logical issues, only problem is that your criteria will never meet when process builder is invoked. And that is because, as mentioned, process builder is invoked when record is created/edited, and when it is created/edited, ((NOW() - [Case].LastModifiedDate )*24 ) > 0.05 will never be evaluated to true as the difference would be in milliseconds. And it wouldn't be called again unless an edit is made to the record. So, whenever an edit is made, it will check the criteria which will always return false.

For your requirement, you will have to go with Scheduled Actions in process builder, wherein you can specify the criteria as [Case].LastModifiedById = [Case].OwnerId and then run your action after X hours/days from Now.

You can get more information on how to set the scheduled actions in process builder at this trailhead link.

Note that currently process builder only allows to set scheduled actions in Hours and Days.

  • Hi Vijay, Thanks for the quick reply! Right, of course, I totally missed this, thanks for the refresher 😅 The problem I have with time dependent actions is that they're not available unless I choose to execute the actions only when specified changes are made to the record. Which means that they would not trigger if the Case owner modifies the Case later on (if he/she's already the owner and also was the one to last modify it during a previous edit). Do you see any way to go around this? /Y – Yaya May 20 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.