Tip #573: CRM Online vs CRM On-premises features FAQ

Celebrity deathmatchSomeone at Microsoft has heard our online vs on-premises battle and decided to resolve it once and for all.

CRM 2016 – Online vs on-premises features FAQ is now available on the Help & Training site.

Some things are interesting and unexpected, others – not so much (like “Switch or delete an instance of CRM Online” feature is available for CRM Online only. Well, duh…)

Tip #572: Tipster guide to Dynamics CRM 2016 Customizing for Interactive Service Hub

if(today == Friday) 
{
   post.Category = Categories.Video;
}

In this video we introduce to the new customizations options that are available for the new Interactive Service Hub as part of Dynamics CRM 2016. We will look at the new interactive Dashboards, entity forms, and entity dashboards.

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.

Tip #571: Unable to publish solution with calculated fields

If you attempt to publish a solution containing an entity with calculated fields, you may receive the following error message:

Field foo_calculated cannot be created or updated because field foo_used_in_condition_or_formula contains an additional formula that uses a parent record.

The wording is misleading and confusing because field foo_used_in_condition_or_formula is not a calculated field at all. The error is documented as:

ErrorId ManagedErrorName ErrorMessage
80060433 CalculatedFieldsEntitiesExceeded Field {0} cannot be created or updated because field {1} contains an additional formula that uses a parent record.

Which does not make it even remotely clearer.

What the error is trying to say is that there is a child entity with calculated fields that refer to foo_calculated field. Solution, as it turns out, is very simple:

If your entity contains a calculated field that is used in formulas of calculated fields of another (child) entity, make sure to include this child entity in your solution

Tip #570: Remote debugging in CRM with vorlon.js

Our resident visual effects tipster asked me the other day if I had any experience with using vorlon.js in CRM. I didn’t as I never heard of it. But since someone somewhere some time ago pointed out that these days <random noun>.js is probably a valid javascript library, I decided to take a look.

As it turns out, vorlon.js is a very cool

An open source, extensible, platform-agnostic tool for remotely debugging and testing your JavaScript. Powered by node.js and socket.io

Steps to enable vorlon for your CRM:

  1. Install node and npm. Easiest way to do it is to use PowerShell
    install-package -name nodejs
    install-package -name npm
    
  2. CRM won’t allow loading anything over http and we’ll need a certificate that we can generate ourselves using openssl.
    install-package -name "openssl.light"
    openssl genrsa -des3 -out server.key 1024
    openssl req -new -key server.key -out server.crt
    copy server.* c:\temp
    
  3. To make browsers to trust our dodgy certificate, import server.crt into Trusted Root Certification Authorities store (e.g. using mmc certificate snapin)
  4. Install vorlon
    npm i -g vorlon
    
  5. Modify server/config.json to enable ssl
        "useSSL": true,
        "SSLkey": "c:/temp/server.key",
        "SSLcert": "c:/temp/server.crt",
    
  6. And run it
    vorlon
    
  7. Open browser and point to https://localhost:1337. We have a lift off but now what?
  8. Create an html web resource and insert it into any CRM form
    <html>
      <head>
        <script 
          src="https://localhost:1337/vorlon.js">
        </script>
      </head>
      <body>
        <h1>Vorlon</h1>
        <p>Vorlon lives here</p>
      </body>
    </html>
    
  9. Load that form
    Vorlon host on CRM Form
  10. And here you have it!
  11. Object explorer in Vorlon

  12. You can now use console, for example, peek at the data
    Look at the data with Vorlon

Big deal, you say, because you can use magic F12 and achieve the same result? Well, yes, except all of the above works remotely, e.g. you can debug stuff on the user’s machine over the network.

Early days, of course, few additional notes to get you going:

  • DOM explorer is not very useful as its root is at the resource level. Injecting vorlon into CRM window is probably an option to consider
  • Create delayed load to debug only when needed. (See vorlon.js documentation for more details and options)
    <!-- load without autostart -->
    <script src=
    "https://host:1337/vorlon.max.autostartdisabled.js">
    </script>
    
    <!-- bind this to a button on command bar -->
    VORLON.Core.StartClientSide(
       "https://host:1337", 
       "default");
    
  • Last but not least: use at your own risk, contains small parts, choking hazard, swim between the flags. Not tested on animals, children or CRM 2011.

Tip #569: Migrate knowledgebase articles to Interactive Service Hub like a boss

If there is one bonus take away from the yesterday’s tip, it’s

existing KB functionality will soon be deprecated so it is advisable to transition to new KB as soon as possible.

So people started to ask, how to do that.

tl;dr

How to migrate KB article

Long version

Yes, some assembly is required. Good news, it’s not that difficult. As you may have noticed, I did develop some affection for the PowerShell as an ad-hoc developer’s tool.

Import-Module Microsoft.Xrm.Data.Powershell

$global:conn = Get-CrmConnection -InteractiveMode
  
# get the old articles
$articles = Get-CrmRecords `
   -EntityLogicalName kbarticle `
   -Fields * 
   
ForEach($a in $articles.CrmRecords) {

  # display the title
  $a.title

  # create the record
  $newrec = New-CrmRecord `
    -EntityLogicalName knowledgearticle `
    -Fields @{ "title" = $a.title; }

  # set the content if it exists
  if($a.content) {
    Set-CrmRecord `
     -EntityLogicalName knowledgearticle `
     -Id $newrec.Guid `
     -Fields @{"content" = $a.content}
  }
  
  # publish the article if it was published
  if($a.statecode -eq "Published") {
    Set-CrmRecord `
     -EntityLogicalName knowledgearticle `
     -Id $newrec.Guid `
     -Fields @{"statecode" = `
	   New-CrmOptionSetValue -Value 3}
  }
}   

Like a boss meme

 

Tip #568: Disable new knowledgebase article notification

Mini Truckstop

Dynamics CRM TipperGotta love truckstops. Someone asks an interesting question, bunch of people send the answers in, all we need to do is to copy, link, verify, write some code, double-check, remove sensitive information, format, test, publish. Easy!

This time the question comes from none other than Julie “There is no place like home” Yack.

Question

Can someone tell me if I am missing something on this? It seems like a big risk and I’m not sure how to turn it off. I don’t think you can.

Admins of new orgs get the standard yellow notification above the command bar telling them go try ISH (Interactive Service Hub – t.j.). Users do not see this. Great. I don’t want them to see it. As admin, I want to decide if I want my users to go here or not. Many aspects to this, but at a minimum there’s training to worry about. But also, what the heck do I do if they go off on their own and make a whole new, unrelated knowledge base?

As a standard CRM user, I have access to traditional knowledge base. When I go here, I get this pretty yellow bar notification that there’s a new way to do this, click here and go make magic. How do I stop this from happening? Don’t all default roles have access to this?

This is from a new org, no customizations, user with only CSR role assigned. I can’t have random customer service rep making these decisions.
New KB notification

Discussion

Anonymous-who-knows-the-answer-#1: Making an SDK call to set ShowKBArticleDeprecationNotification = 0 on the OrganizationBase table will disable the banner from showing. https://msdn.microsoft.com/en-us/library/gg328408.aspx

Gayan “Not Daddy” Perera: Thanks, this disables the notification for the article area but not the main “Show how the interactive service hub can make you more productive. Experience it now”. Is there another flag that can disable that main message?

Anonymous-who-knows-the-answer-#2: Unfortunately there is no way to disable that message currently. We understand it is not an easy way but considering we are trying to move customers off the existing KB functionality to new one introduced in Ara, it’s a trade off we made. Please understand that the existing KB functionality will soon be deprecated so it is advisable to transition to new KB as soon as possible.

“Codeless” solution

For those who are interested in applying this setting with the minimal efforts and without writing any code, here is PowerShell snippet that will accomplish the task. (Note: you will need PowerShell module for Dynamics CRM Organization Data)

Import-Module Microsoft.Xrm.Data.Powershell

$global:conn = Get-CrmConnection -InteractiveMode
  
# get the orgs
$orgs = Get-CrmRecords `
   -EntityLogicalName organization `
   -Fields showkbarticledeprecationnotification

# there is only one, in fact
$org = $orgs.CrmRecords[0]

# display current setting
$org.showkbarticledeprecationnotification
 
# supress notification
Set-CrmRecord -conn $conn `
   -EntityLogicalName organization `
   -Id $settings.CrmRecords[0].organizationid `
   -Fields @{ `
   "showkbarticledeprecationnotification" = $false}

Tip #567: Tipster guide to Dynamics CRM 2016 New Knowledge Base Articles

Friday is the name of the day and another video is ready to be consumed. Dynamics CRM 2016 introduces new Knowledge Management capabilities, that include a new WYSWIG editor, the ability to delay publishing, article expiration, and much more. In this video we walk you though a tour of the new Knowledge Articles.

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.

Tip #566: Constants in the workflow

Some might say that this tip is trivial but I was surprised myself when a very seasoned and knowledgeable user asked me how to use constants in the workflow.

They wanted to push an estimated close date for all open opportunities one month forward to account for the festive season that has just ended (for most people, anyway) and at the same time to bump the estimated value by 5% to account for the inflation.

For dates, use of constants is very clear – just use operator Set to, set the duration using dropdowns and select before or after (i.e. subtract or add). For money and numeric fields it is less obvious: do not use any of the fields but simply supply a constant as a default value.
Enter constants in the workflow

The end result looks like this:
Workflow update using constants

Set the workflow to be called on demand and then select multiple records and run the workflow. If you have hundreds of records that wouldn’t fit on one or two pages, you may want to consider some automation, like MSCRMWorkflowRunner or Bulk Workflow Tool for XRM Toolbox.

Tip #565: Focus your inbox

One of my favorite tips for mailbox management and Outlook comes from a nearly decade old post by Scott Hanselman.

Create a folder called “CC,” then create an Outlook/Exchange rule that moves emails where I am not in the To line to the CC folder.

rule

This leaves your inbox for things directly related to you, and you can then browse through your CC’s, BCC’s and distro group mail at a later time.

Tip #564: Avoid cherry-picking in the queues

Mini Truckstop

Dynamics CRM TipperWe have not done a truckstop for a while but Joel “Standing on the shoulders of other MVPs” Lindstrom just could not help himself.

Question

I work with many customer service deployments, and a very common request for certain types of groups is to have a way to auto feed a queue item to a user rather than having users pick an item. Cherry picking means picking the easy items and leaving the difficult ones for your coworkers to handle.

Have any of you come across this? How did you address this requirement? In my search I found 4-6 add ons for salesforce for this, but nothing MSCRM related.

Could write a custom interface or a “get item” button that gets the next available item I guess. Just looking for feedback if anyone has built anything for this in the past.

Answers

Dylan “Not a real Kiwi” Haskins: I used a Client side “Get Next Item” button that leverages a queue / fetchxml to determine which items and which order to allow the pick from. Gets added to the queue command bar. Have used it for a number of clients with great success.

Chris “That’s Mr ADFS For You” Cognetta: We route a round robin plugin that assigns the incoming case to the user based on a bunch of settings. It has stopped the cherry picking.

Demian Raschkovan takes the cake on this occasion though: you gave me some “inspiration” with this. I added a Workflow Activity to my “Dynamics CRM 2016 Workflow Tools” solution on Codeplex. With this solution you can automate the Queue Item Picking with workflows, avoiding the “Cherry Picking” issue. (Documentation is available – t.j.)

On next version I’ll add new activities in order to Query how many Items are in each queue.