To rename the button in the dialog box


Is there any way that we can rename of the button in the dialog box. e.g. In OKcancel dialog box we can rename the OK button as Save and dialog box show only save and cancel button.

If it’s a custom form or a form built by the Dialog class, you can get a reference to the button and set its Label property. If it’s done by the system DialogBox class, then it’s handled by AX and you can’t change it.

If you can choose, I would use the Dialog class. See Dialog.defaultButton() to understand how to get a reference to the OK button.

Sir, what if I want to make a new dialog box and I want to add customized dialog button for the dialog box for e.g in the yesnocancel dialog box I want to replace the yes button with new button named as “continue”.

As I said, you have to use a form, either designed in AOT or built at runtime, typically with the Dialog class. You can encapsulate it in a method, if you want - see Box::yesAllNoAllCancel() for example.

thanks for you help sir , I have done it by making a new dialog form [:D]