Development questions
What is the difference between lightning-record-form, lightning-record-edit-form and lightning-record-view-form?
DevelopmentEasy
All use Lightning Data Service, so no Apex is needed and FLS/sharing are respected.
- lightning-record-form – quickest option; auto-generates a full form (view, edit or read-only) from fields or layout. Least customizable.
- lightning-record-edit-form – you control the layout with
lightning-input-fieldand can add custom buttons, validation and handleonsubmit,onsuccess,onerror. - lightning-record-view-form – read-only display using
lightning-output-field.
Choose record-form for simple CRUD, edit-form for custom layouts, view-form for read-only pages.
lwcldsforms
More Development questions
- What is an Apex Trigger in Salesforce and when should you use it over Flows?
- What is the difference between before triggers and after triggers?
- Explain all Trigger context variables (isInsert, isUpdate, isDelete, isUndelete, isBefore, isAfter, isExecuting, size, operationType).
- What is the difference between Trigger.new and Trigger.old?
- In which trigger events are Trigger.new and Trigger.newMap available?
- In which trigger events are Trigger.old and Trigger.oldMap available?