Exploring the Xrm.Internal namespace in CRM 2013

Recently i cam across this library in CRM 2013. And I found a lot of helpful methods which could facilitate you during your development. Please check for the screenshot below which shows some of  the methods.

screen 40

Notable are:

1. Xrm.Internal.getEntityName(<entitytypecode>) – you pass in the entitytypecode and get the logical name for the entity

2. Xrm.Internal.getEntityCode(“<logicalname>”) – you pass in the entity logical name and get the objecttypecode. This is very useful where you can need the entitytypecode in the form

Check for the screenshot below to see the usage of the above two methods

screen 41

Besides these other utility methods are:

3. Xrm.Internal.openDialog – this you can use to show a modal dialog in a similar manner in which CRM 2013 shows the modal dialogs.

4. Xrm.Internal.openErrorDialog – this you can use to show an error dialog like CRM 2013.

Check out the following link to see how to use the above methods to suit your needs.

http://dynamicsofdynamicscrm.wordpress.com/2014/04/28/call-crm-2013-modal-window-for-webresources/

Please note that is a not a documented library for end users and hence any changes to library by microsoft in the future would render you code unusable.

Hope this helps!

 

Advertisements

About Debajit
I am a Dynamics CRM Most Valuable Professional (MVP) with 10 years of experience in Microsoft .NET Technologies and 7 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side. Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com Author of multiple tools on codeplex including the 'Role Based Views' and 'CRM-Sharepoint Metadata manager & Attachment Extractor' which are available for commercial use under XrmForYou.com For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

7 Responses to Exploring the Xrm.Internal namespace in CRM 2013

  1. Pingback: Get EntityTypeCode of an entity in CRM 2013 using JScript | Debajit's Dynamic CRM Blog

  2. Pingback: Show Error in Microsoft Dynamics CRM style using Xrm.Internal.openErrorDialog | Debajit's Dynamic CRM Blog

  3. Pingback: Debajit's Dynamics CRM Blog

  4. Pradeep Kumar says:

    Hi Debajit,

    Thanks for sharing your knowledge. But what I learnt from MS article is that XRM.Internal namespace is not supported.

    “The client object model contains the Xrm.Internal namespace. Use of the objects within this namespace are not supported. These objects, and any parts of the HTML Document Object Model (DOM), are subject to change without notice. We recommend that you do not use these functions or any script that depends on the DOM.”

    https://msdn.microsoft.com/en-us/library/gg328255(v=crm.6).aspx

    I believe it is not safe to implement this in real time projects until MS confirms that there won’t be a change in this namespace.

    Thanks,
    Pradeep

    • Debajit says:

      Hi Pradeepm,
      Yes you are right. And hence at the bottom of the blog i have already mentioned that this is not a documented library and any change in the future by microsoft would render the code unusable

  5. Pingback: Show Error Dialog in Microsoft Dynamics CRM style using Xrm.Internal.openErrorDialog - Microsoft Dynamics CRM Community

  6. Pingback: Using Xrm.Internal.openDialog as an alternate to showModalDialog in CRM | Nishant Rana's Weblog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: