{"id":468,"date":"2011-06-08T05:56:06","date_gmt":"2011-06-08T05:56:06","guid":{"rendered":"http:\/\/mahenderpal.wordpress.com\/?p=468"},"modified":"2011-06-08T05:56:06","modified_gmt":"2011-06-08T05:56:06","slug":"getting-parent-entity-information-from-child","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=468","title":{"rendered":"Getting Parent Entity Information from child"},"content":{"rendered":"<p>In MS CRM 4.0 we used to get parent entity information using window.opener which is not there in CRM 2011 now. In CRM 2011 you can use below code<\/p>\n<p>window.top.opener.parent.Xrm.Page<\/p>\n<p>so using this statement you can get parent entity information and can fetch parent entity data, but sometime we also need to check parent entity name, let\u2019s take an example of order, we can create order from opportunity form, we can create it from account form as well. So in that case if we need to check which is the parent entity in order form we can use below statement to check entity name<\/p>\n<p>if(window.top.opener.parent.Xrm.Page.data!=null)<br \/>\nvar EntyName=window.top.opener.parent.Xrm.Page.data.entity.getEntityName();<\/p>\n<p>enjoy !!<\/p>\n<p><a href=\"http:\/\/community.dynamics.com\/product\/crm\/crmtechnical\/b\/crmmitchmilam\/archive\/2010\/11\/18\/crm-2011-accessing-the-parent-form-from-a-child-form.aspx\">Reference<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In MS CRM 4.0 we used to get parent entity information using window.opener which is not there in CRM 2011 now. In CRM 2011 you can use below code window.top.opener.parent.Xrm.Page so using this statement you can get parent entity information and can fetch parent entity data, but sometime we also need to check parent entity name, let\u2019s take an example&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=468\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/468"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=468"}],"version-history":[{"count":0,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/468\/revisions"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}