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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Inquiry data using inmemory issue. it working depend on from form caller.

(0) ShareShare
ReportReport
Posted on by

Hi everyone.

I created a form to inquiry simple data using inmemory type table.

and it working well when I open the form directly.(open the form from AOT or menuitem)

but when I call the form from Job or another form, inquiry is not working.

please help me if you have an idea.

Open the form code :

static void Job39(Args _args)
{
    Args        args;
    FormRun     formRun;

    args = new Args();

    args.record(WMSPickingRoute::find('XXX'));
    args.name("Formname");

    formRun = new formRun(args);

    formRun.run();

    formRun.wait();
}


Inquiry data code to set datasource :

public void fetchData()
{
    IF_BarcodeProcessTMP        tempTable;
    IF_BarcodeProcessHelper     barcodeProcess = new IF_BarcodeProcessHelper();

    tempTable = barcodeProcess.fetchIFBarcode(InventTransType::WMSOrder, ScanId.valueStr()

    IF_BarcodeProcessTMP.setTmpData(tempTable));

    IF_BarcodeProcessTMP_DS.research();

}

and this code to open form same issue.. :

    new MenuFunction(menuitemDisplayStr(IF_PickingList), MenuItemType::Display).run(args);



When I debug to check returned tempTable, data is correct..

Why it's not work open from another caller..??

is there another way to set datasource for inmemory table???

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    304,500 Super User 2026 Season 1 on at

    Hi Leo,

    What exactly do you mean with "inquiry is not working"? Can you possibly add screenshots to illustrate your question?

  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    When you open a form from another form, the data on the new form might be filtered based on the caller form's active record, if there are relations between the two tables.

    If this is the case, you should clear the dynalinks in code: [View:https://community.dynamics.com/365/financeandoperations/b/faisalfareedaxlibrary/archive/2017/03/04/ax-2012-add-remove-dynalink-through-x]

  • Community Member Profile Picture
    on at

    I added below code into Datasource

    public void executeQuery()

    {

       this.query().dataSourceNo(1).clearDynalinks();

       super();

    }

    and it working well. Thanks Andre, Nikolas.

  • nmaenpaa Profile Picture
    101,172 Moderator on at

    Glad to hear it works. Please mark the helpful answer(s) as verified so that others can benefit from them. Thanks!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans