Cert++
Close

Universally required versus page-layout required fields

Key Takeaway

A page layout makes a field required only on the detail and edit pages that use that layout. To require a value no matter where a save comes from, make the custom field universally required in its field definition.

Salesforce gives you two main ways to make a field required. You set a universally required field on the field definition, and it must have a value every time a record is saved, no matter where the save comes from. A page-layout required field is required only on the detail and edit pages that use that layout, so it works at the presentation level. Making a field universally required gives a higher level of data quality than this presentation-level control.

Where each kind of required field applies

The requirement on a universally required field covers saves in these places:

  • Within Salesforce
  • The Lightning Platform API
  • Connect Offline
  • Salesforce for Outlook
  • The Self-Service portal
  • Automated processes such as Web-to-Lead and Web-to-Case

Universally required fields are not enforced everywhere, however. Quick Create does not enforce them. Salesforce enforces them during lead conversion only if validation and triggers for lead conversion are enabled in the org.

A page-layout setting covers less. Page layouts set whether fields are visible, read-only, or required on detail and edit pages only.

The two also differ across record types. Universally required fields are required across all record types. Each page layout applies to a particular record type, so a page-layout setting applies only to the record type that uses that layout.

For example, imagine an object with two record types, each with its own page layout. If you set a custom Date field to required on one of those layouts, the setting applies to one record type. If you make that field universally required instead, it is required for both record types.

Platform App Builder Study Guide

Checklist progress

0/340Learned

Given a scenario, determine the considerations when selecting or changing a field data type.

0/19

Text and long-text field types

Learn this concept

Number, currency, and percent fields

Learn this concept

Date, Date/Time, and Time fields

Learn this concept

Checkbox versus Yes/No picklist

Learn this concept

Email, Phone, and URL field types

Learn this concept

Global picklist value sets

Learn this concept

Record types and picklist values

Learn this concept

Auto-Number field configuration

Learn this concept

External ID and unique field types

Learn this concept

Geolocation custom fields

Learn this concept

Formula versus stored field types

Learn this concept

Classic encrypted text fields

Learn this concept

Field history tracking

Learn this concept

Blocked custom field type changes

Learn this concept

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform App Builder studiers.