0
Hi

I know there is a way to call TeamScript from Javascript code running on the SBM transition form or listing report template. I wonder if there is a way to call a Web service in the same situation? Has anyone try to anything similar?

Thanks in advance
Responses (3)
  • Accepted Answer

    Tuesday, December 04 2012, 09:16 PM - #Permalink
    0
    The reply is currently minimized Show
  • Accepted Answer

    Jeff Malin
    Jeff Malin
    Offline
    Friday, December 07 2012, 08:12 AM - #Permalink
    0
    If you want to make any Web calls through JavaScript I would highly recommend using jQuery, it handles all of the messy details required for cross-browser compatibility behind the scenes, and is community-supported so that later versions support new browsers/specs as they come on-scene.

    Here's an example of how you would make an HTTP POST call to a web service using JQuery: http://api.jquery.com/jquery.post/
    The reply is currently minimized Show
  • Accepted Answer

    Monday, December 10 2012, 08:06 AM - #Permalink
    0
    The code below is taken from a working solution. Works for Both IE and Firefox. There is a browser checker that is written in javascript which you can query first to see if the user is using a supported browser.

    I am going to assume you are calling a soap service, so I used a call to the mashups API, which is why the destinationURI is ..\ and not a full URL.

    NOTE: the last line of xmlDOC = ... is the return response from the SOAP service. Also note this is being sent synchronously, IE, will wait for a return from the service. If this is a service that takes a long time, then you might write a return function and pass true with the POST command to make it asynch.

    Hope this helps. (had to make the code an image. Was having issues formatting the XML, and done have time to fool around with it right now.)
    The reply is currently minimized Show
Your Reply

Recent Tweets