Second CRUD Summary
Our second CRUD sample application is a Lightning App Page consisting of several LWCs that interact with each other. This app, named “VHE Second CRUD Sample”, is built on one of my Developer Edition orgs.
The “VHE Second CRUD Sample” app uses parent, child, and sibling LWCs.
The Create, Read, Edit, and Delete functionality is handled by LWCs with their HTML Template files viewing and accepting user data with forms.
We use conditional rendering on the Template files to show how to make the UI less cluttered.
Data is exchanged between the client browsers and the server using the LWC JavaScript
controllers, which import the createRecord()
,
updateRecord()
, and deleteRecord()
functions from
the lightning/recordApi
module, and an imported Apex method named
getAccountList()
that retrieves records from the server using an
SOQL call.