Skip to main content
Dynamics 365 Community / Forums / Finance forum / How to disable Open In...
Suggested answer

How to disable Open In Microsoft Office Button from All Forms in D365FO

editSubscribe (0) ShareShare
Posted on by 692
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;
        next init();
        officeButton = this.control(this.controlId(#SystemDefinedOfficeButton)) as FormMenuButtonControl;
        if (officeButton)
Any code suggestions please 
Thanks in Advance.