Lightning Web Component : lightning-record-view-form
A
lightning-record-view-form component is a wrapper component that accepts a record ID and is used to display one or more fields and labels associated with that record using lightning-output-field.
lightning-record-view-form requires a record ID to display the fields on the record. It doesn't require additional Apex controllers or Lightning Data Service to display record data. This component also takes care of field-level security and sharing for you, so users see only the data they have access to.Displaying Record Fields:
To display the fields on a record, specify the fields using lightning-output-field.
| NAME | ACCESS | DESCRIPTION | REQUIRED |
|---|---|---|---|
| record-id | global | The ID of the record to be displayed. | Yes |
| object-api-name | global | Api name of object. | Yes |
Reference: Salesforce Developer Guide, Salesforce Component Library
No comments:
Post a Comment