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
Golden10Golden10 

HELP - Automatically update records to ensure Workflow activates.

Hi guys and gals,
 
Need some assistance on updating records & workflow.
 
Situation - Built a lot of workflow and rules that will display a colour traffic light on an account based on the value of a date field (if the date is approaching), a number field and last activity date. This all works well when the record is edited on a daily or weekly basis, but the problem lies around 'What happens if the record isnt edited for 3 or 4 months, or at all?'.
 
The ideal situation would be for each account record to get updated automatically once a week to trigger all the workflow which will display the correct traffic light colour.
 
Thanking you all in advance
 
Golden 
ReidCarlbergReidCarlberg
Have you considered formula fields instead of workflow?  The results of the formula field will change whenever their component fields change.  You can, for example, use a Now()-createdDate() to get the number of days since the date; combine this with a conditional and the image of a traffic light and you should be good to go.  If you go to help and search "traffic light" you'll see a number of interesting formula fields that will point you in the right direction.

However, if you really want to cycle through records automatically and update them so they're touched, Google "Salesforce cron".  There's a way to create a pseudo cron function that will allow you to do pretty much what you described.  It will take up one of your custom objects and requires some Apex to first select and then update the records that haven't otherwise been touched -- it may well be overkill.

Hope that helps!

Reid



Message Edited by ReidCarlberg on 10-08-2008 03:45 AM

Message Edited by ReidCarlberg on 10-08-2008 03:46 AM
Golden10Golden10

good advice and thank you.

The first option of doing it via formula fields would be the easier and more efficient way of getting this done.

I can do formula fields, but only at a basic level. Any further advice would be fantastic

Thanks again
ReidCarlbergReidCarlberg
I'd start by messing around in that help topic I mentioned -- you'll see they give you concrete examples.  You'll have to adapt one of those, but it will probably be pretty straightforward once you've done a couple of their examples.  If you do those and then get stuck, pls post your code and I'll have a look.
Golden10Golden10

Fantastic, thanks for having a look. ill get to it today and let you know how i go.

 

Cheers