{"id":1495,"date":"2015-07-24T14:53:09","date_gmt":"2015-07-24T09:23:09","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=1495"},"modified":"2026-02-05T15:38:14","modified_gmt":"2026-02-05T10:08:14","slug":"support-to-open-an-entity-form-in-a-new-window-in-dynamics-crm-2015-sp1","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2015\/07\/support-to-open-an-entity-form-in-a-new-window-in-dynamics-crm-2015-sp1\/","title":{"rendered":"Support to open an Entity form in a new Window in Dynamics CRM 2015 SP1"},"content":{"rendered":"<h2><strong>Introduction:<\/strong><\/h2>\n<p>Every CRM update comes with a lot of goodies for both the developers and the end users, so Dynamics CRM 2015 SP1 was not different.<\/p>\n<p>One of such feature is opening a record in a new window.<\/p>\n<p>While most of you`ll think, what`s so great in this, we have been doing this since CRM 2011, or maybe even before that.<\/p>\n<p>Well here the difference is, now this is available through CRM API.<\/p>\n<p>Before finding out how to achieve this, let`s run down the memory lane, let`s start with CRM 2011 and understand how this functionality have evolved with every update from CRM 2011 to CRM 2015 SP1.<\/p>\n<p><strong>CRM 2011:<\/strong><\/p>\n<p>How do we used to open an entity record or simple, a record during CRM 2011 era?<\/p>\n<p>We used to use the JavaScript functionality of window.open() to open up a record.<\/p>\n<p>Syntax:<\/p>\n<p><strong>window.open(URL, name)<\/strong><\/p>\n<p><strong>URL <\/strong>&#8211; server name + URL of the record<\/p>\n<p><strong>name<\/strong> &#8211; specifies where to open the window, i.e., on the same page or a new tab or a new window.<\/p>\n<p><strong>CRM 2013:<\/strong><\/p>\n<p>Now, comes the CRM 2013, complete overhauled design, with added features for developer.<\/p>\n<p>It further simplified the way of opening a record, by providing us a parameterized function. This also ensured that it works across devices.<\/p>\n<p>Syntax:<\/p>\n<p><strong>Xrm.Utility.openEntityForm(name, id, parameters)<\/strong><\/p>\n<p><strong>name<\/strong> &#8211; Name of the entity, whose record we want to open.<\/p>\n<p><strong>id<\/strong> &#8211; GUID of the record to be opened, if passed null, it opens an empty record form.<\/p>\n<p><strong>parameters<\/strong> &#8211; parameters to be used on the form.<\/p>\n<p>Though it simplified the process of opening a record by eliminating the need to create the URL, still it lacked in one component i.e., giving us the choice whether to open a record on the same page or in a new window.<\/p>\n<p>Remember since CRM 2013, all navigation in CRM is in-place i.e it replaces the current page with the new URL that is requested.<\/p>\n<p>Using the above piece of code to open a record, would very well open the record, but it would open on the same page itself, which was kind of annoying.<\/p>\n<p>What if we want to open a record in a new window then? Well, we have to use the same conventional method i.e., window.open(). As a result this functionality could be achieved but not supported across devices.<\/p>\n<p><strong>CRM 2015 SP1:<\/strong><\/p>\n<p>Then, came CRM 2015 SP1 update, in this update the openEntityForm method has been enhanced further<\/p>\n<p>It means the method is allowed to take in one more parameter, which on specifying defines where the record would open<\/p>\n<p>Syntax:<\/p>\n<p><strong>Xrm.Utility.openEntityForm(name, id, parameters, options)<\/strong><\/p>\n<p><strong>options &#8211; <\/strong>It`s optional. <strong>\u00a0<\/strong>It takes in an object in which we have to specify true or false, true means open in a new window and false means to open on the same page. If this parameter is not specified it defaults to false.<\/p>\n<p><strong>How to use this functionality?<\/strong><\/p>\n<p>First of all create an Object.<\/p>\n<p>var options = {<\/p>\n<p>openInNewWindow : true<\/p>\n<p>};<\/p>\n<p><strong><em>Note: <\/em><\/strong><em>the property openInNewWindow cannot be replaced by any another name.<\/em><\/p>\n<p>Xrm.Utility.openEntityForm(&#8220;account&#8221;, null, null, options)<\/p>\n<p>The object just takes only one property currently, we cannot specify the height or width of the window to be opened. It by defaults take up the entire screen.<\/p>\n<p><strong>Conclusion:<\/strong><\/p>\n<ul>\n<li>Now, the records can be open in a new window.<\/li>\n<li>Currently, we cannot define the size of the window to be opened.<\/li>\n<\/ul>\n<p>Have a look at our mapping solution for Dynamics CRM,\u00a0<a href=\"https:\/\/www.maplytics.com\/\">Maplytics<\/a>\u00a0which works from with CRM. Email us on\u00a0<a href=\"mailto:crm@inogic.com\">crm@inogic.com<\/a>\u00a0for a trial or if you would like to see a live demo.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: Every CRM update comes with a lot of goodies for both the developers and the end users, so Dynamics CRM 2015 SP1 was not different. One of such feature is opening a record in a new window. While most of you`ll think, what`s so great in this, we have been doing this since CRM\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2015\/07\/support-to-open-an-entity-form-in-a-new-window-in-dynamics-crm-2015-sp1\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[22,23,24,25,33],"tags":[398,597,598],"class_list":["post-1495","post","type-post","status-publish","format-standard","hentry","category-dynamics-crm-2015","category-dynamics-crm-2015-update-1","category-dynamics-crm-2016","category-dynamics-crm-2016-update-1","category-javascript","tag-crm-2015","tag-dynamics-crm-2015","tag-dynamics-crm-2015-sp1"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/1495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=1495"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/1495\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=1495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=1495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=1495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}