Posts

Showing posts with the label required

Salesforce Fact #902 | Setting record owner during lead conversion

If a Lead is owned by a Queue, then during lead conversion we need to set the ownerId to any user who will be the owner of the converted account and contact record. So while converting lead from apex code we need to set the owner id else the below error is encountered: System.DmlException: ConvertLead failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Converted objects can only be owned by users. If the lead is not owned by a user, you must specify a user for the Owner field.: [OwnerId]

Salesforce Fact #543 | Required field in dynamic forms

While migrating fields from layout to dynamic form, if any universally required field was not present in the layout it is migrated from, it is not migrated automatically. For example, in Opportunity page layout the universally required field Forecast Category is not present and while migrating the fields to dynamic form, we get an error message saying a required field is missing in the layout and the user won't be able to save any record. Reference:  https://trailhead.salesforce.com/content/learn/projects/convert-a-lightning-page-to-dynamic-forms/get-started-with-dynamic-forms