Refresh caches in Dynamics 365 Finance and Operations

Sometimes, it is necessary to refresh different types of caches in the system. In Ax 2012 you can do it from the development workspace: Tools - Caches and select the required option.


In D365 we can clear or refresh the cache types using the following commands in the browser:
  • Refresh dictionary:                                                                        https://ENVIRONMENT_URL/?mi=SysClassRunner&cls=SysFlushDictionary
  • Refresh data:
    https://ENVIRONMENT_URL/?mi=SysClassRunner&cls=SysFlushData
  • Refresh elements:
    https://ENVIRONMENT_URL/?mi=SysClassRunner&cls=SysFlushAOD
Note: The refreshing of the code extension cache was included in SysFlushAOD::Main() method in 2021. The method SysExtensionCache::clearAllScopes() has been marked as deprecated since then.
  • Refresh report server:                                                                          https://ENVIRONMENT_URL/?mi=SysClassRunner&cls=SysFlushReportServer
As it was in Ax 2012, we can refresh the cache for database logging:
  • Refresh database log:                                                                    https://ENVIRONMENT_URL/?mi=SysClassRunner&cls=SysFlushDatabaseLogSetup
There is a new cache type in D365. It is related to a cross-company data-sharing feature. This feature resembles the virtual companies feature in Microsoft Dynamics AX 2012.
  • Refresh the cross-company data sharing:                                    https://ENVIRONMENT_URL/?mi=SysClassRunner&cls=SysFlushSysSharingRules
There is still "SysFlushSystemSequence" class in D365. In the previous versions, it was used to record identifier alignment during the data import process via group definitions. Starting D365 this approach has been deprecated the use of this class makes no sense anymore.

The relations or tables are not available when configuring the electronic reporting report

Recently we experienced an issue when we heeded to change one of the reports. The report was configured via electronic reporting. The issue was that we were not able to see the actual relations between the tables. Moreover, we could not see new tables when we were configuring the electronic reporting report. 

We checked our configuration in  Organization administration > Workspaces > Electronic reporting and opened Designer > Map model to datasource > Designer. Here is where we map the list of fields to be printed in the report against the data source in Dynamics 365.

I was not told that the tables which should be added to the report configuration were new. Those tables were delivered with the latest code release from our partners.

When I learned about that the solution was pretty clear - It is necessary to refresh the ER metadata to make the custom field that is added visible in the ER model mapping designer. It must be done with the Rebuild table references menu item (Organization administration > Electronic reporting > Rebuild table references) to bring the AOT changes into the ER metadata.

As a result, the lessons are:

  • Read the documentation thoroughly.
  • When you add new Application Object Tree (AOT) artifacts or update existing AOT artifacts that are used as data sources (tables, views, or data entities) in ER, use the Rebuild table references menu item (Organization administration > Electronic reporting > Rebuild table references) to bring your AOT changes into the ER metadata.

How to run batch tasks using the SysOperation framework

Overview As you may know, the system has batch tasks functionality . It can be used to create a chain of operations if you want to set an or...