Loading

Record Name Not Appearing in Record Creation Success Message in Salesforce LWC

Udgivelsesdato: Jul 3, 2026
Beskrivelse

When the auto-generated record name field (such as the Name field) is removed from a page layout and a new record is saved, the success toast message displays the record ID instead of the record name.

This behavior is expected and is specific to Lightning Web Components (LWC).

Note: This behavior differs from Aura, the older Salesforce Lightning component framework used prior to Lightning Web Components. In Aura, the record name appeared in the success toast message regardless of whether the Name field was present on the layout. In LWC, the success message relies on the record name field being present on the layout to display it correctly.

Løsning

To display the record name in the record creation success message, add the auto-generated Name field back to the relevant page layout.

  1. Navigate to Setup | Object Manager.
  2. Select the object whose record name is not appearing in the success message.
  3. Click Page Layouts and open the relevant layout.
  4. Locate the Name field in the available fields section.
  5. Drag the Name field onto the page layout.
  6. Click Save.

Once the Name field is present on the layout, Salesforce uses it to populate the success toast message displayed after record creation.

Yderligere ressourcer

Modify Page Layouts

Vidensartikelnummer

000389059

 
Indlæser
Salesforce Help | Article