AP20.1 in Lawson 9 OnAfterTransaction

 4 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
drhoades44
Advanced Member
Posts: 46
Advanced Member

    On AP20.1 we have added another row to the detail line item area for the account number description (GDT-DESCRIPTION). We try to clear these out and the following code was working in 9.0 (we're in the process of an upgrade), but when I save the form now, I get the error re "Script is saved with syntax error checking. A script control component is not found. Please refer to the documentation for download instructions." I have removed all of the javascript in the form except this beginning code and it errors out. It worked before--thoughts????

    function FORM_OnAfterTransaction(data)
    {
     // was transaction successful
     if (formState.agsError)
     return;
     
     // remove all account descriptions
     //Bobby's customization
     for (var i=0; i<5; i++)
     {
      lawForm.setFormValue("text83","");
      lawForm.setDataValue("GDT-DESCRIPTION","",i);
     }
      //alert("after clearing acct descr"); 
       
    }

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      The error message you're getting isn't related to your script but to an IE plugin to check your JavaScript syntax. Look for that error on Lawson's knowledge base and you should find instructions on how to correct this.
      David Williams
      drhoades44
      Advanced Member
      Posts: 46
      Advanced Member
        Thanks! That fixed me. I did have to search for the second sentence in the error. FYI.
        mikeP
        Veteran Member
        Posts: 151
        Veteran Member
          I found the Lawson KB article before I came here, but it doesn't detail the settings needed, and I'm getting this error. I've tried it on two PCs, one with IE7, the other with IE8. Our design studio server has been added to trusted sites, and I've enabled every activeX and scripting setting I can find.

          Can anyone list the exact configuration items and their values needed to get this working?

          Thanks,

          Mike
          .
          mikeP
          Veteran Member
          Posts: 151
          Veteran Member
            I found it. In case anyone else runs in to this, the setting I enabled that cleared the error message is "Initialize and script activeX controls not marked as safe for scripting"

            There may be other required changes, but this one, which I did last, got it going.