Anveo Mobile App / Best Practices / How to Deal with FlowFields

How to Deal with FlowFields

The calculation of FlowFields takes a lot of time in Microsoft Dynamics NAV 2017, so you cannot update all FlowFields every time you synchronize. It is also not recommended to run RECALCFIELDS after each posting routine. This would result in a long synchronization process which is not good for the user experience. There are other options available for FlowFields.

Nightly Recalculation of FlowFields

We recommend to create a new, normal field in your Microsoft Dynamics NAV 2017 table that stores the value you want to send to the user. In a nightly task you recalculate the FlowField. If the value has changed, update your new field and do a ”MODIFY”. This sigificantly reduces data traffic.

Use of an Online Fields

You may also use online fields Online Fields to display the value of FlowField. The field value will be automatically updated in the app independent of synchronization. Read more about Online Fields and how to set them up here.

Request a Recalculation

Sometimes it is required to have live data available. In this case, you can request a resend of FlowField data. Of course, an online connection is required to do so. First step is to provide a button in your user interface with an Action Code that marks your FlowField. A synchronization will be started immediately.

Anveo Script Code example to mark FlowField Inventory of table Item.

Next time you synchronize, you can do the recalulation in codeunit ACF App Events.

C/AL Code example to recalculate FlowField Inventory of table item.