Quantcast
Channel: Microsoft Dynamics 365 Community
Viewing all articles
Browse latest Browse all 53207

Accessing Elements in JavaScript CRM 2015 RU1(Carina)

$
0
0

In the latest version in CRM 2015 form scripts are loaded into their own frame within the CRM form. What this means is that any JavaScript call that references the DOM or windows/frames or any other 3rd party libraries accessing DOM will break. (http://blogs.msdn.com/b/crm/archive/2015/04/29/microsoft-dynamics-crm-online-2015-update-1-new-form-rendering-engine.aspx). There are some common unsupported customizations such as inserting custom fetchxml in a subgrid or multi-select picklists that will break in this latest release. Here is what I’ve done to address one of the issues I encountered when adding a custom button on the form subgrid:

 Capture-3

Since customScriptsFrame is a child of contentFrame(where the form elements exist) we can implement window.parent.document to grab the elements .

 

 Capture2

 

We recommend to use Microsoft Dynamics CRM Best Practices for client side code. (https://msdn.microsoft.com/en-us/library/gg328261.aspx#BKMK_ManageLibraryDependencies ). In specific cases its only possible build something unsupportedJ. Happy Coding!

 

 


Viewing all articles
Browse latest Browse all 53207

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>