alien4u
07/14/2022, 11:08 AMDiderik
07/14/2022, 11:35 AM//Arbitrary rate
const rate = 123;
// Its the last item on the transaction
const lineCount = currentRecord.getLineCount({ sublistId: "item" });
currentRecord.selectLine({ sublistId: "item", line: lineCount - 1 });
currentRecord.setCurrentSublistValue({
sublistId: "item",
fieldId: "rate",
value: rate,
});
currentRecord.commitLine({ sublistId: "item" });
alien4u
07/14/2022, 11:40 AMalien4u
07/14/2022, 11:40 AMDiderik
07/14/2022, 11:41 AMDiderik
07/14/2022, 12:07 PMsetCurrentSublistValue
to set it, but it stays the same price level. If use getCurrentSublistValue
immediately after to get the price level it gives me an empty string.alien4u
07/14/2022, 1:21 PM.setSublistValue({
sublistId: 'item',
fieldId: 'price',
value: '-1'
});
My bad is an string ^^^alien4u
07/14/2022, 1:21 PMDiderik
07/14/2022, 2:11 PMfindSublistLineWithValue
to get the line of the item I just added I get -1.
So it feels like it can't properly access the sublist or somethingDiderik
07/14/2022, 2:20 PMDiderik
07/14/2022, 3:22 PM