How to work with sublist with type "list" using suitescript 2.0 while creating a new record ? Any help will be appreciated
autoPack=record.create({
type: 'customrecord_sps_package',
isDynamic:true
});
autoPack.setValue('custrecord_sps_package_box_type',packageDefinitionId);
autoPack.setValue('custrecord_sps_package_qty',itemQty);
autoPack.setValue('custrecord_sps_pack_asn',itemFullfilmentId);
autoPack.setSublistValue({
sublistId: 'custpage_package_content',
fieldId: 'include_in_package',
value: true,
line: 0
});
autoPack.save();
I am trying this but it throws Error