xrm-webapi
Build | NPM |
---|---|
A Dynamics 365 Web Api TypeScript module for use in web resources or external web apps in the browser or node.
All requests return Promises. To support Internet Explorer, be sure to include a promise polyfill when deploying to CRM.
Requires Dynamics CRM 2016 Online/On-Prem or later
Installation
Node
npm install xrm-webapi
Usage
Browser
; ; ; console.logaccount.name;
Node
; ; ; console.logaccount.name;
Angular
For use in Angular applications, I'd first recommend using their built in HttpClient. Besides batch operations, most D365 Web Api requests are pretty simple to construct. If you do want to use this library, the usage is the same as the browser usage:
; ; ; console.logaccount.name;
Supported methods
- Retrieve
- Retrieve multiple (multiple pages)
- Retrieve multiple with Fetch XML
- Create
- Create with returned data
- Update
- Update with returned data
- Update single property
- Delete
- Delete single property
- Associate
- Disassociate
- Web API Functions
- Web API Actions
- Batch operations
- Impersonation
Samples
See xrm-webapi-samples.ts for examples