Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

getting information from joined view on both tabs

Posted on by 768

Hello,

I have joined view to my custom form like that:

5483.JPG

Then I added the following code to the init() method of my view "InventTableExpandedShort_ICL" to help AX with relation:

public void init()
{
    super();
    this.queryBuildDataSource().addLink(fieldNum(ProductAvailability_ICL,ItemId),fieldNum(InventTableExpandedShort_ICL,ItemId));
}

On my form I have two datasources for ProductAvailability_ICL table:

1)ProductAvailability_ICL

2) ProductAvailability_Batch

They are related like that:

5736.JPG

And inside ProductAvailability_Batch datasource init method there is a dynalink:

    this.queryBuildDataSource().clearDynalinks();
    this.queryBuildDataSource().addDynalink( fieldNum(ProductAvailability_ICL, InventBatchId),
                                                ProductAvailability_ICL,
                                                fieldNum(ProductAvailability_ICL, InventBatchId));

I need a productname field from my view InventTableExpandedShort_ICL showed on both tabs of the form. One tab of the form contains grid fields from ProductAvailability_ICL datasource and other tab contains grid fields from ProductAvailability_Batch. When I add productname to the grid ProductAvailability_ICL it shows fine but when I add productname to ProductAvailability_Batch it doesn't show productname correctly for my itemids. What am I missing?

Thanks.

  • RE: getting information from joined view on both tabs

    Hi Azat,

    Thank you fort letting us know.

  • dark_knight Profile Picture
    dark_knight 768 on at
    RE: getting information from joined view on both tabs

    Solved. If anyone is interested I should have added the same InventTableExpandedShort_ICL view to the list of datasources second time and then join it to the ProductAvailability_Batch datasource.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans