web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

In AX2012R3 form with 3-level DS's - show all records from (3rd level) in a delayed join on level 1

(0) ShareShare
ReportReport
Posted on by 37
Hello,
 
in AX2012R3 form - I have  3 levels of data sources: A -< B -< C, where there is a relation from B towards A and from C towards B. but no AOT relation directly from C to A. I need to show the records all records from level C, which are related to A.
The problem I am facing is that if on DS: C  I set the join source to be DS: A (as there is no direct relation from C to A) - the generated query for C does not include any joins to A, and also I am not able to addLink from C to A as I get the error: /The data source is not embedded within a (parent) data source./. Not sure if this is possible to modify the query of a delayed join - to somehow join to a table from the main form's query ( = an upper level DS). 
I tried also with a using a view BC (created on tables B & C), but this view does not seem to know that there is a relation from B to A and on the view there are no explicit Relations to be defined. I am not sure if the view is created via some AOT queries - that the relation BC to A would appear. Setting the join source of C to B, is obviously not correct, as the records shown are only the ones from an the active (e.g. the first record of B).
So my question is - is it possible somehow to implement this - without using e.g. ranges for BC - which would be updated in the active() method of data source A and updated in the executeQuery() of data source C?
 
Thank you in advance!
Nikolay Nikolov
 
 
I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    240,191 Most Valuable Professional on at
    First of all, you began with statement that the hierarchy of data sources is A -< B -< C, but the rest of the posts suggests that it's not true - you say that you want to link C to A, not to B. Can you explain this discrepancy, please?
     
    Then you mentioned delayed join, but Delayed isn't a join - it's a link. The difference is that a join add the data sources to a single query, while a link creates a separate query for each data source, with the child data source filtered by the active record of the parent data source.
     
    addLink() is used with joins, so it won't help you if you want a delayed link instead of a join. With links, use addDynalink() instead.
  • NNikolov Profile Picture
    37 on at
    Martin, thank you for the quick reply!
     
    Sorry for my unclear question. So the situation is indeed data sources:  [A -< B-< C >- D ]  (e.g. A:(Journal) -< B:(Lines) -< C:(line-packs) <- D:(packs)) where it is possible that there might exist also several lines on a pack. I need to show on a separate grid all D-packs available for an A-journal without repetition (e.g. due to a join with multiple C:(line-packs) records. As there are also quite a lot of other data sources available on the form, I should preferably not mess with the main query - but rather have a separate query for the extra functionality). 
     
    I guess my mistake is indeed (as you mentioned) in the use of addLink() instead of addDynalink() - as I would like to influence only the separate delayed query, to take into account the selected A-level record for filtering on D. Hopefully with addDynalink() I can refer to a Data source which is not directly available in the local -/separate/delayed query.
     
    Thank you again for your time!
    Kind regards,
    Nikolay 

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 382 Super User 2026 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 265 Most Valuable Professional

#3
Subra Profile Picture

Subra 262

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans