filter record in line grid AX 2012 based on selected record in Header grid

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. enter image description here

As shown in figure, there is a common field named Activity number… Now, I need to display records in Second grid for selected record in first grid(Say VA-00015).

Hi saddaf,

For your requirement, You can take the example of sales order or purchase order in standarad.

That would be the assured approach, In your case just need to alighn the joinSource(Under form > datasource > joinsource(property)) for the reference table and link type can be delayed.