Tip #239: The undo button

When you are working in an application like Excel and you accidentally type over some important text, isn’t it great to be able to hit the “undo” button? Don’t you wish that Dynamics CRM had an undo feature?

It can, with the help of Jason Lattimer’s nifty Audit Undo solution.

As long as the user has permission to view audit records, and auditing is enabled for an entity, a user can view the audit logs and undo changes to roll them back.

Note–while this tool is almost a year old, it is still super cool. Plus, I didn’t notice it when it came out because I didn’t need it, but then somebody made some changes that they shouldn’t have. Keep it in your back pocket–you will probably need it someday.

Tip #238: My workflow is my business

Hey, everybody, Larry’s opportunity pipeline this month is again bigger than everyone else’s. Larry, what’s your secret?

Larry, being somewhat softened by reasonable quantities of flavored C2H5OH, was more than happy to share his fortunes:

It’s all about power of automatic workflows, my friends. See how I automatically increase opportunity value the moment it’s created?

Opportunity Workflow

But if it’s automatic how come our records stay the same?!

No idea, but it works for me!

The secret sauce, of course, is frequently overlooked scope of the automatic workflows.
Workflow scope
If user creates a workflow and sets the scope to, ahem, User, then this workflow will only kick in for the records owned by this user. This setting, frequent source of workflow creators’ frustration, is a powerful tool to create private functionality scoped to individual, business unit, business unit and children, as defined by the current workflow owner and her business unit.

One useful application of that feature is ability to craft your workflow in production right under the nose of unsuspecting administrators. Set the scope to the user, work on your private records, make sure the workflow works as expected then change the scope to, say, organization.

Tip #237: When moving data, keep the record ID

When you are migrating data between two CRM environments, such as going from CRM On Premises to CRM Online, one of the best things you can do is move the record ID (GUID) of the records. This way, if you have a relationship or a lookup field that references another record, you will not have to do any transformation or lookups to resolve the record ID–you can just move it via straight insert.

The same applies to user ID’s. If you use CRM On Premises, you can create user records using data migration/integration tools like Scribe Insight or SSIS + Kingswaysoft. Since every record has user relationships, like ownerid, preserving the unique identifier of user records will dramatically simplify your migration.

However, be aware when you do this that there are some fields that are only populated on user records for CRM Online deployments. In a recent migration moving data between two CRM On Premises environments, when moving the user records was attempted, the migration DTS returned the following error:

This is not a valid Microsoft Online Services ID for this organization.”

Turns out that one of the organizations was originally a CRM Online environment that was moved On Premises. Removing the following fields from the DTS mapping made the user record migration work successfully.

  • islicensed boolean(1)
  • issyncwithdirectory boolean(1)
  • invitestatuscode integer(4)
  • windowsliveid nchar(1024) 

Thanks to Evan Watson for input on this tip.

Tip #236: How to be a time[r] lord

Spring ’14/SP1 release has introduced a number of very exciting features to the customer service functionality of Dynamics CRM including Service Level Agrements and Entitlements. The decision also has been made to introduce Spießrutenlaufen, previously reserved for developers, to the customer service officers. Yes, I’m talking about timer control

Xrm.Page
  .getControl('foobar')
  .getControlType() == 'timercontrol';

The other good news is that this control can be dropped on any entity’s form that has a date/time field (well, there is always createdon and modifiedon) and an optionset.

Tired of long meetings running over time? Drop timer control on the appointment form:

Timer Control

and keep the form open during the meeting, control will turn change color (pantone code “nasty red”) once you’re over the line:

timerover

And meeting is a success only when it’s over:

timersuccess

Tip #235: Avoid over-use of required fields

Many a CRM customizer has decided to make a bunch of fields on a form required in an effort to force users to at least submit a minimal amount of information when creating a record. But could it be that by requiring many fields you are actually getting less information than if you didn’t require all those fields to be completed?

I came across some research from the University of Cambridge on the voluntary over-disclosure of information in web forms. Researchers found that users completing forms will naturally over-disclose information that is not required when completing web forms. Surprisingly, the more fields on the form that were mandatory to complete the form, the fewer optional fields were completed by users. It seems that mandatory fields get more attention from users, causing them to ignore the optional fields.

Granted, there is a difference between a web form and a CRM form, and there are certain fields that have to be populated for business processes to run successfully, but I think there is a case to be made for limiting unnecessary use of required fields. By requiring many fields, you may be conditioning your users to only submit the minimum amount of information.

Tip #234: Beware of the IOS 8.0.2 update

If you use an IOS device, you know that there have been many updates recently. The IOS 8.0 release on September 17 was shortly followed by the 8.0.1 update. This release broke many user’s cellular connections, so Apple rushed out the 8.0.2 update to fix the issues introduced in 8.0.1.

So what does this have to do with Dynamics CRM?

If you are running the CRM for Tablets app on your iPad, you should be aware of the impact that upgrading your iPad may have on the tablets app. First thing, IOS 8 is not officially supported. This doesn’t mean that it won’t work. I’ve tested it extensively, and I have not seen any issues.Until updating my device to 8.0.2.

If you have CRM for Tablets installed on your iPad and you install 8.0.2, you will notice that the screen appears “stretched,” and that the more options (…) button is not displayed. This will significantly limit usability of the app.

If you have already installed the update, removing the CRM for Tablets app and reinstalling it should return the more options button and make the app once again usable. If you have not installed the 8.0.2 update, you will probably want to hold off until the app has been updated to address this issue.

Bigger picture, train your users to not automatically install every update the minute that it is released. Wait until you test the CRM app on a device with the new update on it. Just like Windows updates on your PC’s, mobile OS updates can introduce new issues and cause unplanned downtime for users if these updates are not tested properly with mission critical apps.

Tip #233: Including external data in internal reports

You want to have a report in Dynamics CRM reference a database other than the Dynamics CRM database. Maybe you want to join external data, like data from your Dynamics AX ERP system, to account data in Dynamics CRM.

In many cases, the best answer is to use a data warehouse, Write a report that points to the data warehouse from an external reporting server, then display the report in Dynamics CRM using the link to URL report feature to point to another report server.

However, sometimes this is not practical. Maybe you don’t have a data warehouse or separate reporting server set up, and you simply want to include data from another database in your Dynamics CRM reports. This can be done.

First thing you need to know is that when you upload a SQL based SSRS report to your on premises CRM environment, the application overwrites the data source to use the shared MSCRM data source. This means that you cannot just add a data source pointing to another system in your SSRS report. It will fail to upload.

  1. Create your SSRS report in SQL data tools/BIDS and create an embedded data source pointing to your Dynamics CRM database.
  2. Make sure that the service account that your MSCRM services runs as has permission to read the other database. This database should either be on the same server as the CRM database, or a linked server should be created so both databases can be queried from the same SQL server.
  3. Write your data set query, be sure to specify the fully qualified table name of the external system database. You can join this table to the CRM database in your query to include data from both CRM and another system in the same report.

Using this approach you can also use CRM specific report functionality like prefiltering against other data sources. If you query the MSCRM database filtered views using the CRMAF alias prefix and join to another database using the fully qualified table name, prefiltering will still work in the report.

Tip #232: Vanity monitoring

Woo-hoo! Our CRM uptime has been 99.999% for the past 6 months! One awesome internet facing deployment we cooked up!

What do you use to measure that?

One of these wonderful and free services

Uhm, you do realize that all you have been measuring is the uptime of your ADFS login page?

These are vanity metrics – they paint the pretty picture but are otherwise useless.

To record the fact that your CRM is up and running, you need to perform a login and get at least first authenticated page. CRM login is a complex process, depending on the needs it’s either federation or OAuth and neither is for the faint-hearted. None of the reasonably priced third-party monitoring tools I had a look at were capable to perform authentication magic out of the box.

Couple vendors, however, do provide enhanced page monitoring using webkit based browsers at their end that can replay user action recorded on the client side. http://site24x7.com/ offers standalone tools while http://alertsite.com/ uses browser plugin approach; either one works fine and does allow replaying of the login process:

alertsite

Note that this test falls through to the mobile site because browser is not identified correctly – something that probably is not difficult to do.

Before you drop everything and start recording massive scripts consider the following:

  1. Talk to your users. What matters to them is important. If they say it’s slow, there is no point in bombarding management with the figures proving otherwise.
  2. Don’t measure just “no error” response from the server. While you are at it, measure response times for specific pages. CRM that never sleeps but where every page takes 15 seconds to load is unlikely to be loved by the users.
  3. Most of the monitoring services offer world-wide coverage, some of them do allow selection of the monitoring servers. Use that. Page load times of 100ms from Greenland or Mongolia mean very little. Unless you have users there, in which case drop us a line – we’d love to hear from you!
  4. For on premises installation consider [temporarily] injecting monitoring scripts into generated HTML (some of the packages do allow that) – that will give you a much better approximation of the user-experience and much clearer picture of the bottlenecks.
  5. Consider monitoring not only CRM application but also CRM web services, especially if your CRM integrates with third-party packages that utilize them. Authentication will be a challenge, some vendors do support crafting SOAP requests explicitly, look into that.
  6. Understand the anatomy of the page load in CRM 2013. A lot of functionality is now delivered asynchronously and even though full page load time could span into seconds, page can be responsive and useful long before that.
  7. Add monitoring of your SQL Server – if you have one – the primary suspect on any given day when performance metrics decide to take the southbound route.
  8. On premises compliment monitoring with Dynamics CRM performance counters.

Tip #231: Increase the limits of CRM for Tablets

The tablet app for Dynamics CRM includes limits on what can be included on a form in the app:

  • 75 fields
  • 10 Grids
  • 5 Tabs

These limitations are there for a reason: mobile devices have lower RAM than a PC browser, so the default limits are there to ensure good form performance. However, sometimes you may have a situation where you need to show more on the form.

CRM includes organization settings that can increase these limits. You can change these settings using the OrgDBOrgSettings tool, available with any update rollup download. This post will give you instructions on how to connect the tool to your environment, on premise or online.

The following are the settings that you can modify to increase the tablet client limitations. Be sure that after you make this change that you test the app in the device type that your users will be using to verify that performance is acceptable in your more complex forms.

Setting Max Value
TabletClientMaxFields 500
TabletClientMaxLists 50
TabletClientMaxTabs 50

Tip #230: Ban the browse button

Corporal punishment by bayonetsI like German words. Take, for example, Spießrutenlaufen. If you like me, and don’t speak a word of German, you know, just by looking, that the word means business, the word means corporal punishment.

I often wonder if ignorance of the developers can be cured by introduction of Spießrutenlaufen for coders. Function is longer than the screen – slap on a wrist! Still using Polish notation – 3 cuffs! Broke the build – 7 kicks! Adding assembly references by hand – go stand in the corner for 10 minutes! On one hand!

What do you do if your project requires either 2011 or 2013 SDK assembly? Do you click Add > Reference for the project and then click Browse button to get to this?
Adding assembly references

If yes, then look at this word again: Spießrutenlaufen. Why is adding assemblies bad? Where do I begin? Versions, for one. Broken path to assembly, another reason. My SDK assemblies are in q:\__(@#$%^&)__\randomstringtomakeaverylongfoldername\schadenfreude folder, that’s why you’ll be seeing yellow exclamation marks when loading one of my projects.

Since all 2011 and 2013 SDK assemblies have been published on NuGet, there is absolutely no reason to use evil Browse button. Need to work with 2013? Simple steps:

  1. Click Tools > NuGet Package Manager > Manage NuGet Packages for Solution
  2. Click Online > nuget.org
  3. Search for CRM 2013
  4. Depending on your project needs select one of the packages (hint: when selecting a package, read the description on the right hand side to see what assemblies are on offer), click Install

That’s it in the nutshell. Use your search-fu to find more information about precise version management, how to make nuget and source repository play well together, etc.

And, yes, NuGet packages already contain 6.1.1 assemblies and references in your project will be automatically refreshed, no need to do anything.