Monday, December 10, 2012

SSRS Execution Account Needs PrivUserGroup

I discovered, somewhat by accident, that if you specify an Execution Account in the SQL Server Reporting Services Configuration Wizard, the specified account will provide the security context for SSRS Web Services when using the CRM Reporting Extensions (SRS Data Connector).  Sound complicated?  It’s really not.

The Execution Account is SSRS’s way to connect to external resources which do not require login (or those for which no other credentials have been configured).  This keeps the SSRS service account safe from making any external connection with its own credentials.  CRM’s “SRS Data Connector” removes credential requirements in favor of an alternate impersonation scheme (which eliminates double-hop Kerberos, and makes reports easier to access).

Perhaps that was obvious to people with more SSRS education, but I thought it was a maintenance account.  /shrug  A brand-new installation is likely the place you’ll run into this issue.  Unfortunately, the real causes of the failure are best viewed from the SSRS logs.

The problem manifests as the following exception:

"Cannot create a connection to data source 'CRM'."

But ultimately is caused by this exception:

"Immediate caller <SQL Server Reporting Services Execution Account> has insufficient privilege to run report as user <SID>"

So the long and short of it:  if you specify an Execution Account for SSRS, and use CRM’s “SRS Data Connector”, then the Execution Account needs to be added manually to “PrivUserGroup”.

Thursday, October 18, 2012

Telerik wins a cookie!

I’ve had the fortunate opportunity to be working with Telerik ( tools in my Visual Studio development environment for a while now, and I like them.  JustTrace, JustCode, and JustDecompile are fantastic development accelerators that should be an integral part of any serious developer’s toolset.  However, it was an experience with a recent software update that really set Telerik apart, in my mind, from any other software I’ve used to date.

Recently, Telerik has introduced a Control Panel utility that centrally manages the installation and download of their products.  It’s quite handy, and saves a great deal of time and effort.  While I was using it to process updates yesterday, the installation of Telerik’s OpenAccess ORM product failed.  I tried to update it once or twice more, through the Control Panel, and each time it failed, I used the “Send Feedback” button—thinking that perhaps the error was due to some flaw in the update, and maybe this report would be aggregated with others to help isolate a bug.

I couldn’t have been more wrong.

Unlike other software vendors, Telerik takes its feedback very seriously, and those simple little buttons that relay crash data back to vendors generally does nothing helpful for the user—unless you’re using a Telerik product.

Today, I received an email from Petar Raykov, in the Telerik support team, who not only personally identified my reports, but suggested—very kindly—that I should consider shutting down Visual Studio when I apply updates, because file locks were likely the cause.

Man, do I feel stupid and important all in the same breath.  Of course, I should have known to close VS2012; but didn’t think it would be a problem since I originally installed the components on my still-present VS2010 installation.  However, the fact that I was personally contacted by Telerik, after using just a simple button on the product to send off exception data, astounded me.  Compound that with the fact that I expressed no severity or need to address this problem, and what you get is the picture of a company that just cares about how its software works for you.

Thank you, Petar.  Thank you, Telerik.  You’ve earned the highest marks in my book for quality of service and support by being proactive and concerned about the basic experience of your product.  I will continue to recommend your line of developer toolkits wherever I go, and share this story as I do it!

Sunday, July 1, 2012

My Third MVP Award

Microsoft graciously renewed my MVP status for 2012, as I found out today.  I don’t know why it keeps happening, but I love it and hope always to be worthy of it.  Having grown much closer to my MVP compatriots this year, more than previous years thanks to the MVP Summit, I am honored again to be placed among their ranks.

Ordinarily, I would have lots to say about it… but I can only thank Microsoft for yet another opportunity to continue in this capacity, and hope strongly that I will not disappoint the Dynamics CRM team in continuing to help steer the product’s development.  Also, I thank the community that has supported me all these years, and hope to be worthy in their eyes as well.

Friday, May 25, 2012

NDepend v4 Released

I’ve mentioned NDepend a scant few times, mostly because I’ve used it in limited fashion.  Though CQL was easy enough to learn, I found it difficult to quickly put together complex analytical queries against my code.  Patrick Smacchia answered my unannounced plight in the Version 4 release of NDepend with the revolution that is CQLinq.

By bridging the best of the CQL and Linq worlds together, Patrick has truly delivered the most effective and rapid-use code quality tool for .Net development.  NDepend has moved from being a utility of convenience to a core necessity in my personal development.  Regardless of whether or not you have experience with code quality tools for .Net development, I highly recommend investigating NDepend.

I look forward to continuing my use and integration of this latest version into my projects and using the power of CQLinq to its fullest extent.  Thank you, Patrick!

Sunday, April 29, 2012

CRM, Cookies, and You

I went out on an adventure to find out if I could pass extra data into a web service Message from the client, and discovered that it is possible to set a cookie at the browser (or an ISV page, if you’re into that kind of thing), and pick it up inside of a Plugin.  There are a few limitations and gotchas to this process, not the least of which being that this is considered an unsupported customization.

However, there are often interesting needs and situations for which you may want to pass extra data along to a Plugin, but don’t really have a good way to do it.  For instance, I wanted to watch a sub-grid for changes to records and identify only those changes which were made while the parent record was opened.  In this case, I wanted to catch an array of changes once the parent record was saved, and I needed this array to be specific to the singular “session” of the form’s lifetime on the screen.  (If anyone can think of an alternate, supported method for this that doesn’t involve a ridiculous amount of return trips to CRM, I’d love to hear it.)

Practically speaking, I was producing a rich audit trail with contextual links to changes with related records.  Because this was for CRM 4, there was no existing audit feature as with CRM 2011—however, I’m fairly certain this process can be applied to CRM 2011 with the consideration that it may fail in sandbox mode.

What I did was push indicators from the child window into a JavaScript array running on the parent window.  Then, I serialized these indicators into a JSON string, and established a cookie (again, in JavaScript).  By examining the “Request.Cookies” object at the plugin (after importing the necessary namespaces), I could identify and deserialize the contents and perform work at the Plugin.

Also, I discovered that “Response.Cookies” can be loaded with information by an ISV page (though depreciated in CRM 2011, are still available for on-premise use) and also discovered by the Plugin.  This can effectively overload a CRM web service transaction with extra information without messy things like temporary records (which will shoot SQL indexes to hell) and extra attributes.

I ran into trouble, however, when trying to set a cookie from JavaScript within an ISV page.  The Plugin would not identify this cookie, and I believe it’s due to the difference in the way the browser treats cookies from the runtime versus cookies from the domain (served in the HTTP response of the ISV page).

So, what are the limitations and gotchas?

  2. CRM 2011 Plugins operating within sandbox mode will probably be prevented from accessing the “Request” or “Response” from the “Page” context.  Again, I haven’t tried this with CRM 2011 yet, but that’s the assumption I’d have to make.
  3. The Plugin will only have access to the cookie from the “Page” context while operating synchronously.
  4. Cookies are persistent.  Most web developers understand this, but it’s easy to forget.  Once a cookie is set, it must be forcibly removed or allowed to expire.  Never assume that a cookie will not have survived its previous instantiation.

Cookies can be a two-way street of information, so there are likely many different and exciting uses for them to extend CRM’s functionality and encourage cross-talk between various UI elements that may otherwise have no sensible means of sharing data.  If you have used Cookies with CRM before, I’d love to hear what purpose they served!

Sunday, March 4, 2012

So This Is What I Missed…

I’ve successfully returned alive from my attendance of the Microsoft 2012 MVP Summit.  This was a minor concern, given that I was stricken with a bout of vertigo that still troubles me to a lesser extent today.

I missed last year’s Summit, and was quite anxious to attend this year’s event. This extended delay in participation allowed me to accrue more familiarity with the MVP world, and the topics reserved for NDA-backed channels. Thankfully, JourneyTEAM helped me attend during one of the largest projects I’ve ever been assigned.

The single greatest thing I’m looking forward to in the Dynamics CRM 2011 updates to come will be [CENSORED].  Sorry, folks.  You won’t find me spilling the beans of Geek Vegas here, because after partaking in the greatest conference of MVP minds throughout the entire world, I have found an appreciated value in my nondisclosure agreement.

Many folks don’t truly understand the impact or the purpose of this Summit.  Even as a second-year MVP, I didn’t fully understand.  In fact, based solely on the stories that do make it out of this event, an outsider may believe the experience to be purely about back-patting, drinking, and self-sustaining ego building.  I cannot state more emphatically than in bold text the following rebuttal:  this is not the case.

That said, I was not surprised to learn that of 55 Dynamics CRM MVPs, our attendance total was 41.  That means that 3 out of every 4 Dynamics CRM MVPs were at the summit, providing a voice for the community directly to the product teams.  We truly represented every aspect of our community, from independent developers to ISVs, from small businesses to enterprises, and from end-users to administrators.

Microsoft’s product teams generally have little or selective involvement in direct customer engagement.  Most of Microsoft’s public-facing customer involvement comes from either partners or Microsoft Support.  This layer of abstraction and occlusion, though necessary, provides little for a product team by the way of direction.  The MVPs are representative of the entire community, and help direct Microsoft’s products through updates, versions, and feature additions.

We love it.  It was no more apparent than during some of the more heated discussions and debates that littered the entire Summit experience.  Yet, at the end of the day, we all gathered at various Seattle bars to unwind with rounds of beers and drinks with umbrellas (you know who you were).

This isn’t a collection or even a community of experts.  It’s a family.  And I am damn proud to take part in it.

Saturday, January 7, 2012

XRM Virtual Presentation

On Jan. 10th, I’ll be making a presentation along such revered Dynamics CRM MVPs as Julie Yack, Scott Sewell, Donna Edwards, Leon Tribe, Shan McArthur, and Mitch Milam.  Our topic matter will be specifically those lessons we’ve learned the hard way over our varied experiences with CRM.

XRM Virtual is an open-membership user group with a lean toward developers and integrators.  If you’d like to register to attend this presentation, visit the Event Page.

Sunday, January 1, 2012

Google+ Page for Dynamics CRM

Lately, I’ve been trying to coalesce information streamed around various channels to which I’m attuned into a new Google+ page for Dynamics CRM.

Personally, I’ve become a heavier G+ user than Facebook, and not just because of its rock-solid performance—but because of many important privacy and intellectual property practices.  I’d recommend it for anyone looking to break out of Facebook once and for all.

LinkedIn is still a great professional resource for sourcing CRM talent and even assistance, so you’re sure to find great resources there too.  But its format and membership are rather rigidly defined compared to Facebook or Google+.

In any event, I welcome any contributions and “circling” of the G+ page, and hope to make it an active and engaging space for the CRM community, apart from the Microsoft public CRM forums where I can also be found.