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

EP list page active record issue

$
0
0

Hi all,

Scenario: I have an EP list page having 3 datasources joined in AOT query. There are three buttons on the list page and at a time only one button is enabled for a single record. The enabling/disabling of buttons is dependent on the currently selected record. The scenario is shown in the following image:

There is a Header:Line relation between step table and step line table.

Query AOT view:

List page interaction code:

public void selectionChanged()
{
    MTQHRMCDPStepTable header;
    MTQHRMCDPStepLine stepline;

    super();

    stepline = this.listPage().activeRecord(queryDataSourceStr(MTQHRMCDPEmployeeActivityListpage,MTQHRMCDPStepLine_1));

    header = this.listPage().activeRecord(queryDataSourceStr(MTQHRMCDPEmployeeActivityListpage,MTQHRMCDPStepTable_1));

this.listPage().actionPaneControlEnabled(formControlStr(MTQHRMCDPEmployeeActivityListpage,HRMCDPMYActivityNew),
                    header.Step == MTQHRMCDPActivityStage::Stage1 && (stepline.StepStage == MTQHRMCDPEmployeeStage::UnderReview || stepline.StepStage == MTQHRMCDPEmployeeStage::Action));

this.listPage().actionPaneControlEnabled(formControlStr(MTQHRMCDPEmployeeActivityListpage,HRMCDPMYMidReview),header.Step == MTQHRMCDPActivityStage::Stage2);
this.listPage().actionPaneControlEnabled(formControlStr(MTQHRMCDPEmployeeActivityListpage,MTQHRMCDPMYFinalYrReview),header.Step == MTQHRMCDPActivityStage::Stage3);

}

Issue:

When we change selection the buffer "header" is filled with the active record, but the buffer "stepline" is filled with some other record rather than active record.
One more thing that I noted is that the "stepline" buffer gets filled with the top most record out of the joined records available against selected "header" record.

Please guide. Thanks 


Viewing all articles
Browse latest Browse all 72043

Trending Articles



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