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
Sudhir_MeruSudhir_Meru 

Make Field Mandatory to Only Specified Users in Oppertunity

Hi,

 

   In Oppertunity we have a field called Oppertunity_Initialted_International_c . This field must be mandatory to only few users. to add this conditions

 

  In Users Object there is a check box with name User_International_c,  If this is checked user should be mandatory to enter in oppertunity field Oppertunity_Initialted_International_c .

 

 


Please suggest me how to do this validation.

 

Thanks

Sudhir

crop1645crop1645

Did you look at the $User.user_international__c field?  $User will access any value from the current user's User record

 

so:

 

$User.user_international__c &&
ISBLANK(opportunity_initiated_international__c)
/* make oppo field required if user is flagged as international user */

 

Devender MDevender M

AND(User_International_c = true,
ISBLANK(Oppertunity_Initialted_International_c) ,
$Profile.Name == 'Test' // mention the profile name which u want to make field mandatory
)