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)

ParmObject to drop dialog

(0) ShareShare
ReportReport
Posted on by 239,040 Most Valuable Professional

I have a drop dialog form and I need to pass an object into it from the caller form. To set parmObject, I usually use an override of clicked() similar to this:

void clicked()
{
    Args args = new Args();

    args.caller(element);
    args.parmObject(someObject);
    args.record(someTable);

    this.menuFunction().run(args);
}

It works well for normal menu item buttons, but not for drop dialogs, because MenuFunction.run() isn't aware of that I want to open the form as a drop dialog.

To solve this problem, I would need either to find a correct way of opening drop dialogs from code, or to set parmObject() without overriding clicked() of the DropDialogButton.

I will be surprised if it can be done, but if it is, it will be useful to learn.

I surely can use a workaround, such as exposing the object by a method on the caller form, but the resulting form is uglier and more tightly coupled with a particular caller form than if I just get an object and check its type.

*This post is locked for comments

I have the same question (0)
  • Beat Profile Picture
    1,006 on at

    Hi Martin,

    I have the same requirement - did you got a solution?

    br

    Beat

  • Verified answer
    Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at

    No; it seems that I was right in assuming that it can't be done directly.

    I used the workaround mentioned at the end of my post. This is (roughly) what I do in init() of the dialog form:

    Object caller = element.args().caller() as FormRun;
    
    if (caller && formHasMethod(caller, identifierStr(getMyObject)))
    {
        myObject = caller.getMyObject();
    }
  • Beat Profile Picture
    1,006 on at

    Ok - tnx!

    I decided to use the caller to provide the parameter object - even there is the possibility to use this.parameters() in clicked event to provide a string to the dialog's args.parm() property. I prefere to have the object instance then to serialize and deserialize it.

    br

    Beat

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
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans