Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
How to resolve the User Event Script error in line 144
Hello,
The following is a User Event Script used to Create An Inventory Item upon button push from a Custom Record Form
/**
*@NApiVersion 2.x
*@NScriptType ClientScript
*/
define(["N/ui/dialog", "N/ui/message", "N/search", "N/record", "N/currentRecord"], runScript);
function runScript(dialog, message, search, record, currentRecord){
// /**
// * @param {ClientScriptContext.saveRecord} context
// */
return{
saveRecord: function (context){
var title = 'saveRecord() :: ';
try {
var currentRecord = context.currentRecord;
var ReqRec = currentRecord.id;
log.debug({
title: "Rec Id",
details: ReqRec
});
console.log(ReqRec);
var TrfLinesRec = {};
var subsidiary = currentRecord.getValue("custrecord_itbs_cps_subsidary__");
var reqtranid = currentRecord.getValue("custrecord122");
if (reqtranid) {
var transRec = record.load({
type: "customrecord_cps_contrat_de_vente_a_reme",// contrat de vente id