MR
05/14/2020, 3:40 PMfunction fieldChanged(data) {
if (data.fieldId == "custcol_item_id") {
var line = data.line;
var val = 5;
data.currentRecord.selectLine({
sublistId: 'item',
line: line
});
data.currentRecord.setCurrentSublistValue({
sublistId: "item",
fieldId: "cust_integer_field",
value: val
});
data.currentRecord.commitLine({
sublistId:'item'
});
}
}
This actually works, but the commitLine() jumps to the next line of the sublist and throws an error that required fields are empty. If I remove the commitLine(), then the field I need set in the current/selected line doesn't actually set/populate
Any ideas? Is fieldChanged the best entry point for this? Thank you!battk
05/14/2020, 3:50 PMbattk
05/14/2020, 3:51 PMMR
05/14/2020, 3:56 PMbattk
05/14/2020, 3:56 PMMR
05/14/2020, 3:57 PMMR
05/14/2020, 3:58 PMvar val = 5;
data.currentRecord.setCurrentSublistValue({
sublistId: "item",
fieldId: "cust_integer_field",
value: val
});
It doesn't set the field. That is what led me to trying to select and commit the lineSandii
05/14/2020, 4:00 PMMR
05/14/2020, 4:02 PMMR
05/14/2020, 4:03 PMMR
05/14/2020, 4:04 PMbattk
05/14/2020, 4:11 PMMR
05/14/2020, 6:16 PMbattk
05/14/2020, 6:25 PM