Sim Greenbaum
08/08/2023, 9:54 PMvar data = JSON.parse(context.value);
log.debug("testing ..", data);
try {
record.submitFields({
type: record.Type.CASH_SALE,
id: data.id,
values: {
istaxable: "F",
},
});
} catch (error) {
log.debug("testing ..", error);
}Anthony OConnor
08/08/2023, 10:47 PMistaxable isn't available as either a search filter or column per the record browser
https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2023_1/script/record/transaction.html
and it also appears that for cash sales istaxable cannot be targeted by submitFields
https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2023_1/script/record/cashsale.html
so...
you're gonna have to come up with other search filters, or maybe you could switch to using the n/query module?
and then when you have your result set you're going to have to load the record, get the value of istaxable and if its not false then set it to false with a setValue, and then do a record.saveWatz
08/09/2023, 5:48 AMWatz
08/09/2023, 5:51 AMrecord.submitFields({
type: record.Type.CASH_SALE,
id: data.id,
values: {
istaxable: false,
},
});Sim Greenbaum
08/09/2023, 4:22 PMWatz
08/09/2023, 4:26 PMSim Greenbaum
08/09/2023, 4:27 PMAnthony OConnor
08/09/2023, 4:32 PMWatz
08/09/2023, 5:10 PM