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 :
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,114

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
    301,075 Super User 2025 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
    237,965 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,114 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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans