ThaFunk
06/01/2022, 5:55 PM/**
* @NApiVersion 2.1
* @NScriptType ClientScript
*/
define (['N/record'], (record) => {
var exports = {};
function pageInit(context) {
const myRecord = context.currentRecord;
const myRecordFieldA = myRecord.getField({
fieldId: 'custbody_use_customer_label'
});
/* const myRecordFieldB = myRecord.getField({
fieldId: 'defaultshipping'
});*/
myRecordFieldA.isDisabled = true;
// myRecordFieldB.isDisabled = true;
}
exports.pageInit = pageInit;
return exports;
});
ThaFunk
06/01/2022, 6:08 PMSandii
06/01/2022, 6:26 PMcontext.form
insteadThaFunk
06/01/2022, 6:43 PMraghav
06/01/2022, 6:44 PMSandii
06/01/2022, 6:49 PMcontext.currentRecord.getField(fieldId)
should be the correct syntaxThaFunk
06/01/2022, 6:54 PMThaFunk
06/01/2022, 6:55 PMbattk
06/02/2022, 2:51 AMNElliott
06/02/2022, 7:43 AMraghav
06/02/2022, 7:48 AMNElliott
06/02/2022, 7:56 AMbattk
06/02/2022, 8:00 AMbattk
06/02/2022, 8:05 AMraghav
06/02/2022, 8:11 AMNElliott
06/02/2022, 8:12 AMbattk
06/02/2022, 8:18 AMbattk
06/02/2022, 8:19 AMbattk
06/02/2022, 8:20 AMcustbody_use_customer_label
exists and defaultshipping
does notbattk
06/02/2022, 8:24 AMbattk
06/02/2022, 8:25 AMNElliott
06/02/2022, 8:25 AM