Artur_K
04/29/2022, 1:28 PMCorey Schwoebel
04/29/2022, 1:58 PMArtur_K
04/29/2022, 2:02 PM/**
*@NApiVersion 2.0
*@NScriptType UserEventScript
*@NModuleScope SameAccount
*/
define(['N/ui/serverWidget', 'N/record', 'N/runtime', 'N/email', 'N/search', '/SuiteScripts/third-party-doc/lib/moment.min'], function(form, record, runtime, email, search, moment) {
function beforeLoad(context) {
var form = context.form;
var field = form.addField({
id: 'custpage_code',
type: 'inlinehtml',
label: 'Code'
});
field.defaultValue = '<script>' +
'document.getElementByClassName("uir-record-id").style.display = "none";' +
'</script>';
}
return {
beforeLoad: beforeLoad,
}
});
Artur_K
04/29/2022, 2:06 PM'document.getElementByClassName("uir-record-id").style.display = "none";' +
must be:
'document.getElementsByClassName("uir-record-id")[0].style.display = "none";' +
Corey Schwoebel
04/29/2022, 2:24 PM