Skip to main content
meghna m ha preguntado en #Data Management
Hi folks ,

 

As per my requirement :

 

Create a validation rule at Opportunity product to validate the following. Opp record Type – sample

 

And Stage not equal to ‘Pending Approval’

 

Product or product code(item number) ends with -22 or -23 or -24

 

Then you it should give the following error message.

 

When requesting samples for 130 Lumen parts, stage should be pending approval.

 

I tried in this way :But it does not works as per the requirement.I Shall appreciate your help.

 

(Opportunity.RecordTypeId = "012d0000000l8YP" ) && (Not(ispickval(Opportunity.StageName,"Pending Approval")))&& (Not(CONTAINS( RIGHT(Product2.ProductCode, 2) , "22")|| (CONTAINS( RIGHT(Product2.ProductCode, 2), "23")|| (CONTAINS( RIGHT(Product2.ProductCode, 2), "24") ))

 

Thanks in Advance.
12 respuestas
  1. 2 dic 2014, 18:33

    Please give it shot and this line:

    TEXT(StageName) <> "Pending Approval"

     

    is very much the same as writing:

    ISPICKVAL(StageName, "Pending Approval")

     

    And yes, I have forgot to specify - "Opportunity.

    ". So it should be:

    AND(

    Opportunity.RecordTypeId = "012d0000000l8YP",

    OR(

    CONTAINS(RIGHT(Product2.ProductCode, 2), "22"),

    CONTAINS(RIGHT(Product2.ProductCode, 2), "23"),

    CONTAINS(RIGHT(Product2.ProductCode, 2), "24")

    ),

    TEXT(Opportunity.StageName) <> "Pending Approval"

    )

0/9000