knowledgecenter-breadcrum

Knowledge Center

07 Apr, 2022

Create Notes with Attachment using Web API in Dynamics 365

Posted on 07 Apr, 2022 by Admin, Posted in Dynamics 365 Dynamics 365 Web Api Dynamics-365 Sales

Create Notes with Attachment using Web API in Dynamics 365 Blogs

Create Notes with Attachment using Web API in Dynamics 365

Create Notes record with Attachment for Contact Entity

var note = {};

note.subject = "Notes Subject";

note.notetext = "Notes Text";

note.filename = "FileName.txt";

note.documentbody = "Base64String";

note["objectid_contact@odata.bind"] = "/contacts(00000000-0000-0000-000000000000)";

Xrm.WebApi.createRecord("annotation", note).then(

function success(result) {

alert("Success");

},

function(error) {

alert(error.message);

});


Note:-

  1. While setting object ID or regrading lookup we have to specify entity name with field schema name

for e.g. objectid_account@odata.bind

  1. documentbody value should be converted to Base64String

Comment

This is a Required Field

Loading

Recent Updates

Blogs
18 Jul, 2024

How to use Fiddler to debug your PCF while doing development.

Have you ever felt like you're spending too much time debugging your PCF (PowerApps Component Framework) during development, only to…

READ MORE
Blogs
16 Jul, 2024

How to use Solutions with Power Pages

What is Solution in power Pages? A solution is a container for components such as Website Configuration and Dataverse Components.…

READ MORE
Blogs
15 Jul, 2024

Create a Dataverse table with a SharePoint List

In today’s business world, Organization uses SharePoint lists for document management, and data storage. Let's assume a scenario where an organization…

READ MORE