0

I am updating my opportunity(Child object) and Account(Parent Object) through API. I want to send updated fields to selected email addresses to email templates. I was trying the workflow criteria as:

Opportunity Name contains "Value" and evaluate criteria as

"created, and any time it’s edited to subsequently meet criteria"

I have defined the email addresses in the additional email section but the emails are not sending through to the email addresses.

Is their any mistake that I am doing in the process?

Thank you

  • when you update the value?is the new value is different from old value?I am asking this just to investigate if the criteria is fulfilled to fire the workflow; refer to stratushub.com/blog-content/salesforce/… – unidha May 4 '15 at 4:37
0

There is a common misconception with workflow trigger criteria of created, and any time it’s edited to subsequently meet criteria

The key here is edited to subsequently meet criteria which really means that before the update, the record didn't meet the criteria.

For example, if a workflow rule should fire when amount > 10, and the Opportunity is created with amount = 5, then updated to amount = 15 and then updated again to amount = 20, the workflow fires only once (when amount = 15). It won;t fire again until the amount is changed to something <=10, then changed again to something > 10.

If you are using a filter of Opportunity Name contains "Value", then before the API update, the Opportunity Name must not contain the string "Value"

A couple of other things to check:

  1. Your API update of the Opportunity actually succeeds without any exception
  2. You are not simulating the API via a testmethod - email messages will never be sent in testmethods.
  3. Look in the debug log in the workflow trace - you can see what values are passed to the workflow rule from the SObject Opportunity. Perhaps you have additional conditions in the workflow rule that prevent rule execution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.