Yes, you need to put Lines on First Dataitem.
In OnAfterGetRecord Trigger of Lines, try
CountHeader.GET(CountLine.DocNo,CountLines.No); //I guess your Header Primary key is Doc No and No.
If not you need to use Setrange/setfilter.
Yes, you need to put Lines on First Dataitem.
In OnAfterGetRecord Trigger of Lines, try
CountHeader.GET(CountLine.DocNo,CountLines.No); //I guess your Header Primary key is Doc No and No.
If not you need to use Setrange/setfilter.