Process x number of records at a time.

mo_xmo_x Member Posts: 50

We have an outgoing WS call to an external system, where we send one customer at a time. Now the table is really big, and we want to send a list of customers, say 50 records per call. What is the best way to process x number of customers? can we set any filters on any fields? I tried to use counter +=1, but what if the remaining customers are less then 50, then it will not process the remaining.


  • vaprogvaprog Member Posts: 1,091
    There are many ways you can go about doing this. Which one is best depens on many unknowns.

    Obvoiusly, if you want to use a counter, you ought to send whichever records you collected when the buffer is full (i.e. the counter reached 50) and also when there are no more records to include into the buffer.

    (Obviously what I call buffer here does not need to be anything physical. It simply denotes the collection of records to send).

    Another way to count some records is to use NEXT(batchSize) with batchSize the number of records to send. Then you can create a filter with the customer numbers from before and after the call to NEXT.
Sign In or Register to comment.