why am i getting this error? TypeError: Cannot fin...
# suitescript
l
why am i getting this error? TypeError: Cannot find function setSublistValue in object dynamic record. Here is my code
c
dynamic mode is like you're acting on the record in the UI. You need to select a line, setCurrentSublistValue and then commit the line.
l
gotcha thanks
s
simpler solution - don't use dynamic mode if you can avoid it.
c
also that
l
hey guys will this work ?
im still getting an error when i try this
s
I don't think you can set commitinventory?
c
Copy code
var to_record = record.load({
	type: record.Type.TRANSFER_ORDER,
	id: transaction_id
});


to_record.setSublistValue({
	sublsitId: 'item',
	fieldId: 'commitinventory',
	line: line_id,
    value: 3
});


to_record.save();
Not sure if you can set commitinventory but you don't need dynamic mode for this
l
Thank you for your help guys. I didnt know i wasnt able to update commitinventory
s
typically you'd just update
quantity