How can I set field value to Null using Web Console ?
Hi, I am using the web console (F12) to update fields such as external id on subsidiary record. I cannot find how to set the value of this field back to Null. Any idea please ?
Here is the command to update :
require([‘N/record’, ‘N/currentRecord’]);
var record = require(‘N/record’);
var currentRecord = require(‘N/currentRecord’);
var myCurrentRecord = currentRecord.get();
var subsidiaryRecord = record.load({
type: record.Type.SUBSIDIARY,
id: myCurrentRecord.id
});
subsidiaryRecord.setValue({
fieldId: ‘externalid’,
value: ‘BBB‘
});
subsidiaryRecord.save();
Hi,
I’m afraid you can’t unset External IDs, you just have to set them to something else.
Thanks,
Chris
Thank you Chris. After more research I was close to this conclusion too. I will stop searching.