Don’t Merge Your Forms in CRM 2013

1 comment

Posted on 12th October 2014 by Jukka Niiranen in Features

, , , , , , ,

If you have been using Dynamics CRM before the 2013 version was released, you may have something in your system called “information forms”. This is not a very descriptive term for them, since of course all the entity forms are about presenting “information” to the end user. These forms actually date back to a time in the Dynamics CRM platform history when there was only a single form available per entity. Times have changed quite a lot since then, as entities can now have role based forms, mobile forms, quick create forms and quick view forms.

Although not a specific form type in itself, CRM 2013 introduced a whole new layout for the default entity forms as a part of the UI refresh. Instead of the traditional & boring two column layout, the new CRM 2013 forms are made up of three columns that can consist of not just entity fields but also related entity subgrids, the social pane, Bing Maps component and other exciting new features. Whereas the old default forms were called “Information”, the names of these new forms follow the entity names. So, the account entity will have a new form labelled “Account”, as an example. (By the way: check this tip for optimizing your form naming convention.)

Merge Forms Feature

Since the new forms are designed to make better use of the new navigation paradigm of CRM 2013 as well as present the data in a much richer way than the old “ERP style” forms of past CRM versions, customers who are upgrading their Dynamics CRM deployment to the latest version are advised to migrate into using these new forms. In fact, Microsoft has stated that the next major version (CRM 2015) would no longer support the use of the old “information forms”.

To make this transition easier, Microsoft has provided a feature called “Merge Forms”. This new button available on the form editor in the CRM customization UI (which still utilizes the old CRM 2011 style layout even in CRM 2015, by the way) is intended to be used for bringing the tabs, sections and fields from your old forms onto the new forms with as little clicks as possible.

CRM_merge_forms

The process is described in the article “Update your forms to Microsoft Dynamics CRM 2013 or Microsoft Dynamics CRM Online Fall ’13”. Even more detailed steps can be found from the PDF document “How to Prepare for the CRM Online Fall ’13 Service Update”. Basically what the feature does is bring in the contents of the old form to the end of the currently open form, with the intention of making it faster to rearrange your customized fields and sections to align with the new default form’s content and layout.

Sounds like a handy feature, right? There’s only one slight problem with it: it doesn’t work.

Conflicting ID Values

“What do you mean it doesn’t work? I have used the button to bring in my custom fields and it did just what I expected.” Well, maybe I should rather say that it works partially. If you never export your CRM customizations into a solution file and move it to a different environment, you may not notice that anything is wrong with your forms. However, if you do want to move the customizations between development, test and production organizations, you might run into the below error message during the solution import process.

CRM_import_solution_error_after_form_merge

After the error, if you download the log file and open it, you’ll see a message like this:

Error code 0x8004F658. The label ‘E-mail 2′, id: ’87dc7c9c-94c1-3953-e490-11413b31d0ad’ already exists. Supply unique labelid values.

What the system is telling us is that we’re trying to insert an item into the customization metadata that has a non-unique ID. Depending on the scenario, the item could be a field or section label. But how did the ID end up being a duplicate? After all, we don’t assign these GUID values in the customization UI, rather the CRM platform generates them. What could have caused the system to violate its own rules?

The answer can be found from this thread on the MSDN forums: CRM 2013 Solution Import. A Microsoft support engineer has confirmed that the error is caused by a design mistake in the Merge Forms feature. Apparently in the process of merging form content from the old form onto the new one there is more data carried over than is needed. Not only do you get the form components exactly the way they are configured in the original form, but you also get the same ID’s. Now, since the old form also exists in the system, this will cause an error message when you try to import your solution file from the source system to the target environment, like from development to test environment, for example.

The Workaround

The system where I ran into this problem was running Dynamics CRM 2013 Service Pack 1 (6.1.0.581) with no Update Rollups (see this earlier blog post for help on understanding the different updates and version numbering). The forum thread above does not indicate that a hotfix for the form merge bug would have been included in one of the released updates so far, so I’m assuming that all CRM 2013 environments are affected by it during the time of writing.

The suggested workaround in the forum discussion was basically “start all over”, meaning removing the merged content from the form and re-adding the components back there one by one. In the environment I was working on this would have required many hours of work with using the form editor on a number of entities , which I wasn’t too keen on spending there. I had just migrated a copy of the CRM 2011 production organization database onto a CRM 2013 test server and was in the process of testing the upgrade steps before the final go-live, so re-doing the customizations at this stage just sounded like both a schedule challenge as well as a potential source for new issues.

I extracted the CRM solution zip file and poked around the customization.xml file for a while, trying to think of a way out of this situation. After I realized that trying to edit the XML manually would only land me into a deeper hole, it occurred to me that there was another feature in CRM that performed something similar than the broken Merge Forms: the “Save As” button. Copying entity forms to create new variations was something that I had used many times with no issues, so perhaps I could rely on it here as well?

I proceeded with creating a copy of each of the entity forms where I had used the Merge Forms feature. Since the new form versions created via “Save As” are able to co-exist with the original forms without causing any conflicts, this must mean that the CRM platform assigns the required new ID’s to the form components. Based on this reasoning, I therefore assumed that once I deleted the original merged form and renamed the new copy (as well as configured the form order and security roles), I would have a clean solution file with unique ID values. After testing the solution import I was extremely glad to see that this was in fact the case, as no more error messages appeared during the import. Saved by the “Save As”!

Don’t Just Merge – Design

So, with the above workaround and a potential upcoming hotfix, is there any reason not to use the Merge Forms feature? In my humble opinion, the merge process is not a best practice but rather just a quick’n dirty way of getting the custom fields to appear on the entity forms. If you don’t in practice know how to customize your Dynamics CRM environment but need to cope with the updated UI of the new version, then the merge will technically make it possible to keep using your CRM data. What it will not do is produce a system that your end users will enjoy.

The merge will bring over a lot of duplicate content (all the default fields) that you may forget to clean away from the new form. It will also create very confusing components for the system administrators, such as the old “What’s New” section vs. the new Social Pane, which require a deeper understanding of the Dynamics CRM platform evolution to really figure out. The biggest risk is that the form content designed for the old version UI will end up living alongside the content that is specifically made for the post CRM 2013 world, creating a disconnected and illogical application that works differently depending on the area where the user navigates to.

Instead of taking the shortcut and doing a quick content merge, I recommend investing a bit more time and effort in planning what’s the best way to present the data and how to make it as easy as possible for the users to interact with it through the UI. If you need some ideas for improving the user experience of your Microsoft Dynamics CRM environment, take a look at my previous post that listed 10 tips for designing a great user experience in Dynamics CRM.

10 Tips for Designing a Great User Experience in Dynamics CRM

6 comments

Posted on 30th September 2014 by Jukka Niiranen in News and events |Tips

, , , , ,

Last week I had the privilege to talk at the Dynamics CRM Finland User Group meeting in Helsinki (quick recap available in Finnish here). When planning on what topic to choose for my presentation, I tried to think of something that would appeal to a wide audience of CRM users – both experienced consultants as well as key users who might still be relatively new to the product.

The common denominator for the group was, as the name suggest, that we’re all CRM users in one way or another. In this role we interact with the software in a variety of different ways, most likely several times during the course of a typical working day. As information workers, systems like CRM are our tools to get the job done. How effectively we succeed in this is largely affected by how much cognitive effort is needed to use these tools to shape the expected output.

So, I decided to talk about the many ways how we can sharpen our saws when it comes to Dynamics CRM. While every CRM environment is ultimately different from one another, due to the business processes we manage with it, the systems it integrates to, the user groups working with the application and so on, I believe there are still general design guidelines that apply to basically any organization using Microsoft Dynamics CRM. My presentation, “10 Tips for Designing a Great User Experience in Dynamics CRM“, introduces many of these guidelines that I personally try to follow when designing CRM solutions for customers. You can view the embedded presentation below, or if the content is not showing, then go and have a look at it on SlideShare.

While UX has always been an important piece of the puzzle when trying to convince business users that using a CRM system can actually deliver tangible benefits to them, rather than just serve as a management tool for keeping track of what the employees are doing, the launch of the Dynamics CRM 2013 version has really heightened the importance of designing solutions with a polished user experience. This is due to the fact that the refreshed user interface and new customization points available in the UI can be leveraged to deliver a much more usable business application than the CRM systems of the past. But: you also need to plan the flow of user interactions with much more attention to detail, because sloppy customizations will now stick out like a sore thumb.

The good news is that many of the new details in CRM 2013 (and CRM 2015, too) are easy to configure once you know the role of each platform component. You can do so much these days without writing a single line of custom code that the system customizer can easily have his or her plate full of CRM enhancement ideas to implement without ever consulting a .NET developer. That’s why it’s also good to think in advance how to prioritize the areas into which you invest your efforts. This Top 10 list of mine provides one example of such a tool, to help in identifying the low hanging fruit when it comes to making your CRM users happier and more productive with the system. If you have any topics on your mind that I forgot to include on my list, be sure to leave a comment below!

10_CRM_UX_tips

Oh, one more thing: if you’re a Microsoft Dynamics CRM user in Finland and would be interested in networking with other fellow CRM professionals, I’m glad to announce that there’s now a new Yammer network available for you: Dynamics CRM Finland User Group. Whether you’re from a customer or partner organization, please feel free to sign up for this network and come join the planning for future events and other ways to share Dynamics CRM knowledge and experiences with peers. Tervetuloa!

Time Travel with Workflows: Accessing “Before” and “After” Values

1 comment

Posted on 14th September 2014 by Jukka Niiranen in Tips

, , , ,

Dynamics CRM has had a built-in auditing feature since the 2011 version, which provides a really handy tool for situations where someone needs to investigate the changes that have taken place on field values of a specific record. By default auditing is not enabled, but I recommend you to seriously consider enabling it for all business critical entities like accounts and contacts, since without it there’s not much to go by if you ever need to track down any intentional or unintentional updates made to your CRM data.

CRM_workflow_audit_1

Auditing is a great tool for capturing the “fire hose” of data updates that are taking place in CRM. However, since the audit data is not stored in actual CRM records but rather in a denormalized state inside the audit database tables, it’s not accessible for any type of reporting or business process logic. If you know what record to look for, the related Audit menu will give you the information. If you are an administrator and have access to the Audit Summary View, you can also use filters to narrow down the audit data stream and hunt down the events that are relevant to your investigation. Very useful for resolving issues in the data, but not so practical for simply staying informed about updates that are of interest to your role in the organization.

Workflow processes can also be used for tracking specific changes made on the CRM records, just by setting the workflow to start when a particular field or a set of fields change. You can then perform any notification action you see appropriate, such as sending an email, creating an Activity Feed post, adding a note, appending a description field etc. Almost like auditing, but on a much more granular level, and also something that you can report on if necessary. One limitation compared to auditing, though, is that you can only see the new value of each field but not the previous one. So, you can’t produce a similar view that auditing provides, with the old and new values side by side.

Or can you? With the launch of the CRM 2013 version we gained a whole new category of workflow processes, called real-time workflows. These behave much in the same way as custom plugins, as they are executed synchronously as part of the event pipeline of the CRM platform rather than via the asynchronous service that the traditional workflows use. The extra benefit we gain from this, aside from the fact that the workflow logic is executed immediately, is that we now also have the ability to choose whether the real-time workflow should be started before or after the event. This allows us to actually read the data that was in a field before the update took place. Sounds like a cool little feature? Well why don’t we take it our for a spin then and see what we can achieve with it.

Tracking Account Name Changes

Let’s consider a scenario where we would be interested in tracking the changes performed on the account name field. We have decided to leverage the Activity Feeds feature to post a message on the record wall every time an existing account has its name field updated. As a part of this post, we need to provide both the old name and the new name, so that the users can easily associate this particular account as a customer they’ve previously done business with under a different name.

Since we need a place to store the old name of the account for the purposes of formulating the post’s content, first we’ll add a new custom text field for the account entity, called “Old Name”. Then we’ll open up the workflow editor and create a new real-time workflow process for the account entity, called “Account Name Change: Store Old Name”. The important part here is that we’ll set this workflow to be run when “Record fields change” with a box ticked for the “Account Name” field and change the “Start when” value to “Before”. The actual workflow actions only need to do one thing, which is to copy the value of the standard “Account Name” field to the new “Old Name” field. Nothing else.

CRM_workflow_audit_2

Next we’ll create a second workflow, called “Account Name Change: Post Old & New Name”. We’ll set it to run in real time for the account entity, just like the first one. We’ll even associate it with the very same event, meaning the change of the “Account Name” field. The difference will be that we’ll run this workflow “After” the event. Again, the actions that the workflow will perform are very simple, as we’ll only need it to create a new Activity Feed post record. Here’s how the message will be configured with the dynamic field values from the account record:

CRM_workflow_audit_3

So, we now have two real-time workflows running for the same entity, for the same field change event. Is this a smart thing to do? Will the universe by any chance collapse onto itself as a result of this reckless twin workflow configuration that we’ve built? Well, there’s only one way to find out! Let’s activate these two workflow processes, go to an account record and change it’s name.

CRM_workflow_audit_4

After the name is changed, we can click onto the Activity Feed’s auto posts column to refresh the post view. There we discover a post created by our second workflow process, containing both the “before” and “after” names for this account. Success! If we keep feeding further update events to this workflow duo, we can see that the post message is always updated to contain the last two names for this account in search of its true identity.

CRM_workflow_audit_5

If our second workflow process would have been an asynchronous process instead of real-time, the results might be different, though. As I’ve experimented in a previous post, “Auto-Numbering with CRM Workflows: Real-Time vs. Asynchronous”, the record data and execution order for traditional background workflow processes may not always be consistent, due to their asynchronous nature. By using a real-time workflow we are guaranteed to receive a ticket to the front row seats of CRM’s event execution pipeline. In practice this means the following:

  • “Account Name Change: Store Old Name” – this workflow is executed at the pre-operation stage, which means that it sees the record as it was before the update event took place. Therefore when it reads the account name field it still has the old value stored. Furthermore, because the workflow is completed before the actual platform event for the account update takes place, it can inject a new value into the “Old Name” field and have it committed to the database as a part of the original transaction.
  • “Account Name Change: Post Old & New Name” – this workflow is executed at the post-operation stage, meaning after the update has already taken place, but before the transaction is completely over. It receives an image of the account record where the standard “Account Name” field is populated with the new value the user has entered and the “Old Name” contains the value updated by the first workflow in the pre-operation stage.

As this example scenario demonstrates, while a workflow can’t directly compare the “before” and “after” values of a record, there is actually a workaround available where you could pass the old value from the pre-operation workflow to the post-operation workflow. You could then perform a comparison of the values with the tools that the workflow editor offers (or extend it via custom workflow activities) and alter the outcome of the transaction based on the business logic. If needed, you could even cancel the operation and show an error message to the user if the old & new values are violating the rules of your business processes.

To close things off, it’s important to keep in mind that just because you can do something with a workflow instead of custom code, it doesn’t mean it would always be the right tool for the job. Aside from the greater level of flexibility that a plugin will give you for comparing and manipulating the data during the update event, there are also performance considerations you should be aware of before pushing a ton of real-time workflows into your production CRM system. I recommend reading this post by CRM MVP Scott Durow: Real Time Workflow or Plugin?