While reading the news Microsoft is starting an All-in-One-Script Framework, I thought myself: Why won´t this be possible for Microsoft Dynamics CRM 2011.
Of course Microsoft Dynamics CRM 2011 supports the idea of using Libraries by supporting different types of webresources. Studying the SDK you´ll find serveral samples regarding using JScript and Programming Best Practices but there´s no All-in-One-Script Framework for Microsoft Dynamics CRM yet.

And this remembers me a pain, I already had developing for former versions of Microsoft Dynamics CRM. You will find a whole lot of code snippets, functions and methods. All of them solving one or more problems. While most of them works in CRM 2011 environments because of backwards compatibility, they should be converted to support Xrm.Page...References. And of course some of these snippets are using unsupported methods and if this is not documented you will get problems using the cross-browser support which is to come in Q4 2012 Service Release. Or you will end up in performance issues.

While using my own XrmJSToolkit in my projects, I started searching the Internet for useful Libraries, Script-Resources and Best-Practices, but I couldn´t find a one stop shop.
So the purpose of this article is to get an overview of great JScript Libraries you can use in your projects, test and demo environments. You will find an overview of already build functions and methods you don´t need to develop yourself. And maybe it is a starting point building a jquery-like Framework for Microsoft Dynamics CRM.

Microsoft itself started building the Xrm.Utility Functions with Update Rollup 8 and will extend these with the next Service Releases and Update Rollups. But there´re more Libraries containing great functions, methods and time savers I´ve listed below.

 URL  Name  Functions / Methods  X-Browser Support
Link  Xrm.Utility
  • openEntityForm
  • openWebResource

 yes

Link  SDK.REST.js
  • SDK.REST.createRecord
  • SDK.REST.retrieveRecord
  • SDK.REST.updateRecord
  • SDK.REST.deleteRecord
  • SDK.REST.retrieveMultipleRecords
  • SDK.REST.associateRecords
  • SDK.REST.disassociateRecords

 yes

Link  SDK.MetaData.js
  • SDK.MetaData.RetrieveAllEntities
  • SDK.MetaData.RetrieveEntity
  • SDK.MetaData.RetrieveAttribute

 yes

Link  SDK.DependentOptionSet
  • SDK.DependentOptionSet.init
  • SDK.DependentOptionSet.completeInitialization
  • SDK.DependentOptionSet.filterDependentField
  • SDK.Util.selectSingleNode
  • SDK.Util.selectNodes

 yes

Link  XrmServiceToolkit Common Functions
  • EnableField
  • DisableField
  • ShowField
  • HideField
  • UpdateRequiredLevel
  • GetObjectTypeCode
  • CalculateDaysBetween
  • AddNotification
  • ShowError
  • GuidsAreEqual
  • DisableAllControlsInTab
  • DisableAllControlsInSection
Rest Functions
  • Create
  • Retrieve
  • Update
  • Delete
  • RetrieveMultiple
  • Associate
  • Disassociate
Soap Functions
  • Business Entity
  • Execute
  • Fetch
  • Retrieve
  • RetrieveMultiple
  • Create
  • Update
  • Delete
  • QueryByAttribute
  • SetState
  • Associate
  • Assign
  • RetrievePrincipalAccess
  • GrantAccess
  • ModifyAccess
  • RevokeAccess
  • GetCurrentUserId
  • GetCurrentUserBusinessUnitId
  • GetCurrentUserRoles
  • IsCurrentUserRole
Extension Functions
     
  • JQueryXrmDependentOptionSet
  • JQueryXrmFieldTooltip
  • JQueryXrmCustomFilterView
  • JQueryXrmFormatNotesControl

 

not fully supported yet

Link  XrmSvcToolkit
  • createRecord (REST)
  • updateRecord (REST)
  • deleteRecord (REST)
  • retrieve (REST)
  • retrieveMultiple (REST)
  • associate (REST)
  • disassociate (REST)
  • setState (SOAP)
  • fetch (SOAP)
  • execute (SOAP)

 

 
 Link  CrmFetchkit.js
  • Fetch
  • Assign
  • FetchMore
  • FetchAll (async only)

 

     

yes

 Link  CrmRestkit
  • Retrieve
  • ByQuery
  • ByQueryUrl
  • ByExpandQuery
  • Create
  • Update
  • Delete
  • EntityReferenceFactory
  • Associate
  • Disassociate

 

 yes

 Link EBDDCRM.LibreriaJS 
  • Checkbox Style multiple choice
  • Convert Lookup to radio button
  • Change background and text color
  • Validate URL fields
  • Hide sections, tabs
  • Change field required level
  • Hide fields based on XML webresource
  • AddNotification
  • RetrieveEntityById

 

 
 Link

CWS.CRM.Utils.js


  • CRM Service class to Create, Update, Retrieve,
    RetrieveMultiple, Delete records (SOAP)
  • Custom Runtime Advanced
    Filtered Lookup support;
  • Set Lookup Value programmatically support
  • Guid Generator
  • CRM Form Buttons for CRM 4.0 & CRM 2011
  • Date Format prototype
  • Dynamic create support for Notes
  • Array Contains prototype
  • String EndsWith prototype
  • Check if the logged-in user has a certain role
  • Automatic Dialogs (launch in runtime) support

 
                

Hope you like this overview. Enjoy customizing your xRM Framework.