![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
dynamics-web-api
Advanced tools
DynamicsWebApi is a Microsoft Dataverse Web API helper library written in Typescript.
Compatible with: Microsoft Dataverse; Microsoft Dynamics 365: Customer Service, Field Service, Marketing, Project Operations, Talents, Sales and any model-driven application built on Microsoft Power Apps platform. As well as Microsoft Dynamics 365 CE (online), Microsoft Dynamics 365 CE (on-premises), Microsoft Dynamics CRM 2016, Microsoft Dynamics CRM Online.
v2.1.0+
Browser-compiled script and type definitions can be found in a v2 dist folder.
Changelog can be found here.
Please note! "Dynamics 365" in this readme refers to Microsoft Dataverse (formerly known as Microsoft Common Data Service) / Microsoft Dynamics 365 Customer Engagement / Micorosft Dynamics CRM. NOT Microsoft Dynamics 365 Finance and Operations.
To use DynamicsWebApi inside Dynamics 365 you need to download a browser version of the library, it can be found in v2 dist folder.
Upload a script as a JavaScript Web Resource, add it to a table form or reference it in your HTML Web Resource and then initialize the main object:
//By default DynamicsWebApi makes calls to
//Web API v9.2 and Search API v1.0
const dynamicsWebApi = new DynamicsWebApi();
const response = await dynamicsWebApi.callFunction("WhoAmI");
Xrm.Navigation.openAlertDialog({ text: `Hello Dynamics 365! My id is: ${response.UserId}` });
v.2.1.0+
There are two ways to include DynamicsWebApi in your portal: upload as a Web File or use CDN, such as unpkg
.
It is possible to upload the library as a Web File in Microsoft Power Pages. Usually, the .js
extensions are forbidden to upload but it is still possible to do, here's a workaround.
Once the web file is uploaded, it can be included in a template, a page or a form the following way:
<script type="text/javascript" src="~/dynamicsWebApi.min.js"></script>
With CDN, it is a bit easier: no need to create and upload a web file - just include the script in your template, page or a form:
<script type="text/javascript" src="https://unpkg.com/dynamics-web-api@2.1.4/dist/dynamics-web-api.min.js"></script>
And you are good to go! DynamicsWebApi will automatically detect if the library is running on Power Pages and will supply an anti-forgery token with each request.
To use DynamicsWebApi in Node.js install the dynamics-web-api
package from NPM:
npm install dynamics-web-api --save
Then include it in your script:
//CommonJS
const DynamicsWebApi = require("dynamics-web-api").DynamicsWebApi;
//ESM
import { DynamicsWebApi } from "dynamics-web-api";
const contact = {
firstname: "John",
lastname: "Doe"
};
const order = {
name: "1 year membership",
//reference a request in a navigation property
"customerid_contact@odata.bind": "$1"
};
dynamicsWebApi.startBatch();
dynamicsWebApi.create({ data: contact, collection: "contacts", contentId: "1" });
dynamicsWebApi.create({ data: order, collection: "salesorders" });
const responses = await dynamicsWebApi.executeBatch();
//in this case both ids exist in a response
//which makes it a preferred method
const contactId = responses[0];
const salesorderId = responses[1];
First of all, I would like to thank you for using DynamicsWebApi
library in your Dynamics 365 CE / Common Data Service project, the fact that my project helps someone to achieve their development goals already makes me happy.
And if you would like to contribute to the project you may do it in multiple ways:
DynamicsWebApi
and what project you are working on, I will be happy to hear about it.All contributions are greatly appreciated!
FAQs
DynamicsWebApi is a Microsoft Dataverse Web API helper library
The npm package dynamics-web-api receives a total of 15,777 weekly downloads. As such, dynamics-web-api popularity was classified as popular.
We found that dynamics-web-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.