Search code examples
sql-servercachingdynamics-nav-2016

How to refresh Dynamics NAV cache from SQL?


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


Solution

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