Posts

Showing posts from August, 2018

CRM dynamics Hiding Add Existing Subgrid (+) Button

We had the requirement to Hide Add existing button for one of the grid on the form. We have achieved above requirement using DOM explorer. Due to multiple Enable/Display rule associated to this button it was hard to hide this button. //Hiding Add Existing Activity Contacts Subgrid (+) Button document.getElementById("subGrid_ActivityContacts_addImageButton").disabled = true; document.getElementById("subGrid_ActivityContacts_addImageButton").style.visibility = "hidden"; document.getElementById("subGrid_ActivityContacts_addImageButton").style.display = "none"; If you need to Hide Add Existing button for any SubGrid, please replace Subgrid Button ID with your SubGrid ID. You Can get this ID from Developer tool of any browser. Hope this Helps! Happy CRMing!

CRM Dynamics 2013 Set Header Field Value

Often we need to set value of Header field in CRM 2013. XRM.Page object model doesn't support setting up value to header form. We tried putting the field on main form and Header as well. Using XRM.Page setValue() to Main form field doesn't auto populate field value on Header form. To overcome this problem we have used below code to set the value on Header field. if (document.getElementById("header_new_membership_d") { document.getElementById("header_new_membership_d").innerText = membershipText; } Please note that above code is unsupported and not recommended by Microsoft. This code will not work if Microsoft makes changes to DOM for newer release. Hope it helps! Happy CRMing!