Wednesday, August 19, 2009

Show the related records of an entity in a tab of the parent form in MS CRM 4.0

Show the related records of an entity in a tab of the parent form.

“tabSet” you can find in the customization, it’s basically the relationship name.
Or else you can run the Fiddler and get the complete URL of the related entity IFRAME (which appears in the parent form) and from the URL you can copy the “tabSet” name.

crmForm.all.new_iframe_name.src =
GetFrameSource(new_contact_new_qualification);

function GetFrameSource(tabSet)
{
if (crmForm.ObjectId != null)
{
var oId = crmForm.ObjectId;
var oType = crmForm.ObjectTypeCode;
var security = crmFormSubmit.crmFormSubmitSecurity.value;
return "areas.aspx?oId=" + oId + "&oType=" + oType + "&security=" +
security + "&tabSet=" + tabSet;
}
else
{
return "about:blank";
}
}

No comments: