CRM 2011 SDK version 5.0.12 available

The MS CRM Team have released an updated CRM 2011 SDK version 5.0.12 which can be downloaded here http://www.microsoft.com/en-us/download/details.aspx?id=24004 or viewed on MSDN here http://msdn.microsoft.com/en-us/library/gg309408.aspx Check out the release notes here http://msdn.microsoft.com/en-us/library/hh547453.aspx#bkmk_ReleaseHistory

In Summary the update contains

  • Updated assemblies for Microsoft Dynamics CRM 2011 Update Rollup 10. http://www.microsoft.com/en-gb/download/details.aspx?id=30711
  • A new Form Scripting Quick Reference that provides simple explanations and examples of the Xrm.Page object methods on a single page. http://msdn.microsoft.com/en-us/library/jj602964
  • A new topic called Choose your Development Style for Managed Code that describes the choices of tools and classes you can use when you write managed code and provides information to help you decide what is best for your needs.
  • A new topic called Create Accessible Web Resources that provides an introduction to creating web resources that offer equivalent functionality for all users so that people with disabilities will be able to use your web resources. http://technet.microsoft.com/en-us/library/jj602917.aspx
  • Improved authentication helper code and a new sample that demonstrates how to connect to the web services without using helper code.
  • Code changes to work in browsers to be supported in a later release, and information to guide you in making those changes.
  • Delivered the Solution Packaging Tool!
  • And much more… read the Release History for complete details. http://msdn.microsoft.com/en-us/library/hh547453.aspx#bkmk_ReleaseHistory

Accessing the Parent Form Xrm.Page in CRM 2011

For those of you trying to access a parent form’s Xrm.Page object in CRM 2011 you can use the following syntax.

From an IFrame HTML page

document.parentWindow.parent.Xrm.Page

From a new window/dialog

window.top.opener.parent.Xrm.Page

An example of a new window being used is when you are viewing the Account Form and then choose to create a new Contact from the left hand navigation pane and then within the Contact Form you need to access the Account Form (parent).

Potential CRM 4 syntax to be replaced is as follows

window.opener.parent.document.crmForm
window.opener.document.crmForm
window.opener.parent.crmForm

If you have downloaded the CRM 4 to CRM 2011 JavaScript Converter Tool before December 2010 then you can add the following code snippets to the TOP of the ConversionList.xml file straight after the <snippets> node, alternatively just download the tool again.


    <snippet>
      <crm4>window.opener.parent.document.|_|;</crm4>
      <crm5>window.top.opener.parent.|_|;</crm5>
    </snippet>
    <snippet>
      <crm4>window.opener.document.|_|;</crm4>
      <crm5>window.top.opener.parent.|_|;</crm5>
    </snippet>
    <snippet>
      <crm4>window.opener.parent.|_|;</crm4>
      <crm5>window.top.opener.parent.|_|;</crm5>
    </snippet>

Both Mitch Milam MVP and I searched high and low for this solution as the Xrm.Page object is not in the DOM at that same location as the CRM 4 crmForm object. Please let us know if you experience any problems with accessing parent forms and we will try and help you.

Also if you liked my CRM 4 to CRM 2011 JavaScript Converter Tool then you might like to take a look at Mitch Milam’s CRM Migration Assistant also for converting scripts.

From IE Developer Tools

Also, Paul Way has shown that you can access the Xrm.Page object from the Developer Tools console window using the following code.

frames[0].Xrm.Page