Michael Pope
07/30/2026, 3:28 PMcurrentRecord.getSubrecord({fieldId: 'inventorydetail'}) I get an error saying org.mozilla.javascript.EcmaError: ReferenceError: \"document\" is not defined. (INVOCATION_WRAPPER#7). I do not get this when invoking the Suitescript 1 Client script with the corresponding function nlapiViewSubrecord("inventorydetail"). Any ideas on how to resolve this?Anthony OConnor
07/30/2026, 3:47 PMAnthony OConnor
07/30/2026, 3:50 PMAnthony OConnor
07/30/2026, 3:50 PMMichael Pope
07/30/2026, 3:57 PMMichael Pope
07/30/2026, 3:58 PMAnthony OConnor
07/30/2026, 4:00 PMAnthony OConnor
07/30/2026, 4:03 PMMichael Pope
07/30/2026, 4:07 PMAnthony OConnor
07/30/2026, 4:08 PMMichael Pope
07/30/2026, 4:15 PMAnthony OConnor
07/30/2026, 4:26 PMMichael Pope
07/30/2026, 4:38 PMMichael Pope
07/30/2026, 4:38 PM/**
* @NApiVersion 2.1
* @NScriptType ClientScript
* @NAmdConfig /SuiteScripts/ScriptsConfig.json
*
* TODO
*
*/
define( [] ,
function () {
return {
pageInit: function(context)
{
var currentRecord = context.currentRecord;
console.log(currentRecord.getSubrecord({fieldId: 'inventorydetail'}))
}
}
});Michael Pope
07/30/2026, 4:42 PMAnthony OConnor
07/30/2026, 5:11 PMAnthony OConnor
07/30/2026, 5:12 PMMichael Pope
07/30/2026, 5:13 PMbattk
07/31/2026, 2:52 PMMichael Pope
07/31/2026, 6:34 PMAnthony OConnor
07/31/2026, 6:40 PMAnthony OConnor
07/31/2026, 6:40 PMbattk
07/31/2026, 6:49 PMbattk
07/31/2026, 6:51 PMMichael Pope
07/31/2026, 7:09 PMMichael Pope
07/31/2026, 7:11 PM