PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 10/11/2017 7:13 AM by  zdever2011
results from AGS call
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Ragu Raghavan
Private
Private
Veteran Member
(902 points)
Veteran Member
Posts:314


Send Message:

--
10/05/2017 11:31 AM

    For years I have been using this syntax to get the results from an AGS call:

     var sMsgNbr  = sAGSInfo.selectSingleNode("//MsgNbr").text;

    This seems to work only in IE. Gets an 'undefined' in Chrome and Firefox.

    This workaround seems to work on all 3 browsers.

     var vNew1 = sAGSInfo.getElementsByTagName("MsgNbr")[0];
     var vNew2 = vNew1.childNodes[0];
     var vNewMsg = vNew2.nodeValue;

    Joe O'Toole
    Private
    Private
    Veteran Member
    (793 points)
    Veteran Member
    Posts:309


    Send Message:

    --
    10/10/2017 5:11 PM

    Does anyone have sample DME and AGS call syntax that will work both in IE and Chrome?

    We just finished getting a custom form working in V10 on IE working around the JS and object behavior changes only to find that the DME and AGS calls are not working when users try to use it in Chrome.

     

    Thanks.

    zdever2011
    Infor/Lawson Consultant
    Southeast ERP
    New Member
    (3 points)
    New Member
    Posts:1


    Send Message:

    --
    10/11/2017 7:13 AM

    I recently ran into this same issue with a client.  The DME and AGS calls are working but IE11 stores the return data in a different spot than Chrome and FireFox.  

    The solution I used was to check the browser userAgent for IE and then pull from the correct location.  One thing we ran into with this was that the data from Chrome and Firefox needed to be trimmed of character-return/line feeds.

     

    var ua = navigator.userAgent; //ZD032717 - Update userAgent check to IE11(Trident)
    var trident = ua.indexOf('Trident/');

    if (trident > 0)
    {   
    vELcommentArray = vCols[0].firstChild.data;
    }
    else
    {
    var stringToReplace = vCols[0].firstChild.wholeText;
    vELcommentArray= stringToReplace.replace(/[\n\r]+/g, '');
    }

    You are not authorized to post a reply.