I need to write a validation rule on opportunity that pricebook 'A' & 'B' can be used only for Opportunity record type '1'. If any other record type is selected then other than these price books can be selected but not 'A' & 'B'. I have written a rule which works only for that case but if tested for some other it saves the record.
((RecordTypeId != '1') && ((Pricebook2Id = 'A') || (Pricebook2Id = 'B')))
Can someone please help?