jarens
03/05/2020, 5:47 PMdmashburn3
03/05/2020, 5:52 PMrequire([
'N/record',
'N/runtime',
'N/search',
'N/query',
'N/email',
'N/https'
], function (
record,
runtime,
search,
query,
email,
https
) {
window['record'] = record;
window['runtime'] = runtime;
window['search'] = search;
window['query'] = query;
window['email'] = email;
window['https'] = https
})
dmashburn3
03/05/2020, 5:52 PMjarens
03/05/2020, 6:38 PMlet script = document.createElement('script');
script.id = 'netsuite-load-require';
script.innerHTML = setTimeout(function () {
var record, currentRecord, search;
//load modules
console.log('Check entry and 3 second delay');
require(['N/record', 'N/currentRecord', 'N/search'], function (r, c, s) {
//when loaded assign back to variables
record = r;
currentRecord = c;
search = s;
console.log("2.0 record/currentRecord/search modules loaded")
});
}, 3000);
(document.head || document.documentElement).appendChild(script);
jarens
03/05/2020, 6:38 PMjarens
03/05/2020, 6:39 PMSandii
03/05/2020, 6:40 PMmichoel
03/05/2020, 8:31 PMmichoel
03/05/2020, 8:33 PMmichoel
03/05/2020, 8:36 PMjarens
03/05/2020, 8:58 PMjen
03/05/2020, 11:01 PM