You need to sign in to do that
Don't have an account?
sp13
automatically changing field value (workflow rule or trigger)
i have a custom picklist Status__c with values 'Open' & 'Closed' and a date field Close_Date__c.
what should i do if i want the Status__c to update its value to 'Closed' whenever the value of Close_Date__c is less than or equal to today's date[system.today()] without editing/updating the record?
if i use a trigger then the record's Status__c will only update whenever the record is created or edited. i tried using a workflow rule for this but it didn't work. the evaluation criteria of the workflow rule is 'created, and any time it’s edited to subsequently meet criteria'.
what should i do if i want the Status__c to update its value to 'Closed' whenever the value of Close_Date__c is less than or equal to today's date[system.today()] without editing/updating the record?
if i use a trigger then the record's Status__c will only update whenever the record is created or edited. i tried using a workflow rule for this but it didn't work. the evaluation criteria of the workflow rule is 'created, and any time it’s edited to subsequently meet criteria'.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_interface_system_schedulable.htm
When you are creating your wf rule, select : created, and any time its edited to subsequently meet criteria (this will make sure that the time trigger is reevaluation in case the close date is updateD)
Then select run this rule if the following : formula evaluates to true.
As a formula, just enter : true
Your workflow and rule apply to every instance of your object. You could also have it to run only for those where Close Date is not null and is in the future
In the next step, click add time trigger, you then add : 0 hours after "your object" "close date", and then you'll be able to add a field update action.