• One Response

    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
  • Subscribe
    Notify of
    guest
    1 Comment
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments
    trackback

    […] Create Notes with Attachment using Web API in Dynamics 365 – Nebulaa IT Solutions, […]

WANT QUICK D365 IMPLEMENTATION?

Let started with our D365 Quickstart package and get onboard within 7 days!

I'M INTERESTED!
LATEST POSTS
© Copyright 2024 Nebulaa IT Solutions LLP. All Rights Reserved.
Download
Brochure