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
jjfdevjjfdev 

Triggering a workflow after 7 days

I am working on triggering a workflow to create a task after a lead has been around for 7 days. So far I have

 

 

OR(ispickval(Status,"Open"),ispickval(Status,"Contact Made"),ispickval(Status,"Contact Attempted")) && today() - datevalue(CreatedDate) = 7

 

 

 

But the workflow isnt triggering, is there anyway to make this happen without doing a time-dependent workflow?

 

I have figured out I cannot trigger a workflow off of a forumula field.

 

How can i get this accomplished?

 

Is it possible to do a formula using ischanged on a formula field and then check that same field if it equals 7 to trigger the workflow?

Message Edited by jjfdev on 03-01-2010 02:59 PM
Message Edited by jjfdev on 03-01-2010 03:19 PM
Message Edited by jjfdev on 03-01-2010 03:34 PM
WYamWYam

Hey JJ,

 

You can create a workflow that basically says what your first statement says:

 

 

OR(ispickval(Status,"Open"),ispickval(Status,"Contact Made"),ispickval(Status,"Contact Attempted"))

 

Once you have that saved, add a Time-Dependant Workflow that is set to trigger 7 days after create date.

 

On the next screen, create a new task that will create a task to fit your business logic. Don't forget to activate the workflow.

 

Let me know how that turns out for you. I hope it helps!

 

 

 

jjfdevjjfdev
Do you think there is a way to do this with out a time-dependent workflow?
jkucerajkucera
Not without a lot of code.  You could use the Apex Scheduler to run a batch job on a regular basis which would trigger an update on all leads, which then triggers workflow criteria evaluation, but time based workflow is a lot easier.