I have a form with 2 grids. I want to display records in second grid(Line grid) according to the selected record in First grid(header grid) i.e, I need to filter records in second grid… How to do that?? I am using query as a datasource on a form.
filteration based on the two grid without any joins and relation
Make sure there is a relation between those two tables. Then set properties of the data sources used for the line grid as this:
- JoinSource = name of the parent data source
- LinkType: Delayed
You can find many examples in standard AX, such as in SalesTable form, so you can look there if needed.
i clearly insist without any joins and relation
You can clearly insist as much as you want, but if the line datasource isn’t related to any header, it can’t show related records. Choose which of your incompatible requirements you want to give up.
Note that having a relation doesn’t necessarily mean having it in AOT. It can be added in code, if you have a good reason to do that.
yeah i need code only… can u help.
Why can’t you model it in AOT? The best code is code that you don’t have to write, fix, upgrade and so on.
Dear Martin Sir,
Actually he used query in that form and ‘Query’ do not have Link Type Property it simply has Join Mode. So here he cant use LinkType: Delayed.
My suggestion is that he should create form without Using Query that’s it
I’m aware of that he’s using a wrong datasource type, but that’s not the problem we’re talking about right now.
Although you’re right that it’s a problem, what you’re proposing wouldn’t solve the fact that he doesn’t have and doesn’t want any relation between datasources. The problem we’re discussing would still be there.
I don’t want to overwhelm him with two problems at once.