jen
08/31/2023, 4:36 PMError SuiteScript 2.1 entry point scripts must implement one script type function.
. If I comment out the two lines starting with md_ui
the error goes away, and lets me create the Client Script record. After that, I can uncomment those two lines, and my script executes as desired. Is NetSuite really not able to deal with something before the first “script type function”?
/**
* cl_product_ss2.1.js
*
* @NApiVersion 2.1
* @NScriptType ClientScript
*
* Custom Form Script for Product form
*
* Last modified 2023-08-28 JB
*/
define(['/SuiteScripts/2.0/module/md_integrity_ss2.1', '/SuiteScripts/2.0/module/md_ui_ss2.1'], function(md_integrity, md_ui) {
md_ui.hideChildRecordButtons('custrecord_defctrct_product');
md_ui.hideChildRecordButtons('custrecord_defuw_product');
function fieldChanged(context){ return true; } // placeholder
function pageInit(context) { return true; } // placeholder
function saveRecord(context) { return true; } // placeholder
/* Return the names of the functions. Note that these can be different from the
* actual names above, but for clarity let's keep them the same.
*/
return {
fieldChanged: fieldChanged,
pageInit: pageInit,
saveRecord: saveRecord
}
});
battk
08/31/2023, 4:39 PMbattk
08/31/2023, 4:39 PMbattk
08/31/2023, 4:40 PMbattk
08/31/2023, 4:40 PMbattk
08/31/2023, 4:40 PMbattk
08/31/2023, 4:41 PMbattk
08/31/2023, 4:42 PMbattk
08/31/2023, 4:42 PMEric B
08/31/2023, 5:03 PMjen
08/31/2023, 5:41 PMjen
08/31/2023, 5:42 PMbattk
08/31/2023, 9:24 PMif (typeof document !== 'undefined') {
}
JC
09/02/2023, 12:53 PM/**
* cl_product_ss2.1.js (TRY TO CHANGE THIS LINE TO THE BOTTOM)
*
* @NApiVersion 2.1
* @NScriptType ClientScript
*
* Custom Form Script for Product form
*
* Last modified 2023-08-28 JB
*/
(THIS SPACE HERE HAS FIXED THINGS FOR ME BEFORE)
define(['/SuiteScripts/2.0/module/md_integrity_ss2.1', '/SuiteScripts/2.0/module/md_ui_ss2.1'], function(md_integrity, md_ui) {