Error The data source is not embedded within a (parent) data source in Dynamics Ax

Description:-

This error comes when you try to add new DataSource to the top of the query.

QueryBuildDataSource qbds;
qbds = query.addDataSource(tableNum(newTable)); //This is wrong

You should add new table to the Main DataSource instead.

query.dataSourceTable (tableNum (newTable)).addDataSource (...)// This is correct

Related Posts

Thanks for comments.....

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
:-?
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
$-)
(y)
(f)
x-)
(k)
(h)
cheer