Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Don’t miss your chance to meet our SuiteGurus—NetSuite Support professionals and subject matter experts with extensive experience in select product areas, including OneWorld, Advanced & Basic Accounting, Supply Chain Management, Receivables & Payables, CRM, Account Administration, and the SuiteCloud Platform. Full Conference attendees can prebook exclusive 30-minute one-on-one sessions for your product questions.
Spots are limited! Register through your Agenda Builder and find SuiteGuru under Agenda Enhancements.
SuiteScript 2.1 error SUITESCRIPT_API_UNAVAILABLE_IN_DEFINE
I have started creating some SS 2.1 API scripts and came across an error I haven't seen documented anywhere yet.
Most of my existing scripts are defined as API version 2.x, so they continue to be executed as if they were 2.0 (until 2021.1 release as I understand).
Some of those scripts are custom modules that I load into other scripts, here is an example:
/**
* @NApiVersion 2.x
*/
define(['N/config'], function (config) {
var preferences;
function load() {
if (!preferences)
preferences = JSON.parse(config.load({ type: config.Type.COMPANY_PREFERENCES }).getValue({ fieldId: 'custscript_preferences' }));
return preferences;
}
return {
load: load,
};
});
Below is how I'm attempting to use the module in a SS 2.1 User Event script: