Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Problem with SysOperationAutomaticUIBuilder when filter contract

$
0
0

I already try use SysOperationAutomaticUIBuilder to filter contract based on the other contract choose by user.

I have 2 contract (employee and department). When i choose employee contract, its automatically fill department contract with

employee department. Its work for department contract. when i choose employee, the department name of employee automaticcally

shown in department contract. But i have problem with employee contract. The data not change in employee contract. it shown first

data when report running.

for ex:

Employee "Y" Dept  "1"

Employee "X" Dept  "2"

When report first running its filled Employee with "Y" and department with "1"

But when i change employee with "X", department filled with "2" but employee still "Y"

here my code:

public void postBuild()
{
    ;
    super();

    // get datacontract
    contract = this.dataContractObject();

    // get dialog fields
    dialogFieldDept            = this.bindInfo().getDialogField(contract, methodstr(MK_TmpWeeklyActivityContract, parmDept));
    dialogFieldEmp             = this.bindInfo().getDialogField(contract, methodstr(MK_TmpWeeklyActivityContract, parmEmployee));

    // register override methods
    dialogFieldEmp.registerOverrideMethod(methodstr(FormComboBoxControl, modified), methodstr(MK_KlForEmployeeUIBuilder, allowModifyModifiedDept), this);
    dialogFieldDept.value(omOperatingUnit.RecId);
}


public RecId allowModifyModifiedDept(FormComboBoxControl _comboBoxControl)
{

    select firstOnly employ where employ.Worker == dialogFieldEmp.value();
    select firstOnly omOperatingUnit where omOperatingUnit.OMOperatingUnitNumber == MK_DimensionClass::getValueFromDefaultDimension(employ.DefaultDimension,"Department");
    return omOperatingUnit.RecId;
}

Anybody help me to solve this problem?

Thank for ur help.

Regards,

Hanny


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>