Skip to main content
Gurpreet Cheema (Wipro) a posé une question dans #Data Management
Hi I am trying to create a validation rule to throw an error when a valid Pricebook is not selected so:

 

 

 

If Entity selected is A, Price book can only be PB1 or PB2

 

If Entity selected is B, Price book can only be PB2 or PB3

 

If Entity selected is C, Price book can only be PB2 or PB4

 

If Entity selected is D, Price book can only be PB5 or PB6

 

I have so far created this but this doesn't work as expected. Can you help please?

 

OR(AND( EntityName__c <> 'A', PriceBook__c <> 'PB1', PriceBook__c <> 'PB2')

 

,

 

AND( EntityName__c <> 'A', PriceBook__c <> 'PB3', PriceBook__c <> 'PB2')

 

,

 

AND(EntityName__c <> 'A', PriceBook__c <> 'PB4', PriceBook__c <> 'PB2')

 

,

 

AND(EntityName__c <> 'A', PriceBook__c <> 'PB5', PriceBook__c <> 'PB6'))

 

Can someone help me please?
9 réponses
  1. 20 nov. 2020, 16:48
    Hi,

     

    Ok, then change the "=1" to "=0" in my formula. When there is only one SBQQ__PriceBook__r.Name, change the "=" to "<>"
0/9000