Skip to main content The new Salesforce certifications experience is live! Visit Trailhead Academy to explore your new certifications homepage.

We have opportunities with products on them that have approval processes. Each product is approved by a user in Salesforce. Once all of them are approved, we mark the opportunity as "Closed-Won'. We are trying to create a validation rule that stops a user from marking it as "Closed-Won" until all of the products have been approved.

 

We created two roll-up summary fields that count the number of products, and then the number of approved products.

 

This is what we have so far: 

 

AND( ISCHANGED(StageName),

 

RecordTypeId = “0122K000001DcHKQA0”,

 

ISPICKVAL(StageName,“Closed-Won”),

 

Number_of_Approved_Products__c <> Number_of_Products__c)

 

Can someone help me figure this out?
13 answers
Loading
  1. May 18, 2021, 8:09 PM

    or try using

    AND(

    ISCHANGED(StageName),

    RecordType.Name = "Partner Opportunity",

    ISPICKVAL(StageName, "Closed - Won"),

    Number_of_Approved_Products__c <> Number_of_Products__c

    )

     

     
0/9000