Discover Whether a Field Is Required in a Layout

In the Salesforce user interface, an admin with “Customize Application” permission can mark a field required in a layout. When you use User Interface API to create or update a layout, you need to know whether a field is required. The Record Layout Item response body has a new required property that indicates whether a field is required in a layout for create and update.
Requests to these resources return a nested Record Layout Item:
  • /ui-api/record-ui/{recordIds}
  • /ui-api/object-info/{objectApiName}
  • /ui-api/record-defaults/clone/{recordId}
  • /ui-api/record-defaults/create/{objectApiName}