web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    ARIFNIIT Profile Picture
    1,391 on at
    RE: How can retrieve data from html web resource to Dynamics crm database ?

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

  • Verified answer
    kiran_rajput Profile Picture
    775 on at
    RE: How can retrieve data from html web resource to Dynamics crm database ?

    Inside Crm Entity

    newr.PNG

  • Suggested answer
    ARIFNIIT Profile Picture
    1,391 on at
    RE: How can retrieve data from html web resource to Dynamics crm database ?

    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
    imayur Profile Picture
    630 on at
    RE: How can retrieve data from html web resource to Dynamics crm database ?

    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);
    }
    });

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#2
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans