web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How can retrieve data from html web resource to Dynamics crm database ?

(0) ShareShare
ReportReport
Posted on by 775

Hello,

        I want to retrieve data from html web resource to Dynamics 365 Crm databases, I will create My custom kanban board using Jquery so whenever I create one record into web resource the data can be copied into dynamics crm, How can i do this ??

kan.PNG

*This post is locked for comments

I have the same question (0)
  • Verified answer
    imayur Profile Picture
    630 on at

    Hi,

    Use Ms CRM Web api to create/update/retreive record.

    You can build api call code using CRM Rest Builder,map values to fields, execute that code to create record in CRM. 

    Sample code: 

    var orgUrl = Xrm.Page.context.getClientUrl();
    var entity = {};
    //set values for fields in entity
    entity["new_customer_account@odata.bind"] = "/accounts(" + customerid + ")";
    
    entity["new_route@odata.bind"] = "/new_routes(" + routeId + ")";
    entity.new_order = "A1234";
    var id =  $.ajax({
    type: "POST",
    contentType: "application/json; charset=utf-8",
    datatype: "json",
    url: orgUrl + "/api/data/v8.2/new_routeitems",
    data: JSON.stringify(entity),
    beforeSend: function (XMLHttpRequest) {
    XMLHttpRequest.setRequestHeader("OData-MaxVersion", "4.0");
    XMLHttpRequest.setRequestHeader("OData-Version", "4.0");
    XMLHttpRequest.setRequestHeader("Accept", "application/json");
    },
    async: true,
    success: function (data, textStatus, xhr) {
    var uri = xhr.getResponseHeader("OData-EntityId");
    var regExp = /\(([^)]+)\)/;
    var matches = regExp.exec(uri);
    var newEntityId = matches[1];
    return newEntityId;
    },
    error: function (xhr, textStatus, errorThrown) {
    alert(textStatus + " " + errorThrown);
    }
    });
  • Suggested answer
    ARIFNIIT Profile Picture
    1,391 on at

    How this web page is hosted, inside CRM or outside of CRM. if hosted outside of CRM then you need to authenticate CRM Web API

  • Verified answer
    kiran_rajput Profile Picture
    775 on at

    Inside Crm Entity

    newr.PNG

  • Verified answer
    ARIFNIIT Profile Picture
    1,391 on at

    then you can use Web API to create record in CRM or you can use action to create record and call Action using JS.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans