How to refresh Dynamics NAV cache from SQL?

3.1k views Asked by At

I would like to know if somebody knows how Dynamics NAV cache works.

I'm really a beginner of NAV, but I tested this:

  • If I update or delete (not insert) a row in a table by SQL, NAV doesn't update its internal cache and sometimes refreshing its page I can see new data, for some table I have to restart the service.
  • I can setup more the one application server, they will be connected each other only by SQL database, I gather that application server can syncronize their cache using SQL tables (timestamps or metadata...).

My question is: is it possibile to force the cache expiration of internal NAV cache only by SQL? If no, how can two application server sync their cache?

I know that data manipulation via SQL is highly discouraged, but please help me to understand how it works. Thanks

2

There are 2 answers

0
sgralla On BEST ANSWER

You might want to take a look at the SELECTLATESTVERSION function.

1
Jason D. On

Might not be the solution for everyone, but I solved my issue in test by just restarting the "Microsoft Dynamics NAV Server" service. Again, this solution is not without its issues (kicking users off, etc.) but it was the solution for me.