Friday, April 1, 2016

Hide Subgrid + Button For Attachment in Email Entity Etc

Hi all,

I have got a requirement to hide + new button for Attachment in Sub-Grid. Please find the code to achieve the same

Javascript:

        setTimeout(function () {
            if (Xrm.Page != null && Xrm.Page != undefined && Xrm.Page.getControl("attachmentsGrid") != null && Xrm.Page.getControl("attachmentsGrid") != undefined) {
                document.getElementById("attachmentsGrid_contextualButtonsContainer").style.display = "none";
            }
        }, 500);

We can use the above code to hide all the Subgrid + Button. You need to replace "attachmentsGrid" as your Subgrid name to achieve the same.

No comments:

Post a Comment

How to Run Microsoft Flow for Every one Month

Introduction: In this Blog we will see how to Run Microsoft Flow for Every one Month. Implementation Steps:   1. Navigate to  https://make.p...