Sending NetSuite Grouped Records as a Batch
Hi all,
I have a question regarding the handling of invoice data fetched from a saved search in NetSuite. Currently, I am grouping the rows so that all invoices with the same ID are grouped together. However, in subsequent steps, the flows are processed per group. If I disable ‘group rows’, it processes each invoice line separately.
Is there a way, when grouping invoices, to run the complete page once without separately processing every group?
Thanks for your help!
-
Nuri Ensing why do you need to run the complete page once? What behavior would you want if there are multiple pages? Are you trying to take some kind of single action step?
0 -
Hello Tyler,
I am working this flow and came to Nuri with this question. We need to make an external HTTP call that returns an ID. The current behavior is causing Celigo to run that step once per invoice, and we need it to run once per page. If there are multiple pages, making that call additional times is acceptable.
Thanks
0 -
Nuri Ensing Gabriel Borja you can make 1 call per page of records by adding your record index and page index into your record data with a preSavePage script. After doing that, you would put input filters on your flow steps where you want the page to run one time and your input filter would be recordIndex = 0. After that, you can then use a postResponseMap script to add the output of that import/lookup step to all records within the page.
function preSavePage (options) {
for (let [index,d] of options.data.entries()) {
d.recordIndex = index;
d.pageIndex = options.pageIndex;
}
return {
data: options.data,
errors: options.errors,
abort: false,
newErrorsAndRetryData: []
}
}0
Please sign in to leave a comment.
Comments
3 comments