We usually get the item line and the item orderline when loading the item receipt and the Item fulfillment.
We can also get these through a search by doing a joint search to Applied To Transaction. The Line and borderline search columns are bolded in the search given below.
let transactionSearchObj = search.create({
type: "transaction",
filters:
[
["type", "anyof", "ItemRcpt"],
"AND",
["taxline", "is", "F"],
"AND",
["cogs", "is", "F"],
"AND",
["shipping", "is", "F"],
"AND",
["internalid", "anyof", irId]
],
columns:
[
search.createColumn({ name: "tranid", label: "Document Number" }),
search.createColumn({ name: "item", label: "Item" }),
search.createColumn({ name: "type", join: "item", label: "itemtype" }),
search.createColumn({ name: "quantity", label: "quantity" }),
search.createColumn({ name: "inventorynumber", join: "inventoryDetail", label: "Lot Number" }),
search.createColumn({ name: "expirationdate", join: "inventoryDetail", label: "Expiration Date" }),
search.createColumn({ name: "quantity", join: "inventoryDetail", label: "Quantity" }),
search.createColumn({ name: "line", label: "line" }),
search.createColumn({ name: "line", join: "appliedToTransaction", label: "orderline" }),
search.createColumn({ name: "internalid", join: "createdFrom", label: "orderid" })
]
});