Interface for the Xrm.WebApi.offline API

Hierarchy

Methods

  • Creates an entity record

    Parameters

    • entityLogicalName: string

      Logical name of the entity you want to create. For example: "account".

    • record: any

      A JSON object defining the attributes and values for the new entity record.

    Returns PromiseLike<CreateResponse>

    On success, returns a promise object containing the attributes specified earlier in the description of the successCallback parameter.

  • Deletes an entity record.

    Parameters

    • entityLogicalName: string

      The entity logical name of the record you want to delete. For example: "account".

    • id: string

      GUID of the entity record you want to delete.

    Returns PromiseLike<string>

    On success, returns a promise object containing the attributes specified earlier in the description of the successCallback parameter.

  • Retrieves a collection of entity records.

    Parameters

    • entityLogicalName: string

      The entity logical name of the records you want to retrieve. For example: "account".

    • Optional options: string

      (Optional) OData system query options or FetchXML query to retrieve your data.

      • Following system query options are supported: $select, $top, $filter, $expand, and $orderby.
      • To specify a FetchXML query, use the fetchXml attribute to specify the query.
      • NOTE: You must always use the $select system query option to limit the properties returned for an entity record 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.
      • You can specify multiple system query options by using & to separate the query options.
    • Optional maxPageSize: number

      (Optional) Specify a positive number that indicates the number of entity records to be returned per page.

      • If you do not specify this parameter, the default value is passed as 5000. If the number of records being retrieved is more than the specified maxPageSize value, nextLink attribute in the returned promise object will contain a link to retrieve the next set of entities.

    Returns PromiseLike<RetrieveMultipleResult>

    On success, returns a promise object containing the attributes specified earlier in the description of the successCallback parameter.

  • Retrieves an entity record.

    Parameters

    • entityLogicalName: string

      The entity logical name of the record you want to retrieve. For example: "account".

    • id: string

      GUID of the entity record you want to retrieve.

    • Optional options: string

      (Optional) 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 can also specify multiple query options by using & to separate the query options.

    Returns PromiseLike<any>

    On success, returns a promise containing a JSON object with the retrieved attributes and their values.

    Example

    options example:

    options: $select=name&$expand=primarycontactid($select=contactid,fullname)
    

    See

    External Link: retrieveRecord (Client API reference)

  • Updates an entity record.

    Parameters

    • entityLogicalName: string

      The entity logical name of the record you want to update. For example: "account".

    • id: string

      GUID of the entity record you want to update.

    • data: any

    Returns PromiseLike<any>

    On success, returns a promise object containing the attributes specified earlier in the description of the successCallback parameter.

Generated using TypeDoc