Uncategorized

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 »

9Apr

UConn Basketball’s Responsibility

Tonight I found something pretty discouraging that I felt somewhat compelled to share and comment on.  Granted this has nothing to do with CRM, per say, but it applies to projects and life in general.

UConn basketball's dirty secret

UConn basketball’s dirty secret

I came across an article titled “UConn basketball’s dirty secret”.  The attention grabbing headline coupled with UConn’s recent national championship, immediately lead me to dive right in.  Unfortunately, I found the author purposely misleading the facts surrounding UConn basketball’s academic situation.   The numbers are factual, just manipulated for viewership.

To summarize, UConn’s graduation success rate (GSR) is an abysmal 8%.

Granted this is extremely low, but in reality has nothing, absolutely nothing, to do with the current team or head coach.  The 8% represents the players (and coaches/administration) from the 2006-2007 men’s basketball team.

In reality, UConn’s academics are drastically improving…

Showcasing Shabazz Napier, the tournament’s MVP, is comical only because he’s on pace to graduate this semester with a degree in Sociology.  In fact his main reason to come back to school for his senior year was to keep a promise he made to his mother about graduating.

 

UConn basketball’s head coach, Kevin Ollie, became the head coach in 2012.  Last year, Ollie’s first season as head coach, UConn was ineligible to play in the NCAA tournament due to academic issues stemming from the 2009 academic year.

As far as the program goes:

“The academic improvement that our men’s basketball program has made over the past three years in the NCAA’s Academic Progress Rate has been well documented,” athletic director Warde Manuel said in a prepared statement. “Our team has earned three outstanding scores in a row, including a perfect 1,000 for the 2012-13 academic year, which will be officially announced by the NCAA this summer.”

 

Granted, I understand we’re talking about gaining viewership versus covering a topic without bias.  I’m probably asking for too much.  Glamorizing rear-view facing metrics clearly grabs attention, but in turn misrepresents the current trajectory of the program.

 

Criticizing is easy, but accepting responsibility isn’t

“There are two primary choices in life: to accept conditions as they exist, or accept the responsibility for changing them.” –Denis Waitley

Not to over analyze, but in life you can always look at the negative of things.  If someone is determined, you could argue that they are stubborn.  If someone is mellow, you could argue they lack passion.  I’m arguing this article was all about viewership, when in reality the author may not have been the one to select the photos which infer these players have anything to do with these numbers.

UConn has clearly accepted their responsibility and there is plenty of data to support this.  Let’s embrace their bracket busting victories and offer continued encouragement to these student athletes that can’t even afford to eat.

31Mar

What CRM is Missing Most

Face it, CRM is missing some key functionality.  Think about it for a second, what is in Word, Excel and every other product that matters?  If you went to Convergence, you may have heard some rumors and I found, from a very solid source, that it’s all true!

With UR3 coming later this month, Microsoft is introducing…

Read More »

4Feb

XRM 2011 JavaScript: Another 101 Lesson in Microsoft Dynamics CRM 2011

When you’re learning JavaScript, you’ll often come across the need to do something to every field on the form.  When you do, it’s important to have efficient code to make such widespread changes so the user doesn’t have to wait for the JavaScript to finish.  This lesson consists of several parts, some of which you’ll probably already know but hopefully there are some things in here for everyone.

Setting up our Environment

First thing first, open your CRM 2011 development environment and browse to an account form.  Once the account form is open, hit F12 on your keyboard.  A window should popup that looks like this:

image

If instead, you see the window in the bottom of your browser page.  Click the little “Unpin” button shown here:

image

 

This is IE Developer Tools and if you haven’t used this in the past, then I hope you enjoy not having to save/publish/refresh/test nearly as often.  To start, we’re going to see how many fields we have on the form.  When inside of the CRM form, we’d use something like:

Xrm.Page.data.entity.attributes.getLength()

But when we’re inside Developer Tools, we actually have a different context.  So we need to click on the “Console” tab and execute:

frames[0].Xrm.Page.data.entity.attributes.getLength()

image

 

Anything we want to execute on the form, we can do by simply prepending “frames[0].” in Developer Tools to get the proper context.  This allows us to write and test code instantaneously, which is a huge timesaver.

Read More »

© Copyright 2012-2014, All Rights Reserved