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 to call the web service URL from XRM Java script without using ajax?

(0) ShareShare
ReportReport
Posted on by

Hi,

I am trying to call the web service for post the data in dynamic CRM by using XRM Javascript. can anyone suggest How to call the web service URL from XRM Javascript without using ajax? Please help me. It's Very urgent. Thanks in Advance.

this is my web service Url

http://xyzazure.net/api/values" + "?name="+Name +"&"+"Title="+TItle+"&"+"Subject="+subject+ "&" + "company="+company + "&" + "isExistingClient=" + false + "&"+"startDate="+startDate+"&"+"closeDate="+closeDate+"&" + "city="+City + "&" + "country="+Country + "&" + "postalcode="+Postalcode+"&"+"BiddingType="+BiddingType+"&"+ "risks=" + riskData+"&"+"Deliveriables="+Deliveriables+"&"+"data="+milestoneData+"&"+ "estimatedCost="+estimatedCost;

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Andreas Cieslik Profile Picture
    9,267 on at

    Hi,

    this link might provide you the right entry point to get started:

    msdn.microsoft.com/.../gg334279.aspx

  • TonyN Profile Picture
    695 on at

    Use the CRM Rest Builder. It does all the work for you.

    https://github.com/jlattimer/CRMRESTBuilder

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Indrasena,

    Here is the sample code -

    // define the data to create new account
    var data =
        {
            "name": "Sample Account",
            "creditonhold": false,
            "address1_latitude": 47.639583,
            "description": "This is the description of the sample account",
            "revenue": 5000000,
            "accountcategorycode": 1
        }
    
    // create account record
    Xrm.WebApi.createRecord("account", data).then(
        function success(result) {
            console.log("Account created with ID: " + result.id);
            // perform operations on record creation
        },
        function (error) {
            console.log(error.message);
            // handle error conditions
        }
    );


    Fore more info you can refer below msdn - 

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/createrecord

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