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)

Adding caption to UI builder generated dialog box

(0) ShareShare
ReportReport
Posted on by 1,215

Hi,

I want to add a caption to the dialog box (parameter window) generated using a UI builder.

I am looking for code similar to what I would do in case of legacy reports to add a caption to the dialog box

Dialog dlg = new Dialog("@labelID");

I tried to add a caption in by overriding the new method of UI builder class, passing a dialog box with the caption to the super method, but that did not workout.

Any help is appreciated.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Brandon Wiese Profile Picture
    17,788 on at

    Try setting the .caption() property directly instead of by overriding the new() method.

  • Brandon Wiese Profile Picture
    17,788 on at

    I would think you should be able to set .caption() in the .preBuild() method of the UI builder class, since it's called immediately after the dialog is initialized.

  • Iulian Cordobin Profile Picture
    8,201 on at

    Not sure I understood, but are you using the SysOperation framework to achieve your goal?

  • Abhinay Tharwal Profile Picture
    1,215 on at

    Thanks Brandon,

    I will try this and update here.

    Regards,

    Abhinay

  • Abhinay Tharwal Profile Picture
    1,215 on at

    This option does not seem to work.

    Tried it, yielded no result.

  • Suggested answer
    Iulian Cordobin Profile Picture
    8,201 on at

    Not sure what is the exact implementation in your case, but, this works for me (just tested it again): in your Controller class, that should extend SysOperationServiceController, override dialogPostBuild method and add this line at the end, after super

       this.dialog().caption("New Text");

    or in the main() method of the controller, after setting your class and method just call

        controller.parmDialogCaption("Change default caption");

  • Iulian Cordobin Profile Picture
    8,201 on at

    Hi Abhinay, did you manage to resolve your issue?

  • b_radlyjames Profile Picture
    3,155 on at

    this.dialog().caption("Caption")  does not work.

    Setting it via controller does work.

  • Community Member Profile Picture
    on at

    Inside DAX2012 works next code:

    //class MyReport_UIBuilder extends SrsReportDataContractUIBuilder

    public void build()
    {
    ...

    controller.parmDialogCaption('My caption');

    ...

    }

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