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 ... :)

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 ent...