MUHAMMAD MUBUSHER ASLAM
07/01/2021, 12:47 AMrecord.transform
battk
07/01/2021, 12:47 AMMUHAMMAD MUBUSHER ASLAM
07/01/2021, 1:01 AMvar fulfillment = record.transform({
fromType: record.Type.SALES_ORDER,
fromId: transaction.id,
toType: record.Type.ITEM_FULFILLMENT
});
fulfillment.setValue({ fieldId: 'status', value: 'ItemShip: C' });
// add packages here
for (var i = 0; i < lineItems.length; i++) {
fulfillment.selectNewLine({ sublistId: 'package' });
fulfillment.setCurrentSublistValue({ sublistId: 'package', fieldId: 'packageweight', value: lineItems[i]['LineDetails'][0].NetWeight, forceSyncSourcing: true });
fulfillment.setCurrentSublistValue({ sublistId: 'package', fieldId: 'packagedescr', value: lineItems[i].CustomerPartNumber, forceSyncSourcing: true });
fulfillment.setCurrentSublistValue({ sublistId: 'package', fieldId: 'packagetrackingnumber', value: lineItems[i]['LineDetails'][0].TrackingNumber, forceSyncSourcing: true });
// Commit Line
fulfillment.commitLine({ sublistId: 'package' });
}
battk
07/01/2021, 1:04 AMMUHAMMAD MUBUSHER ASLAM
07/01/2021, 1:07 AMbattk
07/01/2021, 1:09 AMMUHAMMAD MUBUSHER ASLAM
07/01/2021, 1:12 AMrec.insertLine({"sublistId": "package", "line": 0});
rec.setSublistValue({"sublistId": "package", "fieldId": "itemReceive", "value": true, "line": 0});
rec.setSublistValue({"sublistId": "package", "fieldId": "quantity", "value": 5, "line": 0});
battk
07/01/2021, 1:13 AMbattk
07/01/2021, 1:13 AMKevin
07/01/2021, 4:10 AM