Need Example - Javascript AGS Call

Sort:
You are not authorized to post a reply.
Author
Messages
AG
Advanced Member
Posts: 29
Advanced Member

    All:

    I have done a Google search and gone through many of the articles on this site, but I cant seem to find an example of an AGS call from Javascript code.

    I need a simple Javascript function that makes an AGS (Inquire) call to Lawson 8.0.3 and returns the string data returned from the AGS call.

    I will be using this in a custom HTML form.

    Thanks!

    John Henley
    Senior Member
    Posts: 3348
    Senior Member

      Here are a couple examples, not specific to your requirements, but should be enough to get you started:

      https://www.lawsonguru.co...v/topic/Default.aspx

      https://www.lawsonguru.co...v/topic/Default.aspx

      Thanks for using the LawsonGuru.com forums!
      John
      David Williams
      Veteran Member
      Posts: 1127
      Veteran Member

        See attached. 

        Attachments
        David Williams
        AG
        Advanced Member
        Posts: 29
        Advanced Member

          John:

          I tried your suggestion and built a function using the code you pointed out. It seems to be working but I am getting this response from the POST:

          Internal Server Error
          Cannot read script output pipe.

          I am getting prompted to enter my user id and password, so this cant be authentication, right?
           

          I did take the AGS call string from my code (During debug) and ran it in my browser from the URL and it worked fine there?

          Any thoughts?


           

          AG
          Advanced Member
          Posts: 29
          Advanced Member
            I got it to work!

            I changed my AGS call string from this: /cgi-lawson/ags.exe? TO: /servlet/ags?

            AG
            Advanced Member
            Posts: 29
            Advanced Member
              Ok now I am having an issue with the AGS call from my JS function. The code works fine but it seems to be caching the data somewhere? I am using an XML file to provide the values for the AGS call to AP20.7. Each time I change the XML values and run the JS function again it seems to be ignoring the change in the XML values?
              Does anyone know how I can fix this? Has anyone else run into this problem?

              TIA!
              AG
              Advanced Member
              Posts: 29
              Advanced Member
                ttt
                You are not authorized to post a reply.