Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebApi

Module for interacting with D365 Web API

Hierarchy

  • WebApi

Index

Constructors

constructor

Methods

createRecord

  • createRecord(entityLogicalName: string, data: any): Promise<CreateResponse>
  • Create a single record

    Parameters

    • entityLogicalName: string

      Entity logical name of the record to create

    • data: any

      JSON Object with attribute names and values

    Returns Promise<CreateResponse>

    Promise which fulfills once the record has been created

deleteRecord

  • deleteRecord(entityLogicalName: string, id: string): Promise<any>
  • Delete a single record

    Parameters

    • entityLogicalName: string

      Entity logical name of the record to retrieve

    • id: string

      ID of the record to delete

    Returns Promise<any>

    Promise which fulfills once the deletion succeeds

retrieveMultipleRecords

  • retrieveMultipleRecords(entityLogicalName: string, options?: string, maxPageSize?: number): Promise<RetrieveMultipleResult>
  • Retrieves multiple records

    Parameters

    • entityLogicalName: string

      Entity logical name of the entity to retrieve

    • Optional options: string

      OData system query options or FetchXML query

    • Optional maxPageSize: number

      Specify the number of records to return per page

    Returns Promise<RetrieveMultipleResult>

    Promise which fulfills with the data once the retrieval succeeds

retrieveRecord

  • retrieveRecord(entityLogicalName: string, id: string, options?: string): Promise<any>
  • Retrieves a single record

    Parameters

    • entityLogicalName: string

      Entity LogicalName of the record to retrieve

    • id: string

      ID of the record to retrieve

    • Optional options: string

      OData system query options

    Returns Promise<any>

    Promise which fulfills with the requested record data

updateRecord

  • updateRecord(entityLogicalName: string, id: string, data: any): Promise<any>
  • Updates a single record

    Parameters

    • entityLogicalName: string

      Entity logical name of the record to retrieve

    • id: string

      ID of the record to update

    • data: any

      JSON Object with attribute names and values

    Returns Promise<any>

    Promise which fulfills once the update succeeds

Generated using TypeDoc