Navigate Users to a Record’s Create Page with Default Field Values

Use the new lightning/pageReferenceUtils module or lightning:pageReferenceUtils Aura component to build navigation links in your components that prepopulate a record’s create page with default field values. Prepopulated values can accelerate data entry, improve data consistency, and otherwise make the process of creating a record easier.

Where: This change applies to Lightning Experience in all editions. This change doesn’t apply to Lightning Out, Lightning communities, or the Salesforce mobile app.

How: This component provides utilities for encoding and decoding default field values. Pass this string into the new pageReference.state.defaultFieldValues attribute on standard__objectPage page reference types. Using this component alongside the existing lightning:navigation component, you can launch a record’s create page with prepopulated field values.

We recommend using lightning/pageReferenceUtils and lightning/navigation to navigate to a record’s create page instead of force:createRecord.