Notifications
Announcements
No record found.
here custtable is table and apnttaxregistrationview is a view, how to give relation between these two ?
thanks in advance.
Hi Prasanth,
You can add the relation in the form init method. You can use code like this -
QueryBuildDataSource CustTableDs; CustTableDs = CustTable_ds.query().dataSourceTable(tableNum(CustTable)); CustTableDs.addLink(fieldNum(CustTable, CustAccount), fieldNum(ApntTaxRegistrationView, CustAccount));
You can use the fields based on which you want to to relate CustTable and the view.
It's true that it needs to be added in code with the help of addLink(), but the implementation above isn't correct - the order of fields in addLink() should be reversed.
Also, you said that they should have a relation, but you didn't say which one should be the parent. Maybe you need to add a link to ApntTaxRegistrationView instead of CustTable.
And by the way, custTable_ds.query().dataSourceTable(tableNum(CustTable)) can be replaced with mere custTable_ds.queryBuildDataSource(). And if you put it into init() of the data source, it'll be this.queryBuildDataSource().
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 660 Most Valuable Professional
André Arnaud de Cal... 549 Super User 2025 Season 2
Sohaib Cheema 307 User Group Leader