ON_AfterTransaction with message

Sort:
You are not authorized to post a reply.
Author
Messages
TracyO
Veteran Member
Posts: 97
Veteran Member

     

    I am  trying to clear a user field that I moved to the main AR30.1 screen after the user sucessfully processes the payment.

    I have added the following  javascript, but it is clearing the field on ANY transaction, including "Add Complete - Contiue". (they need to do an add and a change before they process, and we need this user field there at the time of process)

     Does anybody have any ideas, why it is clearing if  the message "Processing complete" is not being  returned?

     

    function FORM_OnAfterTransaction()
    {
        var msg=lawForm.getMessage();
          alert ("Message description is [" + msg + "]")
      { if (msg == "Processing complete");
    lawForm.setDataValue("PUF-APM-USR-FLD-01")}

    }

    John Henley
    Senior Member
    Posts: 3348
    Senior Member
      Your lawForm.setDataValue("PUF-APM-USR-FLD-01") is incomplete. You need to have TWO arguments: 1) the field to set, and 2) the value (i.e. ""). So it should look something like this:

      if (msg == "Processing complete")
      lawForm.setDataValue("PUF-APM-USR-FLD-01","");
      Thanks for using the LawsonGuru.com forums!
      John
      TracyO
      Veteran Member
      Posts: 97
      Veteran Member

        John

        I did discover that I was missing the ,"" of the lawForm.setDataValue.

        Once i did enter that piece it did not act any differently.  It sill would clear that field on ANY form function.  It seems to be totally

        ignoring my if on the message that was returned by Lawson.

        Thanks anyways

        Tracy

        You are not authorized to post a reply.