pen one
01/19/2023, 8:50 PMfunction getInputData() {
var searchObj = search.create({
type: search.Type.SALES_ORDER,
filters: [
["custbody_show_name","anyof","7253"],
"AND",
["custbody131","anyof","72"]
],
columns: [
search.createColumn({
name: "internalid"
}),
search.createColumn({name: "custbody_sop"})
]
});
return searchObj;
}
function map(context) {
var salesOrderId = context.id;
log.debug("Found Sales Order with ID: ", salesOrderId);
var newSalesOrder = record.copy({
type: record.Type.SALES_ORDER,
id: salesOrderId
});
ehcanadian
01/19/2023, 8:52 PMcontext.key
, not ideblackey
01/19/2023, 9:00 PMpen one
01/19/2023, 9:02 PMeblackey
01/19/2023, 9:02 PMpen one
01/19/2023, 9:02 PMNElliott
01/20/2023, 9:00 AMreptar
01/20/2023, 4:13 PMThe snippet logs data only if an error was thrown during a previous invocation of the map function for the same key/value pair currently being processed.
, but sounds bad lol