+ Start a Discussion
Oliver Freeman 9Oliver Freeman 9 

Formula Field Workflow Trigger

Hey Guys,

I've recently realised that workflow rules aren't triggered by formula fields, which makes perfect sense now that I've read into it.
I have a need to send an automatic email based on a formula field value as below:

When a 'Repair' record has spent 2 days in one location, I need to send an email to the case owner and case team, to implement this, so far, I've created two new fields on the repair object - 1) Last Moved Date, 2) Days Since Moved.
I've then created a process within process builder that says when the asset location 'ISCHANGED', to update the field value with 'TODAY()' - this works.
I had then created a formula field (days since moved - TODAY() - Asset_Last_Moved__c), and then a workflow rule that said when the value of that field equals 2,4,6,8,10,12 etc etc (I want it to send an email for every two days that the asset spends in one location), it needs to send an email - this works - when the record is edited manually.
Now I know that workflows aren't triggered by formula fields as the data within the formula field as it's displayed isn't actually stored anywhere, so it's not actually modified - this won't work for my use case.

I'm just wondering if anyone else has any recommendations as to how I could approach this? I've thought of making the field 'Days Since Moved' a standard number field, and then having a workflow rule to update that field value as it would then be stored in the database, but even then, the workflow needs to trigger every day, and to set time based actions for this would take a while and it's not really ideal.

Any help really appreciated :) and Happy New Year to you all!

Thanks,
Oli
Akhil AnilAkhil Anil
Hi Oliver,

I think what you are looking for is some sort of recurring time-based workflow which will keep on firing when a certain criteria is satisifed.

I have explained in detail on how to setup recurring workflows in the my blog post below.

https://force-base.com/2016/11/13/power-of-point-click-series-2-learn-how-to-set-up-recurring-time-based-workflows-in-salesforce/

Take a look and see if you can borrow something from there and build something similar.
 
Oliver Freeman 9Oliver Freeman 9

Hi,

Thanks for your reply :)
I was trying to avoid using time-based actions within workflows as I can only add up to 10 of these per workflow rule, and I need to track assets for up to 50 days, so I'd need to add 50 of the same time-based actions to get the field to update, which I can't do, I'd need to have 5 different workflow rules to achieve this.

Thanks,

Oli

Saravanan Sivalingam 1Saravanan Sivalingam 1
Hi Oliver Freeman,

Yes, you need to create a more workflow rules to achive your task..

Thanks,

Saravanan Sivalingam.