Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Input Output in javascript

Posted on by 20

Hi, i want to call a webservice that i have created, using a javascript. i have done but only with output, can sone one help me to change the script to have input?

that's my javascript that return the name in name field after calling webservice called HelloWS and using web method called Information.

function GetInformation()
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("Post", "localhost/.../Information", false);
xmlHttp.send();
var xmlDoc=xmlHttp.responseXML;
var responseElement=xmlDoc.getElementsByTagName("test_name")[0];
var exch=responseElement.firstChild.nodeValue;
Xrm.Page.getAttribute("test_name").setValue(exch);
return false;

}

*This post is locked for comments

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Input Output in javascript

    One more note in General. If you are calling a WS/API that is supposed to only retrieve data, it is recommended to use GET rather than POST. Not required, but recommended.

    Regarding your question, You basically need to pass the parameters that are expected to the WS.

    I think the previous response might cover that.

  • TomSmelser Profile Picture
    TomSmelser 1,570 on at
    RE: Input Output in javascript

    Is this what you are trying to accomplish ?

    stackoverflow.com/.../pass-parameters-to-xmlhttprequest-object

    Hope that is helpful.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans