0

I am working on one business problem where i have Parent Opportunity & Child Opportunity (Self Lookup), I have Field A & Field B on both records.

I need to notify record owner via Mail immediately and before 90 days of xyz date (Time dependent), using workflow if there is any discrepancy between Parent Opportunity and Child Opportunity's Field A & Field B.

Field A (Picklist) Values

  • Quarterly
  • Halfyearly
  • Yearly

Field B (Picklist) Values

  • Cash
  • Card
  • NetBanking

I have tried to write the workflow as follow for child opportunity record:

Evaluation Criteria: Evaluate the rule when a record is created, and any time it's edited to subsequently meet criteria

Rule Criteria:

AND(
    NOT(ISBLANK(Parent_Opportunity)),
    OR(
        AND(
            NOT(ISPICKVAL(Parent_Opportunity.Field A,"")),
            TEXT(Parent_Opportunity.Field A) <> TEXT(Field A)
        ),
        AND(
            NOT(ISPICKVAL(Parent_Opportunity.Field B,"")),
            TEXT(Parent_Opportunity.Field B) <> TEXT(Field B)
        )
    )
)

Test Scenario:

  1. When value for both the fields for parent and child opportunity is similar

ex:

  • Parent_Opportunity.Field A =Quarterly
  • Parent_Opportunity.Field B = Cash
  • Field A=Quarterly
  • Field B=Cash

And when I am trying to update the child opportunity field as:

  • Field A = Halfyearly
  • Field B = Card

Then it's working fine.

But in second scenario

  1. When again I am updating the value for child Opportunity fields as ex-.

    • Field A = Yearly
    • Field B = NetBanking

It's not working.

Can anyone suggest why its not working? Is there any solution for this?

As per my research, to make it work, I will need to put back the values for child opportunity fields similar to Parent opportunity as:

  • Parent_Opportunity.Field A = Quarterly
  • Parent_Opportunity.Field B = Cash

And then if I will change it then it's working

1 Answer 1

0

As described, your Workflow Rule will only go off in a specific situation: when a child Opportunity is created such that its field values differ from its parent Opportunity or updated from matching to non-matching.

If your child Opportunity changes from one set of non-matching values to a different set of non-matching values, nothing will happen because your rule is set to execute "any time it's edited to subsequently meet criteria". That means it is not executed on updates that take a record from a state that matches the criteria (i.e., fields not matching the parent) to another state that also matches the criteria (i.e., fields not matching the parent, but having new values). I believe this is your Scenario 2, although I'm not entirely clear on the sequence of operations you're performing.

If your parent Opportunity is edited, nothing will happen, because the rule is designed only for child Opportunities.

Have you considered addressing this business problem by supplying formula fields on the child Opportunity that refer directly to the parent, and surfacing them based on Record Type?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .