Hi everyone. I do have a big problem finding how to resolve this situation. First of all I have to explain that I'm a begginer with Dynamics AX.
This is the thing:
I have a form with a lot datasources, the principal is Principal_DataSource, and we have a Second_DataSource.
I have a filer option for the data in the grid. This filter filters the content of Principal_DataSource when Second_DataSource.value3 == combobox.valuStr(); The linktype of Second_DataSource with Principal_DataSource is Delayed.
I'm getting crazy because a see in he forum a lot options like this inside executequery of Principal_DataSource :
qb = this.query().dataSourceTable(tableNum(Principal_DataSource)).addDataSource(tableNum(Second_DataSource));
qb.joinMode(JoinMode::InnerJoin);
qb.addLink(fieldNum(Principal_DataSource, value1),fieldNum(Second_DataSource, value1));
But when I do it It doesn`t work at all. After that I have to put 2 addRange, so Its a bit crazy, and ofcourse I don`t know how to delete the source Second_DataSource to Principal_DataSource when this filter is disabled.
Other option that i was thinking about It's to use Principal_DataSource_ds.filter() but I don´t know how to filter ds with a query.
Thank You for your help.