Tip #659: Installing Dynamics CRM on a named SQL Server instance

I don't tripIt is possible to install Dynamics CRM On-premises using SQL Server named instance. For most parts, the process is straightforward and no different from a “standard” installation except that you have to use server_name\instance_name notation when referring to SQL Server. But sometimes things don’t go according to the plan and this is what I learned:

  • Have SQL Server Browser service on. On some networks administrators tend to keep SQL Server Browser service off. It does minimize the attack surface and follows the idea that on-premises you ought to know what you’re connecting to anyway. As it turns out, that does not sit well with both CRM installer and CRM Server after the installation is complete.
  • Fix the port. Change the port for the SQL Service from dynamic to a fixed one, e.g. 1434. While it might work with dynamic ports as well, I found it’s easier to deal with known quantities.
  • Open TCP port on SQL Server firewall for that port number. Chances are you already have a rule for the default instance, just add the port there.
  • Open UDP port 1434. This is SQL Server Browser Service. It’s documented but buried towards the end of the document and easy to miss.
  • Install a separate instance of SQL Server Reporting Services. One of the ideas I’ve seen floating around is that, because SQL Server is licensed per physical core, you can install multiple instances on one machine and save a bundle. That is true, until you need to run any custom fetchxml reports. To have that you need Dynamics CRM Reporting Extensions installed. And here is the catch – reporting extensions only support single installation and use fixed registry key to store SQL Server connection string. That means that you need to have SSRS installed elsewhere (could be CRM server itself, for all I care) but that would require an additional SQL Server license. Oops.

Other than the above, named instance installation works and runs smoothly. It totally makes sense in some scenarios, for example, if you have a beast of a server with enterprise licenses already in place.

Tip #658: Tipster guide to Dynamics CRM 2016 Field Services

Field service agentIn the first video in our Field Service series, we explore the capabilities this solution provides when added to Dynamics CRM. We walk you through basic setup and navigation and explore how to create and use work orders.

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.

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

Tip #657: CRM 4.0 Registration Hack

CRM 4.0 RegistrationRemember good old days of CRM 4.0 when there were in total 42 Dynamics CRM consultants around the world, product names had dots in them, icons had colors and legends like Michael Höhne ruled the newsgroups?

Even if you don’t, there is still a decent chance that you may need CRM 4.0 installation to bail out a stubborn customer still using Windows 98 around the office because fundamentally “there is nothing wrong with it”.

If you need to install crm 4.0, it forces you to register it; however, Microsoft has long shut down the CRM 4.0 registration servers, so you are in a pickle. Daniel “King of soft” Cai found how to trick the database to think it is registered.

Turns out, it is governed by a simple database field, IsRegistered. Changed it from False to True, and CRM 4 instance will be up and running.

Tip #656: Dynamics CRM Online is truly global with multi-regional deployments

Pangea supercontinent If you have or are a multinational customer with the user base spread around the globe, CRM Online offers multiregional instances. It means you can keep your local data in the regional datacenter for performance, regulatory and corporate governance reasons.

Your tenant needs to be enabled for multi-region deployment and you need to request this feature by contacting your account manager or technical support.

The detailed description and step by step instructions are available but these are the key points:

  • Multi-regional deployments are not the same as multi-tenant deployments. In the latter, tenants are completely autonomous and, beside billing, do not share anything including user accounts.
  • Region is selected when a purchased instance is configured for the first time.
  • You will only see Your current region is: drop-down list if you have instances outside of your current region.
  • Edit, Copy and Reset operations only work within a region, i.e. it is not possible to copy database between regions.
  • Databases in different regions are completely independent. They will share your O365 Active Directory for authentication but otherwise are not linked in any way.

Tip #655: Defensive use of undocumented functions

Black boxThis is a sweet lesson for all the lovers of the undocumented functions. On odd occasion yours truly is guilty of being lazy and choosing a shortcut worthy spießrutenlaufen. From time to time those fits of laziness come back hard.

For a long time I’ve been using SaveAsCompleted internal function on a command bar for custom activities. For whatever reason the function is no longer present in CRM 2015 Update 1.1 and above. My short-term fix? Bury myself even deeper in the undocumented internal land:

if(typeof(SaveAsCompleted) == "function")
   SaveAsCompleted();
else if(typeof(Mscrm.CommandBarActions.saveAsCompleted) 
        == "function")
   Mscrm.CommandBarActions.saveAsCompleted();
else {
   // do whatever had to be done in a first place
}

Lesson: if you are going to use internal functions, at least do it defensively.

Tip #654: Use the XrmToolbox to copy templates

No later than 2 days after publishing Gayan’s tip on dangers of moving Word templates between deployments, Tanguy “The XRM Toolbox” Touzard stepped in and automated the process as part of the XrmToolbox.

Document template mover

It’s a first cut, a bit rough around the edges but you are more than welcome to jump in and fix whatever you don’t like at https://github.com/MscrmTools/MscrmTools.DocumentTemplatesMover.

Tip #653: Tipster guide to Dynamics CRM 2016 Spring Update – Part III – Interactive Service Hub Enhancements

Pie chartSpring Update 2016 has introduced several enhancements to Interactive Service Hub. The first is directly related to customizing and extensibility with the ability to add iframes and Web Resources to ISH forms. Also added, is the ability for users to work with article translations that are not in their native language.

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.

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

Tip #652: Promote to admin explained

Chosen OneI’ve already seen some articles about “Promote To Admin” button, new in Microsoft Dynamics CRM 2016 Update 1, explaining in details how this button makes admin life easier by allowing quickly grant a user System Administrator role.

All of the articles miss one important function that this button allows you to do. The functionality we’ve been wanting for years.

PROMOTE TO ADMIN button allows authorized users to impersonate end-user roles

(What does “authorized” mean here? Keep reading)

If you have system administrator role, try the following:

  1. Ensure that there are other system administrators in the systems. In case something goes wrong and you remove all of your privileges, they will be able to bail you out.
  2. Grant yourself a self-sufficient role or combination of roles. By self-sufficient I mean a role that allows you to logon and operate Dynamics CRM as a user. For example, Customer Service Representative gives you access to the UI and CRM goodies while Survey User, part of the Voice of The Customer solution, is an additive role that is not self-sufficient and won’t let you to logon.
  3. Remove System Administrator role. You will get a warning about the world end, ignore. (You did ensure that there are other system administrators in the system, right?)
    System administrator warning
  4. Hit Ctrl-F5 to fully refresh the browser session. You are now Customer Service Representative or whatever role you have granted. Boom!
  5. Promote to admin buttonWhen done playing with the role, go to Settings > Security > Users, select yourself and press Promote To Admin. You’re back to system administration. Badaboom!

That’s how all new trials are tailored when you select a specific role during the trial provisioning.

Under the hood

There is a new privilege Promote User to Microsoft Dynamics CRM Administrator Role (prvPromoteToAdmin in nerd-speak).
Promote to admin privilege
Note that it’s not enabled for System Administrator role.

Support User roleSo how does this privilege stays with the original user? It’s granted via hidden role Support User which you can find using Advanced Find.

Warning: Use this massive knowledge at your own risk and don’t drink and administer the system.

Tip #651: Copying word templates between CRM deployments

Sniper TemplateAs you all know (or will know in a second), each entity in CRM has a logical name as well as a number (entity type code). In most places, names and numbers can be used interchangeably, e.g. when opening forms, views, dialogs and reports.

While the name, guarded by the publisher’s prefix, does not change between the deployments, the number can change when your solution is installed on another CRM system. “No problem”, you say, “I’ll always use the name”, you say. And that would be the right move that works most of the times.

However, there is an issue with CRM 2016 Word Templates in that it keeps a reference to the entity type code inside the word document xml (schema has something like ‘xmlns: http://crm-blah-blah.com/blah/entity_name/entity_typecode’. So when you deploy a solution to another system, these codes can change and, because the word template xml don’t know about these changes, if you upload via the UI the template ends up being tied to the wrong entity!

Good news: Gayan “Performance Wizard” Perera built a tool that will move word templates from one system to another. If it detects mismatching entity type codes, it’ll tweak the word template and upload.

Download the tool.

Tip #650: The real role to manage Dynamics CRM Online

Role playing gameFew days ago we explained how to give your O365 users ability to manage CRM Online features but without being a Global Administrator. O365 admin portal UI gave us Service administrator role. We suspected it’s too much but decided to let it go for the sake of simplicity.

Thanks to the insight from Hans Worst (really?), we now know that there is a very aptly named CRM Service Administrator role but it’s only available via Powershell.

connect-msolservice

Add-MsolRoleMember 
   -RoleName "CRM Service Administrator" 
   -RoleMemberEmailAddress "foo@barbaz.com"

To run this snippet you’ll need Azure Active Directory Cmdlets, if you don’t have them installed already.

Warning! Once you assign this role, do not manage role assignment for this user in O365 portal – this role won’t be visible and it’s too easy to unassign it by accident.