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

Case Study
06 Sep, 2024

Implementation of Business Central for a Trading Organization

Customer Overview A prominent trading organization sought to enhance its operational efficiency and streamline its business processes by implementing Dynamics…

READ MORE
Blogs
03 Sep, 2024

Optimizing Code Check-ins: Ignoring Unnecessary Files for a Cleaner Azure DevOps Repo.

Introduction In this blog, we will learn about the code check-in process in DevOps. After development, unnecessary files are sometimes…

READ MORE
Blogs
20 Aug, 2024

Configure Macros in Omnichannel to improve Agent Productivity

What are Macros? Macros are a set of sequential actions that a user performs. They enable users to perform daily…

READ MORE