FORM_OnAfterFrameworkInit() trouble

Sort:
You are not authorized to post a reply.
Author
Messages
Jeff DeWitt
New Member
Posts: 2
New Member
    I am trying to hide a button (Change) on a form before the user has access to the button (I'll show it later if the data indicates the button should be allowed).  I believe the best place to do this will be in the FORM_OnAfterFrameworkInit() method.  Unfortunately, I can not seem to get even an alert("Here"); to work in my form to confirm that this function is even working.  The Add and Change buttons are getting put on the screen so I am sure this step in the form loading process is happening.  Does anyone have any thoughts as to why this doesn't seem to be working?

    Code:

    function FORM_OnAfterFrameworkInit(){
           alert("FORM: onAfterFrameworkInit");
    )

    I have other form event functions working properly with the same code, just different form event function (FORM_OnInit(), FORM_OnBeforeTransaction(fc)...), but this one does not seem to be happening.

    Thanks,

    Jeff
    ShawnV
    Advanced Member
    Posts: 37
    Advanced Member
      I was able to get an alert to display in my OnAfterFrameworkInit. If the above code sample is copied right from your code, you may want to check your closing curly brace for the function. You have a ")" instead of a "}".
      Jeff DeWitt
      New Member
      Posts: 2
      New Member
        Thanks for the quick response!

        The bottom curly brace was a typo in the post, I copied the top section and missed the closing brace.

        Are you running 9.0.1?

        Jeff
        David Williams
        Veteran Member
        Posts: 1127
        Veteran Member
          Lawson changed some form behaviors recently. Try using onafterdatainit.
          David Williams
          Deb Avery
          New Member
          Posts: 1
          New Member
            I am having a similar issue - we patched to 9.0.1.5 and have a custom form built for EE20.3.  There were quite a few changes to this form and I am trying to fix my custom form now.  I have a function that will clear the toolbar so it is not visible to the end users, but it is not working now.  It was doing this function OnAfterFrameworkInit and I moved it to OnAfterDataInit, but it is not working.  Does any one have any suggestions on how I can fix this?  Thanks.
            You are not authorized to post a reply.