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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Add temporary table to form - Dynamics AX 2012.

(0) ShareShare
ReportReport
Posted on by

I want to fill a temporary table, when the temporary table is on a form.

The temporary table is related to real table (i.e salesline)

I want also to have relation with temporary table and the real table.

Need example how doing that, please.

Thanks :)

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi, Eitan

    You can either use a real temp table that you create in AOT or a datasource of SalesLine and make it temporary by calling DataSource.setTmp() in an initialization method.

    To populate the table, use DataSource.setTmpData(TmpTable::getTmpData()). That method could also be in a class. In that method, do a while select in your source table and insert the records in a temporary buffer - tmp AOT table or using setTmp().

    If you create a tmp AOT table, the relation can be created as you would with any table. Make the table TempDB if you wanna join it with real tables.

    Regards,

  • Community Member Profile Picture
    on at

    In AX 2009 there wasn't any temporary table in tempdb (ability of AX).

    I added a new temporary table, and linked it to salesline (the link decleration is only on the table).

    On the form - just joinmode+joinsource on the datasource decleration.

    I don't know whethere the temp table should be declared on the form as the first table (as far as I know - this was a limit on previous versions of AX)

    Thanks :)

  • Verified answer
    Tommy Skaue Profile Picture
    Moderator on at

    Hi Eitan

    If you plan to join this table with other tables, you should prefer TempDB due to better performance. If it is set to InMemory, the AOS will need to join, but if it is TempDB it can be joined by SQL Server, which is faster.

    As for filling the table with data, I think this article gives a nice example:
    http://learnax.blogspot.no/2010/01/how-to-use-temporary-table-in-form.html

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans