Monday, November 03, 2008

Localizing a Custom UI in Dynamics CRM 3

While working on a project using Microsoft's latest Dynamics CRM installment (4.0) we needed a dashboard like page running on an IIS site that was localized according to the CRM user's locale. If you're reading this you probably already know CRM user's have a locale attribute. CRM uses this to localize the UI and not the browser's locale setting. Create an ASP.net page based on the browser setting was quite simple (even for an ASP.net noob like me!)

The following is what I did to use CRM's locale setting.

In the web.config include the following:


<globalization culture="auto" uiculture="auto">


This should be placed inside the system.web node. It enables the app to be localized. Once this is in place insert this code into the page's backing code file (ie: Default.aspx.cs or whatever it's named)



protected override void InitializeCulture()
{
this.orgname = Request.QueryString["orgname"];
this.orglcid = Request.QueryString["orglcid"];
this.userlcid = Request.QueryString["userlcid"];
if (userlcid == null) { lcid = orglcid; }
else { lcid = userlcid; }
if (lcid != null) {
// Only set the Culture if CRM passed us the locale.
// If not it will be automatically set to the browser setting..
CultureInfo culture = new CultureInfo(int.Parse(lcid));
Culture = culture.Name;
UICulture = culture.Name;
}
}



This code is relying on CRM to pass the orglcid and userlcid (organization's default locale id and
the user's locale id). To enable this add "PassParams=true" to the link's entry in the sitemap.

That's pretty much it.. Now when I reference a properties from my asp page like this:


<asp:Label ID="Label3" runat="server" Title="<%$ Resources:Resource, com_foo_dashboard_time_title %>">


It will be localized according to the user's CRM setting.

Happy coding.
Gary

Thursday, May 08, 2008

Friendly Boston!

My family and I took a trip this past weekend to Tampa. There were two nice and helpful people at the Boston Logon airport (not so nice in Tampa! :-( ) So I thought I'd take the time to mention it.

First, when we arrived at Logon airport we were informed we over packed one of our bags.. Apparently there is a 50 pound limit (I wonder where that is posted?) At any rate the person checking us in gave us a "warning" about the weight. She was extremely helpful and nice. Recommending that we purchase another bag in Tampa and shift some weight around. Which we did.. But just not enough. We were over by 16 pounds in Boston and over by 6 in Tampa. Those 6 pounds amounted to an 80$ fine in Tampa.

Second, our return flight from Tampa to Boston was over an hour late and our ride needed to get someone else. So we had about 45 minutes to "waste" at Logon. As we walked towards a map with that "confused" look on our face a friendly "sky cabby" approached us. He helped us locate a restaurant in another terminal. He even fetched us a luggage cart (free of charge!!). Helpful and friendly. Two things people don't associate with Boston.

Its good to be home...

Wednesday, October 17, 2007

New Yard Sale Search Site!

Just released to the public (in Beta, after all it's web 2.0!) GoYarding.com. With GoYarding.com you can search for local yard sale using an address and a keyword. Looking for someone selling hand tools? Just enter in your address and "hand tools", click search and GoYarding!!!

Monday, January 01, 2007

What does it mean to exceed?

My wife recently received her annual performance review and it didn't go as well as usual. You see, my wife has been with her company for 17 years. She has received an exceeds each and every year until this one. At the end of 2005 she was transferred to a new location and though she was doing the same kind of work (Business Analyst) she was doing this in a new business environment. When she received her review her boss told her she wanted to give her an exceeds but was pressured by other managers. The reason given was that my wife doesn't do the same work as two other analysts who have been working for this Line of Business for years. My wife was told that they didn't expect much from her being new to the business but she did far better then they hoped. If they didn't expect much from her but she exceed those expectations then what does it take to "exceed"?

The company does have a policy where only a select percentage of a team can "exceed". That way they can keep costs down (bonuses and pay raises will be lower for those that don't exceed) so this easily explains my wife's situation. She is the outsider and is the easy target of a non-exceeds. But this made me wonder:

"What does exceed mean?"

If you are an expert at what you do and people expect that level, is it possible to exceed? If you are new to a job and they don't have very high expectations is it easy to achieve them compared to the 20 year veteran? Is it difficult to determine when an employee exceeds expectations?

What if you were testing an application to determine it's response time.. If you set you expectations at 2 seconds and the web page responds in 1 then it exceeded your expectations.. If it responds in 2 then it did not. Obviously judging an employee is much more subjective then that or is it? Every job I have had has set my goals for the year ahead of time. Once the goals are defined shouldn't it be easy to see if the employee met those goals?

Labels: ,

Happy New Year!

Ok it's about time I update this thing!! Sorry its taken so long but it's been a long vacation. Ok it wasn't a vacation, it was just me being lazy.. But I'm back now to do some blogging.. But before I do I noticed something kind of amusing about my Blog URL. The title of my Blog is "Neutiquam Erro", but my url says "neutiquamerror" Yes that was a misspelling. Not on purpose either. I guess I'm living up to the description on the side. Anyway, Happy New Year!

Labels: ,

Tuesday, October 25, 2005

What's up with all the pumpkins?

One October night my wife and I were amazed by a cabbie.. He said and I quote "what's up with all the pumpkins?" I know what you're thinking.. He as from another country and didn't understand the tradition. Wrong.. He was as American as apple pie. To this day we laugh whenever we drive down the road and see pumpkins. (side story. Someone stole my kid's pumpkins from our front porch.. Someone should find the thieves.. tie them up and beat with a pipe!)