filtering a table in AX

Hi you all.

I’m trying to filter a record in the table so when I load my program only selected record in the table will show up. Any suggestions? Thanks

NAV forum and AX title - which one is it? [:D]

My table is ledger Account and I want to select the Account Number (field in ledger account). Right now my program selects all the account number. In my new program I want to be able to select the account number so it will only loads what I select. makes sense or vague?

My bad, I didn’t notice I was in a wrong forum.


You have to implement filter functionality in X++.

1)Create the ‘account number’ filter on the form. Set auto declaration to Yes.
2)Over ride ‘init’ method in the form data source by defining the range.
3)Over ride ‘executeQuery’ method on the form data source. Here set the ‘account number’ filter value to the range.
4)Over ride the implement filter ‘modified’ method and write code after ‘super()’ before ‘return ret’ -