Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Adding caption to UI builder generated dialog box

(0) ShareShare
ReportReport
Posted on by 1,169

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Adding caption to UI builder generated dialog box

    Inside DAX2012 works next code:

    //class MyReport_UIBuilder extends SrsReportDataContractUIBuilder

    public void build()
    {
    ...

    controller.parmDialogCaption('My caption');

    ...

    }

  • b_radlyjames Profile Picture
    b_radlyjames 3,081 on at
    RE: Adding caption to UI builder generated dialog box

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

    Setting it via controller does work.

  • Iulian Cordobin Profile Picture
    Iulian Cordobin 8,201 on at
    RE: Adding caption to UI builder generated dialog box

    Hi Abhinay, did you manage to resolve your issue?

  • Suggested answer
    Iulian Cordobin Profile Picture
    Iulian Cordobin 8,201 on at
    RE: Adding caption to UI builder generated dialog box

    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");

  • Abhinay Tharwal Profile Picture
    Abhinay Tharwal 1,169 on at
    RE: Adding caption to UI builder generated dialog box

    This option does not seem to work.

    Tried it, yielded no result.

  • Abhinay Tharwal Profile Picture
    Abhinay Tharwal 1,169 on at
    RE: Adding caption to UI builder generated dialog box

    Thanks Brandon,

    I will try this and update here.

    Regards,

    Abhinay

  • Iulian Cordobin Profile Picture
    Iulian Cordobin 8,201 on at
    RE: Adding caption to UI builder generated dialog box

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

  • Brandon Wiese Profile Picture
    Brandon Wiese 17,788 on at
    RE: Adding caption to UI builder generated dialog box

    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.

  • Suggested answer
    Brandon Wiese Profile Picture
    Brandon Wiese 17,788 on at
    RE: Adding caption to UI builder generated dialog box

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

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans