+ Start a Discussion
Li void YueLi void Yue 

Field Mandatory

hi guys

i am prepare for the adm 201 . and i have a question .

Which of the following is the best way to make the Field Mandatory for everyone? 

A. Page Layout 
B. Validation Rule 
C. Roles & Profiles 
D. Field Level Security
and why ?? 



Sridhar BonagiriSridhar Bonagiri



Creating a Validation Rule for making a field will be the best possible solution for making a field as mandatory, As Page layout will be not be accessible while loading the data throught data loader.



Sridhar Bonagiri

Sumit KumarSumit Kumar



Make the field required while creating the field the best way to make the field Universally Required.



Li void YueLi void Yue

what do you think about Sridhar Bonagiri's opinion




I am agry with sumit, to make it required at the time of creation. There are some fields that dont have option to make that required, in that case we can go with validation rule.



Anup JadhavAnup Jadhav

Everybody is saying the same thing here except Sridhar is suggesting to add a validation rule. But if you think about it, making a field "mandatory" or "required" is equivalent to adding the validation rule manually. In the former case, the system will enforce the rule for you.




If Salesforce gives a standard functionality to make a field required.So what is the need of writing code in validation rule.

Its is the good pratice to use Standard functionality as much we can .




I agree with you - making the field required from the field definition is without question the best way to make it universally required - but that wasn't a choice on the question. So "validation rule" has to be the right answer.


Don't forget that the certification exams are designed to trip you up!


By page layout if you make a field required it will be required only for that page layout,not universally.Besides if you drag that field out of page layout that will automatically become non-required .


By validation rule if you make it required ,you must have put this this field in page layout.You may put this field out of page layout,that will show no error.But while saving then it will give error because the field is actually required in backend but you're putting NO VALUE there .


By role u may set field required using RoleID but that is only for a narrow requirement.By profile that is as same as page layout,instead you may create different pagelayouts and assign those to different profiles .


The best way to make fields required is  FLS(field level security) .This makes a field universally required.

Ewa FrystEwa Fryst
Sourava046, isnt FLS and universally required 2 differenet things? You can only make a field universally required when creating a field and you can change FLS anytime. 
Also, how to make a field mandatory using FLS?
jitender singh 18jitender singh 18
to make field mandatory there are three possible ways.
1.At the time of field creation.
2.Writing a trigger.
3 Making It required on page layout.