You need to sign in to do that
Don't have an account?
Tsvety
Help with a workflow using ISCHANGED
I have a custom object Offers that pulls data from the Opportunity. I have a field, Expenses covered, on Opportunity and I want to have a field on the Offer that will be updated every time the Expenses covered on the Opportunity is changed.
The problem is that the workflow doesn't trigger even though the value of the formula field is changed.
What I did so far:
Created a text field (Expenses covered new) and a formula field (Expenses covered f) on Offer.
Created a Workflow rule on Offer.
Entry Criteria (ISCHANGED( Expenses_Covered_f__c ))
Field Update for Expenses covered new = Expenses_Covered_f__c
Evaluation Criteria; Evaluate the rule when a record is created, and every time it’s edited
Where is the problem?
The problem is that the workflow doesn't trigger even though the value of the formula field is changed.
What I did so far:
Created a text field (Expenses covered new) and a formula field (Expenses covered f) on Offer.
Created a Workflow rule on Offer.
Entry Criteria (ISCHANGED( Expenses_Covered_f__c ))
Field Update for Expenses covered new = Expenses_Covered_f__c
Evaluation Criteria; Evaluate the rule when a record is created, and every time it’s edited
Where is the problem?
- If you are comfortable in apex, you may write a trigger on Opportunity update on after update event and update all related Offer records if value for expenses is changer.
- Use visual workflow. This one is my favorite. You do not need any custom code. Go to 'Process Builder' from setup and create one visual workflow on opportunity with criteria is changed on expense field. Add one update action on related Offers to update the expense field.
Let me know if you need any help on implementing either one of these.--Akram
I am trying with the Process Builder, but the field still doesn't get updated.
Here is my entry criteria:
Here is the Field update (I will later update it to the actual formula)
I have just run a sandbox test and managed to get child objects updated when a change was made to the parent record.
Can I suggest that you strip your process back to the bare bones and verify whether the problem is in the criteria or the action.
My criteria:
My Action:
cheers,
Keith
Tsvety,
I didn't know this fact. So you have to go with the trigger. Here is one sample trigger I wrote for you. This is not tested, but hopefully it will work. Let me know if this works, --Akram
Statting that the "ISCHANGED function does not work in visual workflow" is a pretty bold statement!
You can see from the images that I posted above use the Is changed.
I have a number of processes making use of the function.
Keith
Thanks for the pointer. I am not saying that "ISCHANGED" does not work with visual workflow. I am saying that it didn't work for me. Maybe I am doing something wrong. But I have checked the documents,
http://help.salesforce.com/help/pdfs/en/salesforce_vpm_implementation_guide.pdf (Page no 13)
And this,
https://help.salesforce.com/HTViewHelpDoc?id=vpm_designer_about_formulas.htm&language=en_US
It says,
These functions aren’t supported in a flow formula.
- GETRECORDIDS
- IMAGE
- INCLUDE
- ISCHANGED
- ISNEW
- PARENTGROUPVAL
- PREVGROUPVAL
- PRIORVALUE
- REQUIRE SCRIPT
- VLOOKUP
--AkramYes, but the drop down selection of "Is changed" is not a formula, it's a "Conditions are met" criteria... you can't use ISCHANGED in a formula when using the "Formula evaluates to true" criteria:
Having said that, you will be in the Summer 15 release:
cheers,
Keith
Thanks a lot for the update.
--Akram