Hi ,
I want to disable Open in Microsoft Office button from all forms in D365FO which is system defined button.
I tried via security roles it got disabled, but it's not allowing me to export from the form grid right click /Export all rows/ function.
Can we do it through the code??
I wrote COC for formRun class it's working fine, but for few forms (All vendors) it's giving error /Object not set to an instance of an object error.
final class FormRun_Extension
{
public void init()
{
FormMenuButtonControl officeButton;
#SysSystemDefinedButtons
next init();
officeButton = this.control(this.controlId(#SystemDefinedOfficeButton)) as FormMenuButtonControl;
if (officeButton)
{
officeButton.enabled(false);
}
}
}
Any code suggestions please
Thanks in Advance.
Regards,
Krish