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
Danny_SpyDanny_Spy 

Validation Rule - Confusion Enabling 2 fields as mandatory

Hello Everyone,

 

I need to if Stagename moves to  "Closed Won", then 2 Custom fields should change as required fields  and if someone populates value in those 2 custom fields then record should get saved.

 

I tried -


    AND
        (
          ISPICKVAL ( StageName , "Closed Won" ),
          ISNULL(New_Number__c),

          ISNULL(Normal_Number__c)

)

 

Also, I tried

 

IF(
    AND
        (
          ISPICKVAL ( StageName , "Closed Won" ),

 

 NOT(ISNULL( New_Number__c),

 NOT( ISNULL(Normal_Number__c))))

,True, False)

 

Please help me in this regards. I appreciate your help...

 

Many Thanks,

Danny

Best Answer chosen by Admin (Salesforce Developers) 
Pradeep_NavatarPradeep_Navatar

Try out the following validation rule :

 

ISPICKVAL(StageName,"Closed Won") && (OR(ISBLANK(New_Number__c),ISBLANK(New_Number__c)))

 

Hope this helps.

All Answers

Pradeep_NavatarPradeep_Navatar

Try out the following validation rule :

 

ISPICKVAL(StageName,"Closed Won") && (OR(ISBLANK(New_Number__c),ISBLANK(New_Number__c)))

 

Hope this helps.

This was selected as the best answer
Danny_SpyDanny_Spy

Thanks a ton yaa.. :)

 

It works like a Rocket.

 

Thanks,

Danny