SIGN IN SIGN UP

Login to your account

Username or Email *
Password *
Remember Me

Lesson: 28 | Build Custom UI to Create and Edit Records


If the lightning-record-*-form components don’t provide enough flexibility for your use case, use the JavaScript API to build UI that creates and edits records.

The component’s JavaScript imports createRecord from the lightning/uiRecordApi module. To display notifications for error handling, it imports ShowToastEvent from lightning/platformShowToastEvent. It then imports references to the Account object and Account name field.

Pass the account name to createRecord(recordInput), which creates an account record based on the name you provide.

Next, provide a handler that creates an account record using createRecord(recordInput). In this example, the handleNameChange(event) method handles a change event from the component HTML file when a user enters an account name.


Prev You need to login to have access to the quizzes. Next

Mastered by 12 users.

Go to top