Monthly Archives: June 2014

30Jun

JavaScript references in Microsoft Dynamics CRM 2013

CRM 2013 is designed to be customized in almost any way imaginable.  Through the use of plugins, workflows, JavaScript and configuration, CRM can be adapted to fit a massive number of needs.  One of the best tools is JavaScript, which allows you to customize the form to interact and guide the user how you see fit.

I had searched through the SDK to provide a comprehensive reference to pass along to some developers getting ramped up on 2013, but really couldn’t find a nice collection.  I of course went to Bing and found a nice collection to share.

Slightly modified, here is reference documentation for client-side events and object models that can be used with JavaScript libraries (*marked is new in CRM 2013).

To start, this page is broken into the following:

Xrm.Page provides a namespace container for three objects: context, data, & ui

Xrm.Page provides a namespace container for three objects: context, data, & ui

 

Xrm.Page.context

Xrm.Page.context provides methods to retrieve information specific to an organization, a user, or parameters that were passed to the form in a query string. The following table lists the functions of Xrm.Page.context.

 Xrm.Page.context
client.getClient* Returns a value to indicate which client the script is executing in.
client.getClientState* Returns a value to indicate the state of the client.
getClientUrl Returns the base URL that was used to access the application.
getCurrentTheme Returns a string representing the current Microsoft Office Outlook theme chosen by the user.
getOrgLcid Returns the LCID value that represents   the base language for the organization.
getOrgUniqueName Returns the unique text value of the   organization’s name.
getQueryStringParameters Returns a dictionary object of key   value pairs that represent the query string arguments that were passed to the   page.
getUserId Returns the GUID of the SystemUser.Id value for the current user.
getUserLcid Returns the LCID value that represents the provisioned language that the user selected as their preferred language.
getUserName* Returns the name of the current user.
getUserRoles Returns an array of strings that represent the GUID values of each of the security roles that the user is  associated with.
isOutlookClient (Deprecated) Returns a Boolean value indicating if the user is using Microsoft Dynamics CRM for Outlook.
isOutlookOnline (Deprecated) Returns a Boolean value that indicates whether   the user is connected to the CRM server.
prependOrgName Prepends the organization name to the   specified path.

Read More »

© Copyright 2012-2014, All Rights Reserved