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
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
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,232 Super User 2024 Season 2
Martin Dráb 230,064 Most Valuable Professional
nmaenpaa 101,156