This topic contains 1 reply, has 0 voices, and was last updated by MChammaTX 6 years, 7 months ago.

  • Author
    Posts
  • #21327

    jackbrown391

    tl;dr: We have an Online Custom Record Form with a client script that requires the 'N/record' module and runs on saveRecord. We get a permission error when the script executes, but we don't know who to grant the proper permission to.

    Details:

    We have an Online Custom Record Form which we use to update the warehouse locations of our inventory. Upon submission of the form, I have a client script (via the saveRecord entry point) which is supposed to take the given item number, load its record via the N/record module, and update its warehouse location with the one given in the form.

    After clicking the form's "Submit" button, a browser alert box appears which reads:

    From forms.na3.netsuite.com

    An unexpected error occurred in a script running on this page.

    undefined (saveRecord)

    JS_EXCEPTION

    INSUFFICIENT_PERMISSION Permission Violation: You need the 'Lists -> Items' permission to access this page.

    Please contact your account administrator.

    [END OF DIALOG]

    While the cause of and the solution to the error seem straightforward, the administrator and I cannot seem to identify who needs this permission. He thought there was a "web" user of sorts, but he could not find such a user in the system.

    My question: who is the "user" of the Online Custom Record Forms? Can we set that user's permissions?

    Thanks for your help!
    This is a cached copy. Click here to see the original post.

  • #21328

    MChammaTX

    I'm not sure what permission set applies but there are a few ways to work around permission issues like these such as:move your code to beforeSubmit and run script as Admin
    call a Suitelet from the client and run as Admin
    If you need data from the record in question you can load in beforeLoad and pass the needed data to the browser in a hidden field.

You must be logged in to reply to this topic.