Kenneth Jules
10/12/2022, 4:06 PMfunction getItemFulfillments(salesOrderID) {
// Call itemfulfillments based on sales order id
var itemfulfillmentSearchObj = search.create({
type: "itemfulfillment",
filters: [
["type", "anyof", "ItemShip"],
"AND",
["appliedtotransaction.type", "anyof", "SalesOrd"],
"AND",
["appliedtotransaction.internalid", "anyof", "175216"]
],
columns: [
search.createColumn({
name: "internalid",
summary: "GROUP",
})
]
});
var searchResultCount = itemfulfillmentSearchObj.runPaged().count;
log.debug("itemfulfillmentSearchObj result count", searchResultCount);
itemfulfillmentSearchObj.run().each(function (result) {
var ifid = result.getValue({
name: 'id'
});
log.debug('ifid', ifid); // debugs ifid twice with blank details
return true;
});
}
battk
10/12/2022, 4:18 PMbattk
10/12/2022, 4:20 PMKenneth Jules
10/12/2022, 4:21 PMcreece
10/12/2022, 4:22 PMKenneth Jules
10/12/2022, 6:08 PM