Design Studio and using getattachrec.exe

 2 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
KHessing
Basic Member
Posts: 10
Basic Member

    I am having issues trying to use getattachrec.exe to get the URL for our invoice image. Here is what I have and the error I am getting.

    //code for getattachrec.exe
    var x = "http://lawson.fbfs.com:7740/cgi-lawson/getattachrec.exe";
    x += "?_OUT=XML";
    x += "&_PDL= TRAIN9";
    x += "&_FN=APINVOICE";
    x += "&_IN=APISET1";
    x += "&K1=" + vComp;
    x += "&K2=" + vVen;
    x += "&K3=" + vInv;
    x += "&K4=" + vSuff;
    x += "&K5=" + vCanSeq;
    x += "&_ATYP=U";
    x += "&_AUDT=I";
    x += "&_USCH=HTTP";
    x += "&_KS=zz";
    x += "&_OPM=A";
    x += "&_DATA=TRUE";
     alert(x);

    //Return value from call
    var objhttp=portalWnd.objFactory.createInstance("http");
    //var objhttp = new ActiveXObject("Msxml2.XMLHTTP")
    objhttp.Open("GET", x, false)
    objhttp.Send("UserInfo")

    //Display value from call
    var vURL = objhttp.responseTEXT
    alert("URL:" + vURL)

    Please see attached document with values of 'x' and 'URL'  along with error message. Does anyone have any thoughts on what I am doing wrong? I have tried several different ways of doing this procedure but this seems to be the closest I have come. Any help would be much appreciated. Thanks!


    Attachments
    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      Let me ask, is your image stored on a shared drive and you're adding the mapping to that drive as your attachment comment?
      David Williams
      KHessing
      Basic Member
      Posts: 10
      Basic Member
        Hi David,
        I am not totally sure what you are asking. Our images are stored on a shared drive. But the URL/path is in the L_HAPI table?
        I am adding a button to the AP20 screen. I am trying to retrieve the URL for the invoice image instead of the users needing to do the drill around to see the image. Thanks for your help.