Difference between making field required in page layout vs while field creation. - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Naiya MittalNaiya Mittal 

Difference between making field required in page layout vs while field creation.

Hi

I am wondering what is the difference between making a field required on the page layout v/s checking the required chechbox during field creation?

Thanks
Amber BoazAmber Boaz
Making the field required during field creation means it is required for all methods of data entry for that profile.
If you leave that unchecked and make it required on only one page layout, then that's the only method of data entry for which a value is required in that field.
I hope that helps!
Naiya MittalNaiya Mittal
So that means, if data is coming thru integration, then in second scenerio the field will not be required? and can make a blank value?
subramani Jsubramani J
Both are same thing

if a field is required in the page layout and read only in the field-level security settings, the field-level security overrides the page layout and the field will be read only for the user

To automatically add a field to all page layouts and make it visible and required everywhere regardless of field-level security, make it a universally required field.
Amber BoazAmber Boaz
Correct. If the field is ONLY required via the page layout, an integration can save the record without a value in that field.
Claudia ContrerasClaudia Contreras
If you have it required under the field if you ever do an import that will be required and you will not be able to pass it during import. If you make it required at the page layout whenever you do an import you will be able to bypass that field. 
Amitkumar BangadAmitkumar Bangad
+1 Claudia !

Required while creating : Cannot be bypassed by any way (API/Dataloader/Imports)
Requied on Page Layout : Required only when one works on the UI (inline editting/creating record on page/edit record on page)

thanks,
Amit
Naiya MittalNaiya Mittal
Thank you!
Chloe GrayChloe Gray
Hello! If you make it required during field creation can you undo this afterwards?
Mariza PandoMariza Pando
Ok, but if you have a field as required, does it mean the field will be required wherever you use this field in other objects as well?
Vani K. GaurVani K. Gaur
@Chloe : Yes. We can anytime check/ uncheck the field as "Required" at field level.

@Laura : 
Can you let us know, in what context are you asking this, if you have a requirement/ example ?

This validation for "Required" field is checked whenever you are trying to save a record (created/ edited ).

If the field has been made "Required" only at Page Layout level, in that case, it will be required only when one works on the UI on that particular page ( create/edit record on page).
To be checked everytime when saving a record for that object  ( via any other ways API, imports, related objects etc..) you need to set the field as Required at field level.