Sending NetSuite Grouped Records as a Batch

Comments

3 comments

  • Tyler Lamparter Principal Product Manager
    Awesome Follow-up
    Engaged
    Top Contributor
    Answer Pro
    Celigo University Level 4: Legendary

    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
  • Gabriel Borja

    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
  • Tyler Lamparter Principal Product Manager
    Awesome Follow-up
    Engaged
    Top Contributor
    Answer Pro
    Celigo University Level 4: Legendary

    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.