Hello,
I created a form with InventTrans and InventTransOrigin as datasource. When I try to run the following code, I getting this error message: "A circular dependency was detected while processing a data dependency between data sources"
Does anyone know how to solve this problem?
Thanks.
[DataSource] class InventTrans { public void init() { super(); this.query(new Query(querystr(localQuery))); openStatus = this.query().dataSourceTable(tableNum(InventTrans)).findRange(fieldNum(InventTrans,MarkingRefInventTransOrigin)); if (!openStatus) { openStatus = this.query().dataSourceTable(tableNum(InventTrans)).addRange(fieldnum(InventTrans,MarkingRefInventTransOrigin)); } }
localQuery:
You have form data source forming a query, but your code is trying to ignore this query and use an AOT query instread. Why?
By the way, you can access the QueryBuildDataSource object by mere this.queryBuildDataSource().
Hi Shooowtek,
You have already added InventTrans and InventTransOrigin table as a datasource to the form. Then what is the purpose of adding the same query again in the init method?
I think that is the reason for the error.
If you want to add the range you can directly add the range using queryBuildDataSource of particular datasource in the form.
Thanks,
Girish S.
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,842
Most Valuable Professional
nmaenpaa
101,156