Faiz Byputra
04/29/2025, 6:25 AMconst getInputData = () => {
const sqlQuery = `
select id from transaction where type = 'InvAdjst' and trandate >= TO_DATE('23-04-2025', 'DD-MM-YYYY')
`;
const queryResult = query.runSuiteQLPaged({ query: sqlQuery, pageSize: 1000 });
return queryResult;
};
const map = (context) => {
try {
const result = context.value;
const internalId = result.id;
const invAdj = record.load({
type: record.Type.INVENTORY_ADJUSTMENT,
id: internalId,
});
invAdj.save();
} catch (e) {
log.error("Error Resaving Record", e);
}
};