function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
FrustratedDevFrustratedDev 

Picklist Validation rule not equal to another field

Hi there,

I'm relatively new to Salesforce.com. I'm trying to create a validation rule whereby the opportunity owner cannot be the same as one of the values in a picklist field. I've tried it several different ways and I just can't get it right.

I tried making "OwnerID = ApproverID" where approverID is a lookup on the users but I need to have a limited amount of people who can approve the opportunity/quote.

I then tried making a validation rule using a picklist as follows

OR(
ISPICKVAL( Approver__c , "Stephen ***"),
ISPICKVAL( Approver__c , "Gerry ***"),
ISPICKVAL( Approver__c , "Donald ***"),
ISPICKVAL( Approver__c , "Gordon ***"),
ISPICKVAL( Approver__c, "Lee ***"),
ISPICKVAL( Approver__c , "Chris ***")) which works on its own but then if I try to compare it to OwnerID by entering "OwnerID=" at the start, it comes up with an error as follows:

Error: Incorrect parameter for function =(). Expected Boolean, received Text

Can anybody shed some light on what I can do to fix this?


CRMGeneralistCRMGeneralist
Are you using the Salesforce.com Approval Process? You can limit who approves Opportunities if you use the Salesforce.com Approval Wizard.