Contents
How to specify read only fields in Lightning?
To specify read-only fields, use lightning:outputField components inside lightning:recordViewForm. lightning:recordViewForm 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.
How to create a record view in Lightning?
Represents a record view that displays one or more fields, provided by lightning:outputField. This component requires API version 41.0 and later. Use the lightning:recordViewForm component to create a form that displays Salesforce record data for specified fields associated with that record.
What do you need to know about lightning output field?
lightning-output-field supports fields on objects that are UI API compliant. For supported objects, see the User Interface API Developer Guide. Fields that have a spanning relationship aren’t supported by lightning-output-field. The fields specified must be associated with only one object.
Where to find Lightning output field in Salesforce?
Use the lightning-output-field component in lightning-record-view-form to display the value of a record field on a Salesforce object. Use the field-name attribute to specify the API field name. For standard and custom objects, find the field names in Lightning Experience from Setup > Object Manager > (object-name) > Fields & Relationships.
To specify read-only fields, use lightning-output-field components inside lightning-record-view-form. 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.
Do you know how a lightning component works?
If you’re comfortable with how a Lightning Component works and want to build production-grade applications for use in your org or to sell in AppExchange, this article is a must read. Understanding how a singular component works is important, but understanding how they work together is essential for building an effective application.
How does Lightning record view work in Salesforce?
Use the lightning-record-view-form component to create a form that displays Salesforce record data for specified fields associated with that record. The fields are rendered with their labels and current values as read-only. You can customize the form layout or provide custom rendering of record data.
What is the Component Library in Salesforce Lightning?
The Component Library is the Lightning components developer reference. Rapidly develop apps with our responsive, reusable building blocks.