Maybe just disable the Checkbox?
public Object dialog()
{
DialogRunbase dialog = super();
DialogWindow windowCtrl;
DialogGroup dlgGrp1,dlgGrp2;
DialogText staticTxt;
#resAppl
;
dialog.windowType(FormWindowType::PopUp);
dialog.alwaysOnTop(true);
dlgGrp1 = dialog.addGroup();
dlgGrp1.frameType(FormFrameType::None);
dlgGrp2 = dialog.addGroup('',dlgGrp1);
dlgGrp2.frameType(FormFrameType::None);
dlgGrp2.columns(2);
dlgGrp2.widthMode(FormWidth::ColumnWidth);
dlgGrp2.heightMode(FormHeight::ColumnHeight);
windowCtrl = dialog.addInfoImage();
staticTxt = dialog.addText("@SYS70864"+'\n\n'+"@SYS70865");
staticTxt.widthMode(FormWidth::ColumnWidth);
staticTxt.heightMode(FormHeight::ColumnHeight);
staticTxt.displayLengthMode(0);
staticTxt.displayLengthValue(50);
//dlgDisableButton = dialog.addFieldValue(enumStr(NoYes),disableButton,"@SYS70866"); // dlgDisableButton.alignControl(true);
dlgShowNotAgain = dialog.addGroup('',dlgGrp1);
dlgShowNotAgain.frameType(FormFrameType::None);
dlgShowNotAgain.frameOptionButton(FormFrameOptionButton::Check);
dlgShowNotAgain.optionValue(0);
dlgShowNotAgain.hideIfEmpty(false);
dlgShowNotAgain.caption("@SYS70363");
return dialog;
}
------------------------------
Harald Pfitzner
Gebr. Dorfner GmbH & Co. KG
Hirschau
------------------------------
Original Message:
Sent: 09-07-2018 03:58 PM
From: Rudy Salcedo
Subject: How to disable/prevent a dialog box from popping up
We have discovered that when the following dialog box pops up, some users are inadvertently checking the "Disable button" checkbox, which results in the Attachments button not highlighting on SOs, POs, etc when it should be highlighted.

The form name is Dialog, and the Caller is the DocuToolbarButtonCheck class.
Is there a setting in AX 2012 that controls whether or not this dialog box pops up? If not, can we prevent the box from popping up via X++ code? Since we don't want the users to disable the button, it makes more sense to prevent this dialog box from popping up in the first place.
------------------------------
Rudy Salcedo
Senior Programmer/Analyst
LaForce, Inc
Green Bay WI
------------------------------