getRecordUi
(Deprecated)
Deprecated. This wire adapter gets layout information, metadata, and data to build UI for one or more records.
To create a UI for working with records, use the getLayout
wire adapter instead.
As a deprecated feature, getRecordUi
no longer updates and isn’t part of the “Services” under your master subscription agreement with Salesforce. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn’t guarantee general availability of this feature within any particular time frame or at all, and we can discontinue it at any time. getRecordUi
is for evaluation purposes only, not for production use. It’s offered as is and isn’t supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature.
The getRecordUi
wire adapter uses this User Interface API resource, but doesn’t support all its parameters.
-
recordIds
—(Required) IDs of records to load. A string or an array of strings. All record IDs must be from a supported object. -
layoutTypes
—(Required) Layout types for the record. A string or an array of strings. Each string is one of these values:Compact
—Use this value to get a layout that contains a record’s key fields.Full
—Use this value to get a full layout.
-
modes
—(Required) The access mode for the record. This value determines which fields to get from a layout. Layouts have different fields for create, edit, and view modes. For example, formula fields are rendered in view mode, but not in create mode because they’re calculated at run time, like formulas in a spreadsheet.A string or an array of strings. Each string contains one of these values:
Create
—Use this mode if you intend to build UI that lets a user create a record.Edit
—Use this mode if you intend to build UI that lets a user edit a record.View
—Use this mode if you intend to build UI that displays a record.
-
optionalFields
—An optional field name or an array of optional field names. If a field is accessible to the context user, it’s included in the response. If a field isn’t accessible to the context user, it isn’t included in the response, but it doesn’t cause an error.
Read the data that's returned by the wire adapter using a property or function.
propertyOrFunction
—A private property or function that receives the stream of data from the wire service.
- If a property is decorated with
@wire
, the results are returned to the property’sdata
property orerror
property. - If a function is decorated with
@wire
, the results are returned in an object with adata
property and anerror
property.
-
data
—Record UIIn the response, don’t use the
recordTypeInfo
property. Instead, use therecordTypeId
property, which is returned for every record. -
error
—FetchResponse
See Also
- Understand the Wire Service
- Handle Errors in Lightning Data Service
- Salesforce Objects Supported by lightning/ui*Api Modules