First load the record in dynamic mode.To select the new line at the end of a sublist in any record we can use,record.selectNewLine(options).After selecting the new line in sublist, set the sublist value using,objRecord.setCurrentSublistValue(options).Then to commits the currently selected line on the sublist use,objRecord.commitLine(options)Finally save the record. Example code of estimate record is added below.
Tag: sublist field update
Change Tracking number value from Package sublist in IF record
//Info: HL-140 Changing Sublist fields does not always operate as expected in some circumstances.One example is updating the tracking number in the Item Fulfillment record. Along with the regular rec.setCurrentSublistValue, we must include rec.selectLine and rec.commitLine routines as this field change dynamically.
Calculate volume and weight on a sales order’s item sublist.
Sales order item sublist and body field update on client script’s save action.