Tuesday, 28 October 2014

Filtering Records in a Form - Microsoft Dynamics Axapta

Hello Guys...

In this post i'm sharing steps how to do the Filtration of records in a Form

Here  i'm filtering records based on the selected gender(m/f)

Step 1 :

Go to Form-> Methods->class declaration and declare QueryBuildRange.

public class FormRun extends ObjectRun
    QueryBuildRange range;

Step 2:
Go to Data sources->your datasource->Add a Range in init() method of the DataSource.

public void init()
    range = this.query().dataSourceName("Test_Filteration").addRange(fieldNum(Test_Filteration,Gender));
//Note : You can use dataSourceNo also

Step 3 :

Go to Data sources->your datasource->Override the executeQuery() method

public void executeQuery()

//Note : Enable "Gender"Auto-declaration to "Yes" in design

Step 4 :

Finally  Call the executeQuery() method in the Selection Changed method of the ComboBox(Gender).

public int selectionChange()
    int ret;

    ret = super();
    return ret;

@ Rahul Talasila

No comments:

Post a Comment

Foreign currency revaluation currencies not showing in drop down in dynamics 365 finance & Operations 8.0

In the previous versions you can see all currency codes in the currency drop down, but Dynamics 365 finance and operations 8.0 you don'...