Chris
05/30/2020, 2:12 AMpageInit
function to fire on a client script. I can see the function in the debugger tools and put a break point on it but it never fires. I have a nearly identical function in another script that works great. I can't understand what might be going on...battk
05/30/2020, 2:18 AMChris
05/30/2020, 2:22 AMChris
05/30/2020, 2:22 AMbattk
05/30/2020, 2:25 AMChris
05/30/2020, 2:29 AMbattk
05/30/2020, 2:30 AMChris
05/30/2020, 2:31 AM/**
* @NApiVersion 2.x
* @NScriptType ClientScript
*/
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
define(["require", "exports", "N/currentRecord", "N/https", "N/runtime", "N/log", "N/url", "N/error", "N/ui/message"], function (require, exports, currentRec, https, runtime, log, url, error, message) {
Object.defineProperty(exports, "__esModule", { value: true });
currentRec = __importStar(currentRec);
https = __importStar(https);
runtime = __importStar(runtime);
log = __importStar(log);
url = __importStar(url);
error = __importStar(error);
message = __importStar(message);
var RESTLET_SCRIPTID = 'customscript_ds_restlet';
var RESTLET_DEPLOYMENTID = 'customdeploy_ds_restlet';
var SUITELET_SCRIPTID = 'customscript_ds_config_sl';
var SUITELET_DEPLOYMENTID = 'customdeploy_ds_config_sl';
var API_SUITELET_SCRIPTID = 'customscript_ds_api_sl';
var API_SUITELET_DEPLOYMENTID = 'customdeploy_ds_api_sl';
var endpoint;
(function (endpoint) {
endpoint[endpoint["restlet"] = 0] = "restlet";
endpoint[endpoint["suitelet"] = 1] = "suitelet";
endpoint[endpoint["api_suitelet"] = 2] = "api_suitelet";
endpoint[endpoint["landingpage"] = 3] = "landingpage";
})(endpoint || (endpoint = {}));
exports.pageInit = function (context) {
// this is a necessary placeholder. This will compile without this
// function but NetSuite will not allow the file to be uploaded to
// the file cabinet without at least one formal script entry point.
var otcError = context.currentRecord.getValue('custpage_onetimeconfig_error');
var acctChangeError = context.currentRecord.getValue('custpage_accountchanged_error');
if (otcError) {
var myMsg = message.create({
title: 'Configuration Needed',
message: otcError.toString(),
type: message.Type.WARNING
});
// show the message for 15 seconds
myMsg.show({ duration: 15000 });
}
if (acctChangeError) {
var myMsg = message.create({
title: 'Account Has Changed',
message: acctChangeError.toString(),
type: message.Type.WARNING
});
// show the message for 30 seconds
myMsg.show({ duration: 30000 });
}
};
}
battk
05/30/2020, 2:34 AMChris
05/30/2020, 2:34 AMChris
05/30/2020, 2:34 AMChris
05/30/2020, 2:34 AMbattk
05/30/2020, 2:38 AMbattk
05/30/2020, 2:38 AMChris
05/30/2020, 2:39 AMChris
05/30/2020, 2:39 AMChris
05/30/2020, 2:39 AMbattk
05/30/2020, 2:55 AMbattk
05/30/2020, 2:55 AMChris
05/30/2020, 2:58 AMerictgrubaugh
05/31/2020, 3:07 PMpageInit