You need to sign in to do that
Don't have an account?
Time based workflow rule - with formula
Hello,
I want create a workflow rule that will automaticall update Accounts without editing the record based on the datefield ont he account.
I came across this posting
Set timebased rule without editing existing records
http://success.salesforce.com/ideaView?id=08730000000Br89AAC
Is this possible to do now in latest version?
If I create a formula filed with like following that changes number every day will that work?
Formula field
Remaining Days = Contract_start__c - TODAY()
in my workflow rule I will check if Remaining_days__c = 0
Any suggestions? Thanks for you time.
Perhaps you misunderstood. What you're trying to accomplish cannot be done with time based workflow; you need to use scheduled Apex, as in the example given here.
All Answers
No, scheduling a time based workflow still requires that somebody actually edit the record to trigger it. You can, however, set up some scheduled Apex that runs at a given interval (every day, say), queries for Accounts that meet its criteria today, and take some action on them.
And no, that formula field won't work either. Formula fields don't actually change the record at all so they will not trigger workflow.
What is your condition on the workflow ? and also u can only do on picklist value .... not on formula field ..
I just now did a timebased workflow which will fire every hour based on last modified when the quality of the account is 5 star and then picklist value will go to the next star, so this will do only 1 time now . so we must have a condition which will be met all time ..... which i think we can do it in this case. hope this gives u some hint to work on ...
something like
,,,,,Rule Criteria
Hello NP
I have a contract start date that determines rates polulation. It is only on the first of the month. (monthly)
I have about 600 accounts that needs rate updates everymonth that I am trying to automate
Most of the time these account are not touched for the whole year.
based on your suggestion I should create timebase to check daily for the date if date matches (4/1/2011 = TODAY())
But there is only before or after option for time based. How did you specifiy every hour?
Thanks
Perhaps you misunderstood. What you're trying to accomplish cannot be done with time based workflow; you need to use scheduled Apex, as in the example given here.
Thanks for the information.
I have trigger on Account that populates rates base on a flag UpdateRates = True
trigger AccUpdateRates on Account (before insert, before update) { }
Trigger calls a class after checking mutiple conditions
AccountUpdateRates.UpdateProductRates(AccList, ProdIDs);
to use the scheduled Apex Job What should I do?
I have to change my class to handle @furture call
Create class that sets this flag UpdatesRates = True
Which will inturn fire my trigger?
or Move my complete code to class?
Once I covert the class to handle @ furtue can I use both from trigger and in Apex job?
Appreciate your comments....
Thanks
If you want people to do whatever it is by manually updating the account also, then leave it in the trigger, and just have your scheduled Apex touch the account in the same way; in doing so, the scheduled Apex will indeed fire the trigger.
One thing to add to that example I linked to is that inside your scheduled code you can call System.schedule again to schedule it for the next hour or day. That way you'll have a scheduled process that never ends.
Thanks for the tip. I am going to startworking on this solution.