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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
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

I have the same question (0)
  • Vikas_AX_Blogs Profile Picture
    875 on at

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

       }

    }

  • Boobalan Profile Picture
    727 on at

    Thanks for ur valuable reply.

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

  • Verified answer
    Vikas_AX_Blogs Profile Picture
    875 on at

    And second way u can do by  x++ code

    Check this link:

    dynamicsuser.net/.../214009.aspx

  • Verified answer
    Vikas_AX_Blogs Profile Picture
    875 on at

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

  • Suggested answer
    Boobalan Profile Picture
    727 on at

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

    Thank u very much

  • Boobalan Profile Picture
    727 on at

    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.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans