New or noteworthy in JavaScript context object for CRM 2013

The new SDK for Dynamics CRM 2013 is out (see previous post for the link), and a few calls stand out when working with JavaScript:


instead of using the old isOutlookClient now we have more flexibility to determine the client. the returned values include

  • Web
  • Outlook
  • Mobile

use as follows:


Pay attention to the list of entities where this works, as it works on those that have received an updated user interface. A list of these is provided at the end of this post.


this replaces the old getServerUrl().

Use this to determine of the URL used to access the application. Distinction is made now not only between whether we are dealing with an Online or on-premise, but also if using the offline feature of the Outlook plugin.

Values returned are:

Use as follows:



use for instances where Outlook is being used. This will return the selected Outlook theme the user has configured. This can be helpful when you design your web resources to match the Outlook client theme.

NOTE: Forms will not adapt to the various themes selected, only the custom web resources can be made to adapt.

Standard values returned as of now are:

  • default (web app)
  • Office12Blue (for the Blue theme)
  • Office14Silver (for the Silver or black theme)

Use as follows:



returns the selected base language for your organization. For a default English you will get 1033.

Use as follows:



return the GUID for the current user. Note that you still need a call to the web service to retrieve the Full Name if you need to display that in a web resource.

Use as follows:



Returns the user selected preferred language. You can use this when customizing communication from a specific user, or any other situations where you need to compare the user selected language versus organization default language.

Use as follows:



Unfortunately available only for the updated entities, but this is returning the user name of the current user.

Use as follows:


Updated Entities

The following entities have received the updated user interface to the time of this writing:

Account, Appointment, Campaign, Campaign Activity, Campaign Response, Case, Competitor, Contact, Contract, Contract Line, Email, Fax, Invoice, Lead, Letter, Marketing List, Opportunity, Opportunity Product, Order, Phone Call, Price List Item, Product, Quick Campaign, Quote, Recurring Appointment, Sales Literature, Team, Task and User.

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s

Create a website or blog at

Up ↑

%d bloggers like this: