Hi All , I'm setting a value in lineitem field lik...
# suitescript
d
Hi All , I'm setting a value in lineitem field like so var today = new Date(); objLoadRecord.selectLine({ sublistId: 'item', line: 0 }); objLoadRecord.setCurrentSublistValue({ sublistId: 'item', fieldId: 'field_id', value: today, ignoreFieldChange: true }); objLoadRecord.commitLine({ sublistId: 'item' }); Instead of setting today's date the value that got set in the field is 23/3/2021 which is super weird can you please let me know what could the reason for this be? the order was created on 23/03/2021 and I ran a scheduled script to set the date could that be the reason??
b
may want to try without ignoreFieldChange
if its a native field you are setting, make sure it has no functionality related to the transaction's date
otherwise make sure there are no scripts that affect that date
d
@battk That is a native field and it has no functionality but i'll give it a try without "ignoreFieldChange". thanks for the input