Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Is it possible to add form parts to a form that has InMemory data sources as the primary data source?

Posted on by 2,005

I think I know the answer to this question but I want someone who is more experienced and smarter than I am to confirm this.

I have a form that has two grids on it--one for supply and one for demand. Because we are running MRP daily and adding sales orders, we generate the data for the two grids into two InMemory temp tables--SupplyTmp and DemandTmp.

I have been asked to streamline this form so that only the most necessary data appears in the grid. But I was asked to add factboxes to the form to display some data that is tangential to the supply and demand equation, but useful for planning. Unfortunately none of the data is in a table that we could easily try to link as an Info Part, so I was forced to create Form Parts for all of the factboxes I was asked to add. Following how the Purchase Totals Summary part works in AX, I created new tables and new forms as well as controllers to populate the data. When I open the form, the data for the tables does get created--I verified it through the debugger and looked at the tables via the table browser after opening the form, but the data does not display in the parts. When I wired the parts into the form, I joined them against the DemandTmp or SupplyTmp record id, but the data does not display. The part tables do have relationships defined with their source tables, but I have a feeling that because the source tables are InMemory tables, this isn't going to work, although there is nothing in the documentation that says there is a prohibition on this.

Thanks.

Brandt

*This post is locked for comments

  • Verified answer
    Brandt Fundak Profile Picture
    Brandt Fundak 2,005 on at
    RE: Is it possible to add form parts to a form that has InMemory data sources as the primary data source?

    Martin,

    Thanks for the advice. After trying it by itself and then running it through the debugger I realized that the data source I was feeding to the parts (the demand record) was not populating in the part. This was going to be an issue, because the part data sources were joined to it. I didn't realize that all SelfLink does is pass the record in the Args to the part, and once I removed the reference to the demand record in the part, the part immediately started populating the data.

    Thanks.

    Brandt

  • Martin Dráb Profile Picture
    Martin Dráb 230,064 Most Valuable Professional on at
    RE: Is it possible to add form parts to a form that has InMemory data sources as the primary data source?

    Temporary tables work fine in forms and form parts are forms, so I don't see any reason why it shouldn't work.

    Please open your form (used in the form part) directly (i.e. not through the part) - if it doesn't work either, you have a bug there. Debug your code filling the temporary table and make sure that it's correctly linked to the datasource and form controls.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,064 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans