Another Salesforce blog!!!

Salesforce, Apex

Validation Rules

Budget Known must be Checked.

Budget_known__c= false 

Can we win this opportunity must be “Yes”, if “No”, Can we win this opportunity Desc cannot be null.

AND(Can_we_win_this_opportunity__c = false,Can_we_win_this_opportunity_reason__c= "")

Contract Signed must be Checked. if StageName = ‘Negotiations’

IF( ISPICKVAL( StageName, 'Negotiations'),Contract_signed_both_parties__c= false, False)

Product and Pricing Multi-Select Picklist must have at least one value.

IsBlank(Product_of_interest__c) && IsPickVal(StageName,'Confirmed Opportunity')

Shortlisted must be Top 3, Top 5 or Top 10

AND(ISPICKVAL( StageName, 'Confirmed Opportunity'), 
NOT(OR(ISPICKVAL(Short_Listed__c, 'Top 3'))),NOT(OR(ISPICKVAL(Short_Listed__c, 'Top 5'))),NOT(OR(ISPICKVAL(Short_Listed__c, 'Top 10'))))

Shortlisted must be Top 3

AND(ISPICKVAL( StageName, 'Evaluation'), NOT(OR(ISPICKVAL(Short_Listed__c, 'Top 3'))))

Opportunity Review Document Completed must be Checked

IF( ISPICKVAL(StageName, 'Evaluation'),Opportunity_Review_Document_completed__c= false, False)


ISPICKVAL(Geography__c, "")

Customer size must be “XL (+$1,5bn)” or “L (+$750m)”

NOT(OR(ISPICKVAL(Customer_Size__c, 'XL (+$1,5bn)'), ISPICKVAL(Customer_Size__c, 'L (+$750m)'))) == true

Geography cannot be “RoW”.

AND (NOT( ISPICKVAL( Geography__c, "RoW") )) == false

Industry must be Automotive or IM&C

NOT(OR(ISPICKVAL(Industry, 'Automotive'), ISPICKVAL(Industry, 'IM&C'))) == true

Key Business Driver cannot be null.

IF( ISPICKVAL( Status, 'Confirmed Lead'),Key_Business_Driver__c == null, False)

Solution / Integration cannot be null.

IF( ISPICKVAL( Status, 'Confirmed Lead'),Solution_Integration_description__c == null, False)

Leave a Reply

Your email address will not be published. Required fields are marked *