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.
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