I want to 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
Validation rule as :
(
(Opportunity.RecordTypeId = "012d0000000l8YP" ) &&
(Not(ispickval(Opportunity.StageName,"Pending Approval")) )&&
if(Product2.ProductCode == "XXXX22" || "XXXX23"|| "XXXX24") errormsg ,false)
but i do get an Error as : Incorrect parameter type for function 'or()'. Expected Boolean, received Text. How to give the product code which ends with 22 ,23,24.
Any suggestion plz.Thanks in advance.