Tip #93: When to cancel workflow

When a workflow needs to be stopped, workflow editor offers two choices: Succeeded and Canceled. The main difference is that Canceled status is considered to be an error which has the following implications:

  1. Log records are retained (if flag is set to retain logs for failed workflows).
  2. For real-time workflows the transaction the workflow is part of is rolled back and the entire operation fails.

In short, canceling workflow is considered to be abnormal termination and should only be used when something unexpected has happened, the entire operation should be canceled (for real-time workflows) and further investigation is warranted.

Tip #92: Cascading Relationships – The Forgotten Customization

If you have implemented your CRM organization and not done a sanity check of the built-in cascading relationships for the COLAC (contact, opportunity, lead, account, case) entities vs. your corporate business practices then you have missed an important step in the architecture process.

When you have a one-to-many relationship there are effects to the related entity when you make changes to the parent record. These changes impact ownership, record status/state, and access rights. You can accept the out of the box behavior or you can customize it to fit the way your organization works. For example when ownership of an Account record is assigned to another CRM user, who should own all the open and closed – activities, opportunities, cases, etc? This can have significant impact on performance tracking, access to records and customer insight.

The MSDN system has a good technical article on this subject. And although this link references CRM 2011 it is equally applicable to CRM 2013.

http://msdn.microsoft.com/en-us/library/gg309412.aspx

Dynamics CRM Entity Cascading Relationship

Dynamics CRM Entity Cascading Relationship

Tip #91: CRM 2013 Online Trials Direct Link

It is a defacto standard process these days to sign up for a 30 day CRM 2013 Online Trial for various purposes – testing a new solution, doing a demo, some ad-hoc experimentation or as a possible go live project.

However, if you go to links like the following, they won’t actually get you there very quickly or make it very hard to figure out how to kick off a new instance:

1. http://www.microsoft.com/dynamics/

2. https://community.dynamics.com/

The link to use and book mark is: http://www.microsoft.com/en-us/dynamics/crm-free-trial-overview.aspx

Tip #90: Simulate OnLoad event for form updates

As some people noticed, in CRM 2013 OnLoad event handlers are not firing after save of the form. This is by design as form saves and refreshes are now granular. That means that some of the code migrated from 2011 may not work as expected if it relies on OnLoad event being fired after every save. To avoid redesigning and rewriting the code, OnLoad can be simulated and the key to the solution is that OnChange event on individual field does fire after the form save if the field was changed on the server.

Let’s say you have the following sophisticated handler registered for the OnLoad event:

function Form_OnLoad() {
   Xrm.Utility.alertDialog("On Load");
}

and you want it to fire when anything is updated and form is saved (either by user or by auto save).

You can yell “Bingo!” upon completion of the following steps:

  1. Add a boolean (two options) field to the entity
  2. Add this field to the form, hide it
  3. Add Form_OnLoad event handler (or whatever it’s called in your solution) to that field
  4. What we need to force now is update of that field on the server-side. For that, add a real time workflow that toggles the value of the attribute:Toggle attribute in workflow
  5. Since this workflow needs to fire when anything changes, register it for all attributes with the exception of the system attributes like Modified On and the boolean field itself to avoid getting infinite loop errors.
  6. Bingo!

Tip #89: Field Level Security and Default Solutions

When you export a default solution from one organization so that you can create a look-a-like in new out of the box organization not everything comes over. Sure we know that users will need the security roles assigned,etc. But this caught me by surprise the other day, I now have it added to our check list. You will need to assign users to the their specific Field Level Security for the fields that they control. Otherwise no one except CRM Admins will be able to see those fields.

Tip #88: Duplicate activities in CRM 2013

At Convergence 2014, the tipsters participated in some “Ask the MVP” sessions. There were many great questions, and I wanted to highlight a few of them.

If you use Microsoft Dynamics CRM 2013 and have seen activities like appointments being duplicated, the following may be the cause.

If you create an appointment and change the owner to another user before you save the appointment, CRM 2013 will create 2 or more copies of the appointment. The work-around is to create and save the appointment, then reassign to another user.

This is an issue that is scheduled to be fixed in update rollup 2 for CRM 2013.

Tip #87: Somebody needs to own it

At Convergence 2014, the tipsters participated in some “Ask the MVP” sessions. There were many great questions, and I wanted to highlight a few of them.

One great question was how should you deal with issues that can be a problem for any enterprise system, such as performance, poor user adoption, duplicate data, and other issues?

These types of issues can happen in any implementation, but they should never be a surprise. Where things like poor performance or poor data quality are an issue, it frequently is due to nobody paying attention to those areas. You can design the most robust architecture in the world, but if nobody is responsible for monitoring performance or data quality, issues are prone to arise in these areas.

You need to have someone who is responsible for each of these areas. For example, you need to have someone who regularly monitors performance (if CRM On premise).  Someone needs to monitor quality of critical data. At a minimum, regularly run a duplicate detection scan on critical entities, or use s good third party data quality tool like Trillium. Somebody needs to monitor that users are using the system and using it in the correct way. It doesn’t have to be the same person, but somebody needs to own these areas.

If you can’t name the person responsible for these areas, chances are, nobody is.

Tip #86: Publish Duplicate Detection Rules

At Convergence 2014, the tipsters participated in some “Ask the MVP” sessions. There were many great questions, and I wanted to highlight a few of them.

One question was asked about preventing duplicates in CRM 2013. As you may know, Microsoft Dynamics CRM 2013 no longer includes the duplicate detection dialog on the form that notifies users when they create a duplicate record. Knowing this, some Microsoft customers assume that duplicate detection does not work in CRM 2013, so they don’t publish their duplicate detection rules after upgrading to CRM 2013. However, this is not the case.

Duplicate detection still runs when records are created in the platform via data import or Outlook tracking. These can be major sources of duplicate records, such as when users track contacts from Outlook, CRM automatically creates contacts from tracked emails, or a user imports a list of contacts from a trade show. While having duplicate detection rules published will not make the duplicate detection dialog pop up on the form, it will prevent duplicates from being created by alternate creation methods.

Bonus tip: want to bring back the form level duplicate detection dialog? Use MVP Jason Lattimer’s (not the world champion of magic) excellent CRM 2013 Duplicate Detection solution. It works just like the 2011 duplicate detection dialog, but has one significant improvement–you can prevent users from saving the record if a duplicate is detected.

Tip #85: Optimal Internet Explorer Settings for CRM

Besides writing tips, I also post on the CRM TechNet wiki. I recently wrote a post listing the optimal settings for Internet Explorer. This is something I frequently get asked for. Even if you use a different browser, if you use Microsoft Dynamics CRM for Outlook, when you access records, you will still be using Internet Explorer to render the forms.

Read the list here. Have anything to add to the list? If you have a Microsoft account, you can edit the wiki!

Tip #84: What a difference a date makes

At Convergence 2014, the tipsters participated in some “Ask the MVP” sessions. There were many great questions, but one question kept coming up time and time again, no matter whether the session was for administrators or developers. That’s right: how to deal with timezones when date-only field is used. Since our tipping truck is a fast moving machine we don’t have time (ba dum tsh) for a full explanation so here the abridged version:

Problem: user saves value in date-only field but since database field does contain time, another user may see a different date value in their timezone.

Solution: plugin that sets time portion of the field to 10:59AM in UTC.

For a mildly entertaining but much longer full explanation see How to correctly record the end of the world in CRM by yours truly.