I am trying to reference a custom user module in a SS2.0 index script like so:
/**
* @NApiVersion 2.x
* @NScriptType Restlet
*/
define([
'N/record', 'N/error', "SuiteScripts/MyFolder/src/My_Controller", 'N/crypto',
Which works fine in sandbox. However when we deploy to production (bundle push) we get the following error when we call a RESTlet method:
You do not have permission to load this module SuiteScripts/MyFolder/src/My_Controller.js, it has an @NModuleScope of SameAccount which restricts its availability to customization objects created in account 1234566
All we did was:
- create a RESTlet using our index file (SS2.0 does not allow you to define libraries)
- deploy/bundle RESTlet
- Upload the custom user modules (My_Controller.js) manually to the cabinet with Eclipse to the production account (CTRL+U)
- Call a method on RESTlet (in production) using Postman
Can anyone see what we are doing wrong? Thank you