In this webinar, our experts showcase a variety of demo use cases of how different components of the...
Entity customizations are the topic of today's blog! Default behavior of CRM is to display Related Entities in the Navigation pane of the Primary Entity. A little bit of tweaking in form JS can give us multiple customization options.
In the example below, we remove Entity from the navigation pane and display its associated grid view in a new tab on our Entity form.
Similarly image below illustrates related entities in Iframes on the same tab.
Here is the javascript to achieve this functionality:
function GetDisabilityFrame(){
if (crmForm.ObjectId != null) { var oId = crmForm.ObjectId; var oType = crmForm.ObjectTypeCode var security = crmFormSubmit.crmFormSubmitSecurity.value; navpo_po_disabilitytype_contact.style.display = "none";
return "areas.aspx?oId=" + oId + "&oType=" + oType + "&security=" + security
+ "&roleOrd=2&tabSet=areapo_po_disabilitytype_contact";
} else { return "about:blank"; }
} crmForm.all.IFRAME_Disabilities.src = GetDisabilityFrame();
The above method simply returns the src for Disability Type grid and assigns it to our IFrame.
Use IE Dev toolbar to get the required src, as illustrated below: