Retrieves an entity record.

Available for

Model-driven apps


context.webAPI.retrieveRecord(entityLogicalName, id, options).then(successCallback, errorCallback);


Name Type Required Description
entityLogicalName String Yes The entity logical name of the record you want to retrieve. For example: "account".
id String Yes GUID of the entity record you want to retrieve.
options String No

OData system query options, $select and $expand, to retrieve your data.

  • Use the $select system query option to limit the properties returned by including a comma-separated list of property names. This is an important performance best practice. If properties aren’t specified using $select, all properties will be returned.
  • Use the $expand system query option to control what data from related entities is returned. If you just include the name of the navigation property, you’ll receive all the properties for related records. You can limit the properties returned for related records using the $select system query option in parentheses after the navigation property name. Use this for both single-valued and collection-valued navigation properties.

You specify the query options starting with ?. You can also specify multiple query options by using & to separate the query options. For example:

successCallback Function No

A function to call when a record is retrieved. A JSON object with the retrieved properties and values will be passed to the function.

errorCallback Function No A function to call when the operation fails.

Return Value

Type: Promise<Entity>

Power Apps component framework API reference
Power Apps component framework overview