Azi
06/26/2018, 3:37 PMrequire(['N/record', 'N/search'],
function (record, search) {
var rec = record.create({
type: record.Type.SALES_ORDER,
isDynamic: true,
defaultValues: {
entity: 1707657
}
})
rec.selectNewLine({
sublistId: 'item'
});
rec.setCurrentSublistValue({
sublistId: 'item',
fieldId: 'item',
value: 94230
});
var sublistValue = rec.getCurrentSublistValue({
sublistId: 'item',
fieldId: 'rate'
});
var stopper = 0
})
I went to the conversion chart in the help center, and this should be the equivalent 1.0 code, but this doesn't work in the debugger.
var initvalues = new Array();
initvalues.recordmode = 'dynamic';
initvalues.entity = 1707657;
// create sales order and pass values stored in the initvalues array
var rec = nlapiCreateRecord('salesorder', initvalues);
nlapiSelectNewLineItem('item')
nlapiSetCurrentLineItemValue('item', 'item', 94230)
var sublistValue = nlapiGetCurrentLineItemValue('item', 'rate')
var stopper = 0
Any ideas where I may be going wrong?