Tuesday, November 18, 2025

Delete caches in Dynamics 365 F&O

In Dynamics 365 Finance and Operations (D365 F&O), clearing the Application Object Tree (AOT) cache usually involves running specific utility functions through the user interface or a URL, or performing actions in a development environment. There is no single "Clear AOT Cache" button in the standard UI. 

From the User Interface (Functional Users/Admins)

You can clear various server-side caches, including those related to AOT elements and extensions, using a specific page in the application. 

  1. Navigate to the utility page by modifying your D365 F&O URL. Append 

·       mi=sysclassrunner&cls=sysflushaod

·       mi=sysclassrunner&cls=sysflushdata

·       mi=sysclassrunner&cls=sysflushdictionary

to your base D365 F&O URL.

    • Example: https://[yourD365URL]/?cmp=USMF&mi=sysclassrunner&cls=SysFlushAod
  1. Alternative UI Method (if TMS is enabled): Navigate to Transportation management > Setup > Load building > Load building strategies and click the Generate class list button. This action internally calls SysFlushAod::main() and flushes several caches. 

In a Development Environment (Developers)

In a development environment (Dev VM), a full build and synchronization of the related model is the standard way to ensure AOT changes are reflected, which implicitly handles caching issues related to code changes. 

  • Build and Synchronize: In Visual Studio, after making changes, right-click your project or model in the Application Explorer and select Build and then Synchronize database.
  • Clear Visual Studio Cache: Sometimes, Visual Studio itself caches data. You can delete the files in the ComponentModelCache folder at: C:\Users\[YourUser]\AppData\Local\Microsoft\VisualStudio\[Version]\ComponentModelCache

 Happy Daxing...


Monday, June 30, 2025

How to stop updating existing records while importing Data through Data Management Framework (DMF)

Problem Statement : I was working on a requirement involving file-based integration using the Data Management Framework (DMF). The data entity includes a defined primary key, and as per standard DMF behavior, if a record with the same key already exists during import, it is updated.

However, the requirement is to prevent updates to existing records. Instead, the DMF process should skip such records and continue processing the remaining records in the file without interruption.

Solutions: One of possible solutions is setting the DB operation to None if it’s Update. For example:

public void mapEntityToDataSource(DataEntityRuntimeContext _entityCtx, DataEntityDataSourceRuntimeContext _dataSourceCtx)

{

// Call the base method

        next mapEntityToDataSource(_entityCtx, _dataSourceCtx);

        

        // Add your custom logic here

if (_dataSourceCtx.getDatabaseOperation() == DataEntityDatabaseOperation::Update)

{

_dataSourceCtx.setDatabaseOperation(DataEntityDatabaseOperation::None);

}

}


Happy Daxing :)

Wednesday, June 11, 2025

Enable / Disable form control through COC

 [ExtensionOf(formStr(FormName))]

final class FormName_Extension

{

    /// <summary>

    /// control visibility of SETIndicator flag based on Company parameters

    /// </summary>

    public void init()

    {

        next init();


        FormStringControl   SETIndicator = this.design().controlName(formControlStr(FormName, TableName_SETIndicator));

      

      

        if(SETIndicator  && curExt() ==  'YourCompany')

        {

            SETIndicator .visible(True);

        }

        else

        {

            SETIndicator .visible(false);

        }

    }

}


Happy DAXing ... :)

Delete caches in Dynamics 365 F&O

In Dynamics 365 Finance and Operations (D365 F&O), clearing the Application Object Tree (AOT) cache usually involves running specific ut...