Forums / SmartComponent Library - Developer Forum / How to total /.accumulate entity table fields

How to total /.accumulate entity table fields

2 posts, 0 answered
  1. Carl Verbiest
    Carl Verbiest avatar
    59 posts
    Registered:
    12 Oct 2018
    13 Jul
    Link to this post
    Use case :

    VAT declaration needs to process all invoices of a period.

    This can be thousands of entity tabel records,
    loading them all in memory will probably cause them to be written to disk.


    Should we batch or not ?
    If batching, can we / should we keep the BusinessEntity+DataAcess alive for faster processing of next batch ?
  2. Mike Fechner
    Mike Fechner avatar
    263 posts
    Registered:
    14 Sep 2016
    13 Jul in reply to Carl Verbiest
    Link to this post
    "Should we batch or not ?"

    That really depends on size :) But probably yes.

    Assuming this is executed from a Business Task on the backend, successive calls to the Business Entity (via DatasetModel or any other method) should always be reusing the same instance anyway - as we're still within the same request. 
2 posts, 0 answered