var accountingPref = config.load({
type: config.Type.ACCOUNTING_PREFERENCES
});
accountingPref.setValue({
fieldId: ‘CLASSMANDATORY’,
value: true
});
accountingPref.save();
Note: The practice of customizing accounting preferences is not advisable. Please refrain from updating accounting preferences using scripts.