let salesorderSearchObj = search.create({
type: “salesorder”,
settings:[{“name”:“consolidationtype”,“value”:“ACCTTYPE”}],
filters:
[
[“type”,“anyof”,“SalesOrd”],
“AND”,
[“status”,“anyof”,“SalesOrd:B”,“SalesOrd:D”,“SalesOrd:E”],
“AND”,
[“mainline”,“is”,“F”],
“AND”,
[“formulanumeric: {quantity} – {quantityshiprecv}”,“greaterthan”,“0”],
“AND”,
[“formulanumeric: {quantity}-nvl({quantityshiprecv},0)-nvl({quantitycommitted},0)”,“equalto”,“0”],
“AND”,
[“location”,“anyof”,“1”],
“AND”,
[“applyingtransaction.type”,“anyof”,“ItemShip”],
“AND”,
[“applyingtransaction.status”,“anyof”,“ItemShip:B”]
// “AND”,
// [“internalid”,”anyof”,”10736″]
],
columns:
[
search.createColumn({
name: “tranid”,
summary: “GROUP”,
label: “Document Number”
}),
search.createColumn({
name: “trandate”,
summary: “GROUP”,
label: “Date”
}),
search.createColumn({
name: “entity”,
summary: “GROUP”,
label: “Name”
}),
search.createColumn({
name: “location”,
summary: “MAX”,
label: “Location”
}),
search.createColumn({
name: “internalid”,
summary: “GROUP”,
label: “Internal ID”
}),
search.createColumn({
name: “tranid”,
join: “applyingTransaction”,
summary: “GROUP”,
label: “IF Document Number”
})
]
});