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
BRomanowskiBRomanowski 

Validation based on stage and custom amount field

I'm trying to write a validation rule that requires a bunch of fields to be populated for all opportunties above a custom amount field and at certain stages but it is not working. I don't know if the problem is with the amount field or the field conditions. So all opportunities above 70K and proposal stage or beyond need to have a few date and picklist fields filled in. The picklists have no default so they initialy have the -none- value which I assume comes up as null. Any ideas?

 

 

AND(Gross_Amount__c>=70000,
OR(RecordTypeId="Add-on Business",RecordTypeId="New Business"),
OR(ISPICKVAL( StageName , "Proposal"),ISPICKVAL( StageName , "Short List"),ISPICKVAL( StageName , "Award"),ISPICKVAL( StageName , "Closed Won")),
OR(ISNULL(text(Initial_Budget_Approved__c)),ISNULL(Targeted_Deploy_Date__c),ISNULL(text(Compelling_Event__c)),ISNULL(Initial_Discovery__c),ISNULL(text(Met_the_Executive_Sponsor__c)),ISNULL(Demo_Date__c),ISNULL(text(IT_Approved__c)),
ISNULL(text(VFA_has_a_champion__c)),ISNULL(Proposal_Sent_Date__c)))

 

RhayesRhayes

I think the issue is with your second line where you specify record types:

 

OR(RecordTypeId="Add-on Business",RecordTypeId="New Business")

 

When you use RecordTypeID you need to use the Salesforce ID # of that record type, which will look something like "01230000000nhXz"

 

Each record type has it's own unique ID.

 

You can find it by going the Record Type in setup and looking in the URL for that 15-digit string, for example:

https://na7.salesforce.com/setup/ui/recordtypefields.jsp?id=01230000000nhY4&type=Case&setupid=CaseRecords

You would want to copy the 01230000000nhXz out of the middle, and insert that into your formula.