Error not displayed after AGS call

Sort:
You are not authorized to post a reply.
Author
Messages
Joe O'Toole
Veteran Member
Posts: 314
Veteran Member

    We have a custom form that is calling out to a modified version of HR11. When a BSI tax factory error is detected a message should be displayed indicating that tax errors exist and the user can click off to continue. At some point either through upgrading to LSF 9, upgrading to BSI or modifying the custom DS form, the error has stopped being displayed. The code to check for errors after the AGS call is as follows. Any ideas on where to start with debugging where this is broken?

    AGS CALL OCCURS HERE

    if (!sAGSInfo || sAGSInfo.status > 400)
      alert("Got 400 error");
       return;

      var sMessage = sAGSInfo.selectSingleNode("//Message").text;

      if (sMessage != "Update Complete - Continue") {
       alert (sMessage);
       alert("Got other error");
      } else {
       // set hiring status message
       lawForm.setFormValue("hire_status","Update Complete - Continue");
       alert("Applicant data has been updated");
      }
     

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      Is the AGS call set up with &_OUT=XML
      David Williams
      Joe O'Toole
      Veteran Member
      Posts: 314
      Veteran Member
        I went hunting back for a 2006 version of the XML code and I see the pre-LSF9 AGS call had
        &_TDS=IGNORE&_OUT=XML in it. The current version does not have these 2 so it appears they were removed intentionally.
        Gary Davies
        Veteran Member
        Posts: 248
        Veteran Member

          It's just a personal preference but I prefer to check the message number rather than the message itself.  The message can easily be changed and cause the logic to think it is falsely in error, but message number 000 will always mean update complete.

          var sMsgNbr = sAGSInfo.selectSingleNode("//MsgNbr").text;
          if (sMsgNbr != "000") {

           

          Joe O'Toole
          Veteran Member
          Posts: 314
          Veteran Member
            Gary, That's a good tip. My scenario where the message is never being displayed is the opposite situation. Not sure if you're running LSF9 but do you have _OUT=XML specified on your AGS calls?
            John Henley
            Senior Member
            Posts: 3348
            Senior Member
              I don't know if this helps or not, but I've seen (but not actually used) a new feature in AGS where you can append "&_CHGSTAT=to|from", e.g. adding &_CHGSTAT=000|108 will map msg number 108 to 000
              Thanks for using the LawsonGuru.com forums!
              John
              You are not authorized to post a reply.