Hi All, I am trying to create standalone credit me...
# suitescript
s
Hi All, I am trying to create standalone credit memo via suite script 2.0 but getting the error meesage 'You have entered an Invalid Field Value 9961 for the following field: item'. Please help. creditMemo.selectNewLine({ sublistId: 'item' }); creditMemo.setCurrentSublistValue({ sublistId: 'item', fieldId: 'item', value: 9961 }); creditMemo.setCurrentSublistValue({ sublistId: 'item', fieldId: 'quantity', value: 1 }); creditMemo.setCurrentSublistValue({ sublistId: 'item', fieldId: 'amount', value: refundAmount }); creditMemo.commitLine({ sublistId: 'item' });
b
more code needed
dynamic mode requires you to set fields in the correct order
set the fields in the same order you would in the ui
l
Did you add Customer first? and correct subsidiary?
s
@battk @Lincecum Thank you. It worked