Delete ( D ) an Account Record
We are moving along toward the end of our CRUD example: Delete.
Let’s start fresh and refresh the VHE Second CRUD Sample application.
Again we will select Edit or Delete an Account.
We no longer need our Acme test record, so let us type ‘Acme’ in the Account Name field and click on Search.
After the Acme Associates, Inc account is found, click on Delete.After successful delete we get this toast message and are returned to our default account page:
The code progression starts with the LWC customSearch
, which as shown
above is a child of the LWC editOrDeleteAccount
.
customSearch
has the Delete button, which calls a method in
the controller called deleteAccount()
.