Friday 4 May 2012

Dynamics CRM 2011 - Client side Context Reference

Today, I came across couple of very useful links on Client-Side Context Reference.

http://www.resultondemand.nl/support/sdk/d7d0b052-abca-4f81-9b86-0b9dc5e62a66.htm
http://technet.microsoft.com/en-us/library/gg328399.aspx

I would like to post the consolidated details of the same here in below post.

Your code will need to operate within a context where a number of variables are not known at design time. The context object provides methods which can be used to retrieve information that is specific to a user, an organization or parameters passed to a page.

Following are the methods of the context object:-

· getAuthenticationHeader
It is a deprecated method used to return the encoded SOAP header which is necessary to use Dynamics CRM 4.0 web service calls using Microsoft Jscript.

· getCurrentTheme
This method returns a string which represents the theme currently chosen by the user in Microsoft Office Outlook.

· getOrgLcid
This method returns the LCID value representing the base language for the organization.

· getOrgUniqueName
It returns the unique text value of the organizations name.

· getQueryStringParameters
This function returns the query string arguments as an array of key value pairs.

· getServerUrl
This method returns the base server URL. The URL format varies for on-premises Microsoft Dynamics CRM 2011, Microsoft Dynamics CRM Online or working offline with Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access.

· getUserId
It returns GUID value of the SystemUser.Id value for the current user.

· getUserLcid
This method returns the LCID value of the Language Pack that the user selected as their preferred language.

· getQueryStringParameters
This function returns the query string arguments as an array of key value pairs.

 · getUserRoles
This function returns an array of string that represent the GUID values of each of the security roles that the user is associated with. This method does not return GUID values that represent the team security roles that the user may belong to.

 · isOutlookClient
This function returns a Boolean value which indicates if the user is using the Microsoft Dynamics CRM for Microsoft Office Outlook client.

 · isOutlookOnline
This function returns a Boolean value indicating whether the user is connected to the Microsoft Dynamics CRM server while using the Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access client. When this function returns false, the user is working offline without a connection to the server. They are interacting with an instance of Microsoft Dynamics CRM running on their local computer.

 · prependOrgName
It prepends the organization name to the specified path.

1 comment:

  1. Copy-paste from SDK? http://technet.microsoft.com/en-us/library/gg328399.aspx

    ReplyDelete