This topic contains 2 replies, has 0 voices, and was last updated by TheUsualSuspect 7 years, 3 months ago.

  • Author
    Posts
  • #18300

    ajrey77

    I have a pageInit function that runs and I want it to prevent a fieldChanged function from running when the pageInit function evaluates to a certain value. How would I stop the fieldChanged from firing from within the pageInit function?
    This is a cached copy. Click here to see the original post.

  • #18301

    erictgrubaugh

    You cannot prevent NetSuite from firing events. `fieldChanged` will always get fired so that all Client Scripts relying on that event will still execute properly. The burden will be on your `fieldChanged` handler to decide when it should execute and when it should bail early.

  • #18302

    TheUsualSuspect

    I might get banned from this board for suggesting this unless I specifically mark this as a joke

    Overwrite the fieldChanged function with a blank function when you want it to not fire and reassign afterwards

    To be real though, you can use the ignoreFieldChange attributes in 1.0 or 2.0 to get around most field change issues. Is this not sufficient for what you’re trying to do?

You must be logged in to reply to this topic.