Tip #701: Don’t leave components behind

Leaving someone behindGood, old, and fairly reliable components like email router tend to slip under the monitoring radar. They work for months on end and it comes as a surprise when they stop and, in a lot of cases, we discover the problem only because users start complaining.

For quite some time Dynamics CRM 2015 Email Router ruled the day – it worked fine with CRM Online, CRM 2013, CRM 2015, and CRM 2016. We used one instance for a number of customers and forgot all about it. Until one of CRM Online customer got their organization updated to, uhm, Update 1, and users started to see infamous “You’ve got pending email” box when logging in. Apparently, that’s where the line for forward(backward?) compatibility was drawn, as we had our server log filled with:

“#23379 – Could not verify the version of Microsoft Dynamics CRM at https://disco.crm5.dynamics.com/noneofyourbusiness. The Email Router service that is installed is not a supported version. The Email Router version is earlier then expected by the Microsoft Dynamics CRM server at https://disco.crm5.dynamics.com/noneofyourbusiness.”

As one would expect, update to the latest release, i.e. 2016 + Update 0.1 took care of the issue but the lesson learned:

When CRM Online customers have their instances scheduled for updates, mark these days in your calendar

Think about dependencies, external components, service integrations and be ready on the day. Better yet, have a sandbox organization provisioned and test the upgrade. And don’t leave components behind even if we are working fine because one day they will surprise you.

Tip #699: Don’t go back on context

Tima and PunishmentThis one is for javascript lovers. If you work with HTML web resources, you know that you need to include ClientGlobalContext.js.aspx to get CRM context in your script.

If everything is working correctly but you receive JS error “GetClientContext is not defined” when using back button in Chrome browser, add dummy query parameter to the script url:

<script 
  src="../../ClientGlobalContext.js.aspx?type=script"
  type="text/javascript">
</script>

This is because ClientGlobalContext.js.aspx has some narcissistic tendencies: after it’s been loaded, it loads itself again but not as script but as xhr type – and that one unexpectedly overwrites the cached script.

If you’re yearning for more details, read the nail-biting story of discovery and enlightment at Daryl “New MVP on the block” LaBar blog.

Tip #698: Tipster guide to Voice of the Customer – Responses and Feedback

Bad survey and feedbackDid you know that in Dynamics CRM Voice of the Customer you can collect responses, and then you can collect the feedback? In this video, we walk you through the differences between those. We talk about configuration and customization, as well as when it is recommended to use each one. In addition, we explore response polling triggering.

YouTube player

Give us your feedback, all of it: good, bad, and ugly, I’m sure we can take it. Suggest new topics either in comments or by sending your ideas to jar@crmtipoftheday.com.

Don’t forget to subscribe to http://youtube.com/crmtipoftheday.

Tip #697: Move to Seattle until August

Sleepless in SeattleDamian “Unleashed” Sinay has been putting Project Service Automation in CRM Online through its paces but discovered that when he creates a new project from a template he would get the following error when going to the Work Breakdown Structure: “There was an error copying the project. Please delete this project and try again.”
WBS error for new projects

When he was trying to do this from one of the existing sample projects he was getting a different error: “There has been an error loading the project’s work breakdown structure. Please refresh the page to try again.”
WBS error for existing projects

I leave it to the language experts to argue the use of “there was an error” vs. “there has been an error” but, most importantly, these are known bugs in the current release that have been identified and fixed, and soon will have been deployed to CRM Online.

In the meantime, Damian found a neat workaround: changing user’s timezone to PST (UTC-8) resolves both issues. As the man himself explains:

I had to change only the time zone that is in the personal options of the CRM UI (not the computer) to GMT-8 Pacific time. Looks like they are connecting to a service that is located there and are validating against that time zone.

So if you want to try WBS in PSA until the fix is released, move to Seattle, at least virtually.

Tip #696: Get your foot out of your (email) mouth

Foot in mouthEver send an email and immediately regret it? Ever accidentally copy a recipient on an email that you wish you hadn’t? Unfortunately, email (outside of your Exchange server) does not have a way to recall/undo a sent email.

Having done this once too often, I created a rule in Outlook to delay sending emails by 2 minutes.

1.In Outlook 2013/2016 click “File”

2. Click the “Manage Rules & Alerts” button

manage rules

3. Click “New Rule” and select “Start from a Blank Rule” >> “Apply rule on messages I send” then click the Next button.

ruleswizard

4. On  the condition screen, don’t select any checkboxes and click “Next.”

5. Outlook will remind you that this rule will apply to every message you send. Click “Yes.”

allmessages

6. On the actions page, select “Delay delivery for a number of minutes.” Click the hyperlink for number of minutes and specify the number of minutes that the email should be delayed. I went with 2 minutes.

delay delivery

7. Click “Finish”

Now you will have two minutes after clicking send on an email to change your mind or undo the email being sent and get your foot out of your mouth.

Tip #695: Full text search and field length

Standard field lengthIf you are on CRM 2015 Update 0.1 or later, you can enable full text search and make the quick search in CRM perform faster. If you do this, there is one drawback of which you should be aware: you will not be able to modify the field length of any field set to be a find field after full text search is enabled.

If you find yourself needing to change the length of a find field, you can disable full text search; however, you will need to wait until the maintenance job runs before you can modify the field length. This can take a while.

Alternatively, some administrators have reported success by manually dropping the full text index using SQL Management Studio, changing the field length in CRM, and then manually recreating the full text index in SQL. This approach is unsupported.

Tip #694: Access demo and learning materials when you are not a partner

Selling your soulTip #689 maybe the quickest way to create CRM Online demo but one of the requirements is that your email must be associated with a Dynamics CRM Partner.

But what if you are an independent consultant or just started a company and yet to acquire the coveted status? Peter “I think I’ve got the right one” Hale reports from the field that you can trade a small piece of yourself by signing up with https://www.365talentportal.com/ using your standard Microsoft account. You then get access to the goodies like Dynamics Learning Portal and the demo site.

Note: it’s a sleek looking portal but we are not affiliated with it in any shape or form. Trade your soul at your own discretion.

Tip #693: Tipster Guide to Dynamics CRM Project Services – Sales Automation

Snake Oil SalesDepending on your role in your organization, Dynamics CRM Project Services Automation can be used in several different ways. One of these ways is to manage you sales process as you quote and sell out your projects. This video shows you how to accomplish this.

YouTube player

Give us your feedback, all of it: good, bad, and ugly, I’m sure we can take it. Suggest new topics either in comments or by sending your ideas to jar@crmtipoftheday.com.

Don’t forget to subscribe to http://youtube.com/crmtipoftheday.

Tip #692: Extract Word and Excel templates from CRM 2016 like a boss

The creativity of our fellow CRMers does not stop to surprise me. They go to the extraordinary lengths to avoid code because, as the true masters of their craft, they do not parade the skills just for the sake of it. But, as I was preparing the awesome tip #691 I couldn’t help but repeat “there must be a better way”.

Good developers write good code but

true developers only write code when there is no any other way or when the alternative is too painful to execute.

Military ExtractionTooth ExtractionExtracting the templates from CRM 2016 seem to be one of these cases. There are extractions and then there are extractions.
 
Compare setting up a fake workflow with the script that uses PowerShell module for Dynamics CRM Organization Data and extracts all templates including Excel ones into a temp folder in one sweet move:

Import-Module Microsoft.Xrm.Data.Powershell
$Global:conn = Get-CrmConnection -InteractiveMode

# get all template records
$templates = Get-CrmRecords `
    -EntityLogicalName documenttemplate `
    -Fields name,documenttype,content

# loop through the templates 
ForEach($t in $templates.CrmRecords) 
{
  # figure out file extension
  if($t.documenttype -eq 'Microsoft Excel') { 
    $ext = '.xlsx' 
  } 
  else {
    $ext = '.docx'
  } 
    
  $filename = 'c:\temp\' + $t.name + $ext
  write-host $filename

  # decode and dump file content 
  $bytes = [convert]::FromBase64String($t.content)
  [io.file]::WriteAllBytes($filename, $bytes)
}

Like a boss memePS. Credit where credit is due. After writing the script above I found the equivalent C# code, so I won’t be claiming land rights on this one.