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

How to link temp table filled in one class to a dialog form and display the data

(0) ShareShare
ReportReport
Posted on by 2,120

Hi Techies,

I am working on one requirement where we are processing some logic and filling temp table by selecting some records on form.Once we click a button- a class behind will process logic on selected records and fills a temp table with output. I have created a new dialog form which has this temp table as data source, and calling this form by using below code.

DialogRunbase dialogParameter = Dialog::newFormnameRunbase(formStr(customDialogForm),this);

        dialogParameter.caption("Parameter form");
        dialogParameter = this.dialogInternal(dialogParameter);
        return dialogParameter;

This shows me a dialog with fields obviously with blank data. Now my question is how can I refresh this dialog form with latest temp table buffer. Possibly I need to use linkPhysicalTableInstance() to get the latest buffer, I am searching more.

Can anyone help me on this please?

Any response is appreciated!

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    306,854 Super User 2026 Season 2 on at

    Hi Sangram,

    You can create a button on the form which will create an instance of the class using x++ coding. Then you can also create a method on the class to pass the temporary table to a variable of the class.

  • Verified answer
    Martin Dráb Profile Picture
    240,528 Most Valuable Professional on at

    Yes, linkPhysicalTableInstance() is the right method *if* the type of the table is TempDB.

    If it's an InMemory table, you need setTmpData().

    Nevertheless I wonder whether temporary table is the right choice. How will you pack the data to store for batch processing, for instance?

  • Sangram Shinde Profile Picture
    2,120 on at

    Thanks Andre, Martin!

    As said linkPhysicalTableInstance() worked. Below is the code.

            DialogRunbase           dialog;
            dialog = element.args().caller();       
                 
            if (dialog && classIdGet(dialog.caller()) == classNum(callerClass))
            {
                callerClassObject = dialog.caller();         
                dataSource.linkPhysicalTableInstance(callerClassObject.parmFillTmp());
            }

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 July Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 330 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 310

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 242 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans