Quantcast
Channel: Martin Dráb's Activities
Viewing all articles
Browse latest Browse all 17532

Queries with multiple top level data sources cannot be applied to Forms.

$
0
0

Hi,

In Release to Warehouse form, WHSInventTransSumDImSO is a datasource that pulls open sales orders which need to be released and displays them in the form.

Below change is needed only for sales orders and not for transfer orders.

I have added a new datasource to Release to Warehouse form. which has to go inner join with WHSInventTransSumDImSO and display only non-zero qty sales orders in Release to warehouse form.

TableView - WHSInventTransSumDimIssue is labeled as WHSInventTransSumDimSO in Form datasource.

I wrote a method in new datasource (WHSNonZeroQtyRelease)init  method to make a inner join.

Release to warehouse is not opening and I am getting the error message

Queries with multiple top level data sources cannot be applied to Forms.

Below is the code I tried

Extensionof(formDataSourceStr(WHSReleaseTowarehouse, WHSNonZeroQtyRelease))]

public void init()
{

next Init();

 FormDataSource WHSNonZeroQtyReleaseDB = this.formrun().dataSource(formDataSourceStr(WHSReleaseTowarehouse,WHSNonZeroQtyRelease));
 QueryBuildDataSource qbdsNonZeroQtyRelease = WHSNonZeroQtyReleaseDB.query().addDataSource(tableNum(WHSNonZeroQtyRelease));


QueryBuildDataSource qbdsWHSInventTransumDimIssue = qbdsNonZeroQtyRelease.addDataSource(tableNum(WHSINVENTTRANSSUMDIMISSUE));


qbdsWHSInventTransumDimIssue.joinMode(JoinMode::InnerJoin);

}


Viewing all articles
Browse latest Browse all 17532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>