Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Runbase Dialog with only OK button

(0) ShareShare
ReportReport
Posted on by 727

Hi,

I need to create a runbase class and prompt a dialog box.

In the dialog box i need to add one dialog field.

And then the dialog field should contain only the OK button. cancel button should not shown in the dialog.

I dont know how to do.

Please help.


Thanks in advance.

Boobalan.

*This post is locked for comments

  • Boobalan Profile Picture
    Boobalan 727 on at
    RE: Runbase Dialog with only OK button

    I have another problem with the same dialog box,

    im calling this dialog form a modified method in a form. when the dialog is opens, i should not able to access other objects except the dialog, once i enter value to the dialog only i can able to access other forms.

    And one more thing, how can i disable the close icon in the dialog box.

    Please help me.

  • Suggested answer
    Boobalan Profile Picture
    Boobalan 727 on at
    RE: Runbase Dialog with only OK button

    Thank bro. i get it, now its working fine.

    Thank u very much

  • Verified answer
    Vikas_AX_Blogs Profile Picture
    Vikas_AX_Blogs 875 on at
    RE: Runbase Dialog with only OK button

    Yes bro it will effect all other dialog so u can go second link and hide the cancel button .

  • Verified answer
    Vikas_AX_Blogs Profile Picture
    Vikas_AX_Blogs 875 on at
    RE: Runbase Dialog with only OK button

    And second way u can do by  x++ code

    Check this link:

    dynamicsuser.net/.../214009.aspx

  • Boobalan Profile Picture
    Boobalan 727 on at
    RE: Runbase Dialog with only OK button

    Thanks for ur valuable reply.

    If i do like this, will this affect all other dialog whichever showing in ax..?

  • Vikas_AX_Blogs Profile Picture
    Vikas_AX_Blogs 875 on at
    RE: Runbase Dialog with only OK button

    Hi Boobalan,

    Run your class  and come to the cancel button right click and go to personalize

    and than go to design and  cancel button visual properties set to "NO" than again  run your class dialog will open with only ok Button .

    Code:

    public class CXT_AllocationDate extends RunBase

    {

       DialogField  fromdate,lastdate;

       FromDate     StartDate;

    }

    protected Object dialog()

    {

       Dialog  d=new Dialog();

       d.caption("Allocation Date");

       d= super();

       fromdate=d.addField(extendedTypeStr(FromDate),'From Date');

       return d;

    }

    public boolean getFromDialog()

    {

     StartDate=fromdate.value();

     return super();

    }

    public void run()

    {

      info(strFmt("Start Date=%1",StartDate));

      super();

    }

    public static void main(Args args)

    {

       CXT_AllocationDate   wo=new CXT_AllocationDate();

       ;

       if(wo.prompt())

       {

           wo.run();

       }

    }

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! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,476 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans