Tip #159: PowerShell fails in IFD deployment

Microsoft Dynamics CRM Windows PowerShell snap-in is an excellent automation tool but on some Internet Facing Deployments even an innocuous call to Get-CrmServer can fail with a fairly generic message “The caller was not authenticated by the service“. One of the possible reasons is that the tool always runs on CRM server but for IFD purposes CRM URL has been reconfigured and instead of crmserver it’s now known as internalcrm.contoso.com.

You are potentially hitting the problem when locally hosted sites cannot be accessed using FQDN. The workaround includes adding some registry entries to cover internalcrm.contoso.com, and that seems to fix authentication in PowerShell.

Tip #158: If upgrading more than one version, recreate security roles

Let’s say you work for a company that uses CRM 4.0, you did not upgrade to 2011,  and you now are moving to CRM 2013. If you use custom security roles (and most people do), I recommend recreating your custom security roles.

Many new privileges were added in CRM 2011, and even more were added in CRM 2013. if you use standard roles, these new permissions are automatically added to your roles; however, if you use custom roles, these privileges are not added to the roles. If you continue to use your existing security roles, you are in for many “access denied” permissions surrounding privileges, tablet apps, processes, and other new features.

Updating a custom role when moving one version is a challenge. Updating a custom role when moving two or more versions can sometimes be more trouble than it is worth.

  1. Start with a standard role with minimal permissions, such as the Salesperson role.
  2. Copy the role, creating a new custom role.
  3. Open your existing security role and snap to the left side of the screen using windows key + left arrow.
  4. Open your new custom security role and snap to the right side of the screen using windows key + right arrow.
  5. Update the new role to match the entity level permissions on the Core Records, Marketing, Sales, Service, and Custom Entity tabs.
  6. On the bottom of the Core Records tab, verify new permissions around auditing are enabled if desired.
  7. On Business Management tab, leave the settings for CRM for Phones and CRM for Tablets and Field Security set, unless you specifically need to disable them.
  8. Leave the Customization tab as it is by default in the new role. Since we copied a role that has no customization permissions, this will not make your users system customizers, but will verify that they have the correct settings to view the new metadata components.

By doing this your users will have what they need to use the new features and also will eliminate the majority of the role related issues upgraders experience with CRM for tablets.

 

Tip #157: Beware of the human factor

When you design your business processes in CRM, one red should be if the success of the process depends on a user taking an action in CRM. For example, if you are designing an approval process, and your process says “After approving the record, the approver is going to click “share” and manually share with the sales manager,” that should be a red flag. What happens when the approver forgets to share the record after they approve it?

If your process is overly dependent on the actions of people, it will probably fail at some point.

A better choice would be to have an automated process. When the approve approves the record, have a workflow or plugin that automatically shares or assigns the record to the appropriate person.

You can’t totally get away from relying on human interaction–in our example, the approver still has to approve the record; however, you can minimize the number of steps the person has to take, incorporate notifications and routing rules to guard against a breakdown in the process (like the approver forgetting to approve the record), and then automate as much of it as possible (such as by automating the sharing of records rather than relying on users to manually share the records).

 

Tip #156: Why doesn’t my real time workflow do anything?

So you create a real-time (synchronous) workflow, and when you test it out, it doesn’t do anything. Say you have a workflow that should fire when an opportunity status is changed to “Won,” but you close an opportunity as “won,” and nothing happens, and there are no errors.

Most likely, you have the workflow definition set to happen “Before” the status change. When you create a real time workflow, the workflow can fire before a status changes or record is updated. This is the default setting.

Problem is, with “Before,” your change hasn’t happened yet. If you have a workflow fire before the status change, and you change a record status to “won,” the workflow fires before your change is applied, and when it checks the status of the record, it will see the old status, not the one it is changed to.

Rule of thumb: use before if you need to work with the prior value, use after if you need to work with the new value.

Tip #155: During the upgrade all your CRM are belong to us

When importing a CRM 2011 organization into CRM 2013 UR2 or SP1 environment, you may receive a cryptic message “Database having version 6.0.0.809 is not supported for upgraded”. As it turns out, it has nothing to do with the version of the database being imported.

If you are trying to import an organization database that has already been imported to an organization on that CRM server, you will get this error, because the organization has the same ID.

Deleting the other organization will do it. If you need both organizations, you can delete and re-import the already upgraded organization. This will assign it a new organization ID. Then you can proceed with upgrading the second copy.

(The resolution was provided by my fellow tipster Joel but, in a good “first come first served” tradition, I’m staking the claim.)

Tip #154: One pre-validate to rule them all

It may come as a surprise but when a contact is created as a side-effect of another operation, e.g. qualifying a lead or processing incoming message with contact auto-create in force, pre-validation plugin does not fire at all. It happens when operation performed is a compound message such as QualifyLeadRequest or DeliverPromoteEmailRequest.

This behaviour, unintuitive at first, is by design. The best explanation comes from David “Twice Chartered” Jennaway:

My general starting point is that I expect one message (QualifyLead) to cause one corresponding pre-validation step. If one message is implemented by several operations (Create contact, Create account etc.) then I’d expect one pre-operation step for each operation, so the behaviour you describe is as I’d expect.

Taking this further, in a scenario like this, the data in the message can affect which operations occur. For example, if the lead has no contact fields set (i.e. no name), would you expect an operation to create a contact?

The solution is to either move/copy your logic into pre-validation step of a relevant compound message or move your plugin to pre-operation step.

Tip #153: How much space does my organization use

There are 10 ways to keep you organization on a diet but only one way to find out what’s going on (more or less).

if you are a system administrator, click (or, as we say these days, tap) Settings > Administration > Resources In Use. Besides the storage figures (which are conveniently broken down by organization if you have more than one on the same subscription), you’ll see how many custom entities, workflows and dialogs have you used (all limited resources).

This tip is brought to you by Andre “I’ve got 88 in my handle” Margono.

Tip #152: Update Rollup strategy post SP1

With the release of Dynamics CRM 2013 SP1, there are now two different versions of CRM 2013:

  • 6.0.X (the original/RTM version)
  • 6.1.X (CRM 2013 SP1)

This means that there will now be two different update rollup streams. The next UR for 6.0 will be Update Rollup 3. The next UR for 6.1/SP1 will be Dynamics CRM 2013 SP1 Update Rollup 1.

Note, you can tell what build and UR you are on by clicking the settings gear in the upper right hand corner of the CRM web client and clicking “About.” The second digit indicates the service pack level, and the third digit indicates the update rollup level.

For example, the current build number is 6.1.0.584. This is the release version of SP1.

Tip #151: What happens if you don’t install the SP1 updates?

After your organization is updated to SP1/CRM Online Spring ’14 update, platform enhancements and bug fixes are enabled, but the new customer service features and the new service management area in the Settings menu are not enabled until you go to Settings–>Administration and click “install product updates.”

install update

So what if you don’t use Cases and Queues? Do you need to install the updates?

Without installing the updates, you will still get the platform benefits of the update (such as server-based SharePoint integration) and the bug fixes, such as the embedded reports fix. So you are not forced to install the product updates. However, I recommend that you still do it.

  • It is safe–these updates have no impact on non customer service related functionality.
  • You may find a non-customer service related use for the enhancements. For example, now that automatic case creation from emails is standard functionality, you may have a custom process you want to initiate from an email, and repurposing the case automation may be a good option.
  • Given you can’t predict how things will change in the future, enabling the new product updates gets CRM up to date for if you start using case management or queues in the future. If you don’t install the updates now, you may forget, and then start using cases later, without the updated functionality.
  • If you license an ISV add-on in the future, it may depend on the updated product features.

I recommend that you enable the new features in a non production environment, then push to your production environment.

Tip #150: Forms close after assigning records

After your organization is updated to SP1/Spring ’14 CRM Online update, you may notice a change in behavior when you assign records. Now, if you click the “assign” button on the form and assign to a different user or team, the form will close after you assign the record.

If you don’t want the form to close after assigning records, reassign the records via the “owner” lookup field instead of using the “assign” button.