Hello,
On the SalesTable form, I have a lookup added on the sales order line with the carTable table, which contains two fields (carId, accountNum).
Each line can have a different carId selected in the lookup for specific customer. Here everything works correctly.
But when I want to open the form of the carTable, by right-clicking and selecting "View detail". The carTable form opens, but it does not filter the lines by carId and AccountNum correctly.
It displays cars of all customers that have the same carId (it is not unique - the unique key in the carTable is carId and AccountNum).
How can I add a range here so that when I go to "View details" it displays the form only with the correct carId and AccounNum?
Hi,
Overriding the jumpRef method solved the problem.
Thanks.
Hi Shoowtek,
You can get the caller record and add range using element.args().lookupValue() or lookupRecord - This will return the caller record when you click on view details.
Thanks,
Girish S.
Please share your code and form structure (Datasource and design)
Thanks. I'm trying to customize my form suggested by your standard solution, but I'm getting a error that my form doesn't contain a 'query' method....
ClassDoesNotContainMethod: Form xxx does not contain a definition for method query and no extension method query accepting a first argument of type xxx is found on any extension class.
Which query() is required?
Hi, You can check standard forms like LedgerJournalSetup, its adding range in datasource of form based on caller. You can replicate this logic to check if caller dataset is carTable then find the record and filter it in your form.
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,817
Most Valuable Professional
nmaenpaa
101,156