Loading

Unable to Specify a Record Type When Creating New Records via Custom Buttons

Udgivelsesdato: Oct 9, 2026
Beskrivelse

When creating a new record in Salesforce for an object with multiple Record Types using a custom button, the standard Record Type selection screen is bypassed and a specific layout is displayed automatically instead. This article explains how Salesforce determines which layout and Record Type are used in this scenario, and what limitations apply.

Løsning

This article explains why a custom button in Salesforce can't be configured to create a record with a specific Record Type, and what Salesforce supports instead.

Why Passing a Record Type Isn't Supported

Salesforce currently does not support passing RecordTypeId within the defaultFieldValues parameter in custom buttons.

Because RecordTypeId affects routing behavior, layout assignments, and page assignments, attempting to force a specific ID may result in unexpected behavior or errors.

How the Layout Is Determined

When you create a record via a custom button, Salesforce decides which layout to display using the following order:

  1. If a Lightning Record Page is assigned as the Org Default: the settings of that Lightning Record Page are applied.
  2. If no Org Default is assigned: the "Default Record Type" defined in the user's Profile is applied.
Vidensartikelnummer

005299460

 
Indlæser
Salesforce Help | Article