Upgrading CRM: How to Move from a Data-driven CRM to a Process-driven CRM

Welcome back for the final installment in our Upgrading CRM blog series! Today we are going to wrap things up with taking a look at how you can move from a data-driven CRM system to a process-driven CRM system. So without further ado, let's dive in!

A common question we often get asked regarding Microsoft Dynamics CRM upgrades is how do you go from CRM 4.0/2011, which are both primarily data driven, to CRM 2013/2015, which are a lot more process-driven.

There are a few options you could choose in order to accomplish the transition. One way is to take a phased approach. This means that during your CRM system upgrade, you continue using the old version of the form and then add in the processes at a later date. With this approach, you don't have to change your entire system all at once, which can expedite the upgrade project especially if you're not sure what processes you want to add into CRM. If you decide to implement the new process flows, you have the ability to make them optional for the end users.

Why is adding processes into your CRM system beneficial?

Implementing processes into your CRM system can help your overall business in many ways. Processes mean that users don't have to remember what the next step or stage is for daily tasks and functions from memory. Statistics show that if people follow a set process for something, there is considerably more compliance and success in that area. Essentially, CRM processes can streamline your business, decrease human errors, and maximize your employees' time, thereby affecting your overall bottom line. It's really a win-win for all involved.

How do I start thinking about implementing processes in CRM?

Upgrading CRM: How to Move from a Data-driven CRM to a Process-driven CRM

Once you have your processes defined and documented, be considerate of which ones make sense to add to CRM. You can always take a phased approach to adding processes in. Aim for the quick wins first that will have the biggest and most beneficial impact. End users typically struggle with change. Remember that having a solid change management plan is important. Training, communication and re-enforcement is critical to ensuring successful utilization of the new CRM features such as process flows.

Thank you for joining us for this blog series! If you missed our two previous installments, you can read them here and here.
Also make sure you check out our webinar, "Upgrading CRM: Powerful New Features to Make Your Work Easier" to learn about all of the great new features that you can take advantage of just by upgrading your CRM system. Hopefully we have convinced you to consider an upgrade or a reimplementation for current Dynamics CRM system. Feel free to contact us with any questions you may have about upgrading your CRM system. We have a whole team of experts who can guide through the entire process.

Happy CRM'ing!

Two Tips for Business Process Flows

Business Process Flows in Dynamics CRM are great tools to help your organization operate smoothly and effectively and can be an integral and important part of a CRM implementation. Depending on your business processes, adding a Business Process Flow to your system can give end users a visualization of where they are at in the sales process and what needs to be completed. Today we’ll be showing you how to add script that will programmatically advance a Business Process Flow stage and we will also show you the steps needed to increase your Business Process Flow Limits. There’s lot of good stuff to get to today, so let’s begin!

Programmatically Advancing Business Process Flows

Navigating through a Business Process Flow is easy but can add extra clicks for users. Advancing a stage in the Business Process Flow is as easy as clicking Next Stage on the right-hand side of the process flow interface. Depending on the type of step, you may need to click it or type information into it. In high volume environments, such as call centers, end users might be clicking the same steps and stages in the Business Process Flow navigation hundreds of times per week. Saving an extra few clicks here and there really add up in these situations.

Please note here that this code can be used with CRM 2015 SP1. There have been some changes for programmatically setting business process flows between CRM 2015 and CRM 2015 SP1. The code below will need to be passed through currentstage, which is available from Xrm.Page.data.process.getActiveStage();

function moveNext(currentStage) {

//Method is used to attempt to move to the next stage in the Business Process Flow

//currentStage is expected to be the current stage name of the record when this method is to be invoked

//console.log("moveNext requested for stage: " + Xrm.Page.data.process.getActiveStage().getName());

var pollingAttemptsRemaining = 10;

var intervalId;

//Cycle through code every 2 seconds for dirty check

intervalId = setInterval(function () {

pollingAttemptsRemaining -= 1;

//console.log("Attempts Remaining: " + pollingAttemptsRemaining);

//Check if the current stage is the same stage that record was in when calling moveNext

//This check is in place after 2015 SP1 due to changes in CRM code handling of moveNext with being called onSave with a dirty form

//Out Of Box moveNext calls an additional save which causes code to be executed twice, this prevents further execution

if (Xrm.Page.data.process.getActiveStage().getName() != currentStage) {

clearInterval(intervalId);

}

//Check if form is dirty, if it is not and the stage has not changed then attempt to moveNext

if (!Xrm.Page.data.entity.getIsDirty() && Xrm.Page.data.process.getActiveStage().getName() == currentStage) {

console.log("attempting move");

Xrm.Page.data.process.moveNext(moveResult);

pollingAttemptsRemaining = 0;

clearInterval(intervalId);

}

//If number of attempts remaining has passed exit code

if (pollingAttemptsRemaining <= 0) {

clearInterval(intervalId);

}

}, 200);

This code would be triggered on the onChange of a field. However, there could be a use case to also trigger the onLoad of a form. A common occurrence of this code would be a stage with steps that are also on the form of an entity. Once the user sets the value of the field which is on the form, the step in the Business Process Flow will also change. Once the field is changed and saved, if the trigger is set to onChange on that field, the Business Process Flow will advance to the next stage.

Increasing Business Process Flow Limits

Business Process Flows are highly configurable to fit your organizational needs and are available for out-of-the-box entities as well as your own custom entities. Additionally, an entity can have many business process flows associated with it. Out-of-the-box CRM allows for 10 business process flows per entity, however, this can be an issue if certain entities require more processes than is allowed. Thankfully, a few simple steps are all that is needed to increase your Business Process Flow Limits!

Out-of-the-box CRM allows for only 10 Business Process Flows per entity, however, if your CRM is an on-premises deployment, this number can be modified to better fit your business needs. This modification is NOT supported by Microsoft, however, simply follow the steps given below and there should be no negative repercussions. With that being said, let’s get started!

  1. Access the setting which is stored in your CRM database in the table organization.
  2. The setting you will want is called MaximumActiveBusinessProcessFlowsAllowedPerEntity.
  3. Enter the number of flows you wish to set.

sd

As you can see from the example above, we have now successfully increased the Maximum Business Processes allowed per entity to 15!

That’s all for today’s blog! For more tips and tricks like this one, keep reading our blog each week, and remember to subscribe to our newsletter for CRM updates delivered directly to your inbox.

Happy CRM’ing!

 

SDK Message with Id {} Does Not Exist and an Alternative Fix

SDK message errors got you down? We've got an alternative fix to take the stress away and those errors too! Let's dive in!

As you can imagine, getting this error prevents the solution from being imported. There are some suggestions to create a solution with the offending process and modify the XML, but these may not work if you have custom actions.

The alternative fix we came up with was to completely delete all processes from the solution in the target environment and re-import. This may not be ideal, especially if you are pushing to a production environment, but it will let you get the latest solution before Microsoft releases a fix. Microsoft has stated that the fix will either be in UR3 or UR4.

Note: Always perform a backup of CRM before you attempt any changes!

Hopefully this helps you temporarily bypass any roadblocks with importing solutions. Remember you can always find great blogs full of tips and tricks for working with Microsoft dynamics CRM no matter what your skill level both in the FREE CRM Book as well as our website. Thanks for stopping by the blog today, and as always!

Happy CRM'ing!

Where Did My Dynamics CRM 2013 Workflow Go?

Have you noticed that the record of what workflows have run against a record seems to have disappeared in CRM 2013? There's a good reason for that—they have! It's easy to add them back, but before you do, there is a reason why Microsoft removed them.

In CRM 2011, Microsoft added a checkbox to workflows allowing the creator to automatically delete completed workflow jobs (to save disk space). It was unchecked by default and on the administration tab, so many users never knew it was there. In order to help online users reduce disk space, this option is now checked by default in CRM 2013 for asynchronous workflows. And since the default behavior is to NOT save workflow jobs, the related Process Sessions was not added to the forms.

For users who are actively trying to troubleshoot problems with a missing Dynamics CRM 2013 workflow, it can be helpful to open a record and see what workflows have run. Follow these simple steps to add them back to the form:

How To Disable Automatically Deleting Completed Workflows

  1. Open an existing workflow.
  2. If the workflow is activated, deactivate it.
  3. If it's asynchronous workflow (the Run this workflow in the background check box is selected), de-select Automatically Delete completed workflow jobs (to save disk space).

    missing dynamics CRM 2013 workflow

  4. If it's a synchronous (real-time) workflow, then the only option is to keep logs for workflows which encounter errors, and it's selected by default.

    Missing Dynamics CRM 2013 Workflow

  5. Save the workflow.
  6. Activate the workflow.

How to Enable Process Session Relationship on the Form

  1. Navigate to the Form Customizations screen
  2. Select Navigation in the ribbon.
  3. Drag Process Sessions from the Relationship Explorer on the right to the navigation menu on the left.

    Missing Dynamics CRM 2013 Workflow

  4. Save.
  5. Publish.

How to Access in Navigation

  1. Open the record, then click the down arrow next to it.
  2. Select Process Sessions (it may be necessary to scroll to the right on the sub-menu)

    Missing Dynamics CRM 2013 Workflow

And that's all there is to it!

Looking for more tips on working with Processes in CRM 2013? Check out these blogs:

Happy CRM'ing!

CRM 2011 Dialogs: Preventing Users from Going Back With Child Dialogs

If you are building a dialog for CRM 2011 and need to have it trigger an email or create a record or do some other action (like case resolution), you should be aware that the Previous button can pose a problem.

child dialogs

As best practice, you want to do everything you can to put any automatic actions in your dialogs at the very end. However, sometimes you can't get around putting the action somewhere in the middle of your process, and that's where you can get into trouble with your users going backwards through your dialogs.

Any time during your dialog, users can hit Previous and have it go backwards a step. This will cause a problem if the following three things happen:

  1. The dialog did something when your user hit Next
  2. Your user hits Previous
  3. Your user hits Next again and retriggers the action that the dialog already completed.

In order to prevent this, you can use child dialogs to break your dialog into two pieces and disable the ability to go backwards from the second dialog to the first. To do this, make sure that after your action (such as Send Email or Create Record), you use the Link Child Dialog step to have your dialog call a child dialog to finish its process.

CRM 2011 Dialogs: Preventing Users from Going Back With Child Dialogs

If you do this, as soon as your first dialog calls the child dialog, the user will be unable to hit the Previous button and go backwards. This means they won't be able to retrigger the automatic action they have already fired off.

CRM 2011 Dialogs: Preventing Users from Going Back With Child Dialogs

That's it! A quick and simple tip to prevent some potential issues with dialogs in Microsoft Dynamics CRM.

Happy CRM'ing!

How to Use Microsoft Dynamics CRM Workflow Templates

In Microsoft Dynamics CRM, you can reuse the same workflow steps in multiple workflows without recreating them. This is done by creating a workflow template and then using the template as a basis for creating the other workflows.

In the example below, we'll make a template that will create an email activity when a case is closed. We will be able to use it to specify different emails to send based upon how the case is resolved. Since we want to create an email activity, it can be done asynchronously.

  1. Within Microsoft Dynamics CRM, navigate to Settings > Processes, and click New to create a new process.
  2. Fill in the process name, select the category of workflow and the entity of case.
  3. Ensure the Type is set to New Blank Process and click OK.

    Dynamics CRM Workflow Templates

  4. In the workflow editor, change the Activate As dropdown to Process template. This will make the workflow a template over a standard workflow.

    How to Use Microsoft Dynamics CRM Workflow Templates

  5. Set the desired triggers for the workflow and create the workflow steps, as desired.

    How to Use Microsoft Dynamics CRM Workflow Templates

  6. Save then activate the template which will make if available for new workflows.

Now that the workflow template is created, let's walk through the steps of using the template in an existing workflow.

  1. Create a new process, and select the same entity type as the template.
  2. Select New process from an existing template option.

    How to Use Microsoft Dynamics CRM Workflow Templates

  3. Select the template from the list.
  4. Click OK. This will copy the template workflow into a new workflows ready to be modified.

    How to Use Microsoft Dynamics CRM Workflow Templates

Note: This "point in time" copy of the template; so changes made to the template will not affect those created from the template. Likewise, changes to workflows created from the template will not impact the template.

Now that you know how to use Microsoft Dynamics CRM workflow templates, you have discovered a quick way to create many workflows that are similar without duplicating your efforts!

If this was useful to you, you'll find many more ways to work with workflows on our blog.

Happy CRM'ing!

Retrieving Data from a Related Entity with Real-Time Workflows in CRM 2013

Historically in Microsoft Dynamics CRM, when you create a new record within the context of a parent record, the mapping controls what data is populated from the parent. For example, when you create a new contact from an account, the main phone number, address, and description fields are brought down from the account. But if you create a contact record from anywhere OTHER THAN the account—no such luck.

Luckily, CRM 2013 real-time workflows have come to the rescue!  These workflows can fire on change of a field and present the changes while the user is still on the page.  To demonstrate this, we will create a real-time workflow to update the basic contact fields based on the selection of an account.

Here are the steps to create that workflow:

  1. In CRM, navigate to Settings > Processes.

real-time workflows in CRM 2013

  1. In the Create Process window, name the new process. Set the category to Workflow and the entity to Contact. Uncheck the Run this workflow in the background box and press OK.

Retrieving Data from a Related Entity with real-time workflows in CRM 2013

  1. If you have used workflows in the past, you may notice that new options are available in the process window when you choose to run the workflow in the background.
    1. Set the scope to Organization.
    2. Select the desired option for Execute As. Using the system default of "The user who made the changes to the record" has some benefits because the changes will show that user on the audit log instead of the workflow's owner. However, there are times when a workflow needs to run with permissions greater than the average user, and in those cases you would want to change the setting.
    3. Check the Record fields change checkbox, press the Select button, choose Company Name from the resulting window and press OK.

Real-Time Workflows in CRM 2013

  1. Press Select this row and click Add Step and press the Add Step button.
  2. Choose Update Record in the resulting list.
  3. Enter a description on the step and press the Set Properties button.

    Real-Time Workflows in CRM 2013

  4. In the Update Contact form, click on the Business Phone. In the Form Assistant on the right side, set the Look For value to Company Name (Account) and select Main Phone in the next drop down list. Then press the Add button (which will make Main Phone appear in the window below the drop down list) and press the OK button.

Real-Time Workflows in CRM 2013

  1. Follow similar steps to add the address fields to the workflow. In this case, scroll down to the bottom to the Additional Fields section to populate the Address 1 fields. These fields make up the fly-out on the address section of the form.

Real-Time Workflows in CRM 2013

  1. Press Save and Close on the update contact form.
  2. Press Save and then Activate on the workflow form.

    Real-Time Workflows in CRM 2013

Now the workflow is done and ready to run! Simply select a contact and change the customer to test it.

This is just a hint of the power of real-time workflows. Stay tuned for more CRM 2013 news. Happy CRM'ing!

Are You Missing Completed Workflows in CRM 2011?

Workflows are a powerful tool that CRM users utilize to create records, update records, send emails and much more. With a recent update to Microsoft Dynamics CRM, a new option was added to the administration tab that allows users to "automatically delete completed workflow jobs (to save disk space)."

automatically delete completed workflow jobs - CRM 2011

So what does this mean?

When you check this option, it will remove the system job as soon as it has been marked complete, and your completed workflows will appear to be missing. This could cause issue with auditing or troubleshooting a workflow as well as present issues with performance.

To avoid these issues, PowerObjects recommends that you leave this option unchecked and schedule a system job on either a weekly or monthly basis to remove these completed job records instead.

For more on workflows and how to use them, here are some additional blogs:

Happy CRM'ing!

Background Process Navigation for Accounts and Contacts in CRM 2013

When viewing account or contact records, you may sometimes find it useful to view background processes such as workflows. In Microsoft Dynamics CRM 2011, it's easy to  view workflow history by clicking in Workflows in the left-hand navigation of a record.

Background Process Navigation in CRM 2013

However, the background process navigation is not included by default in the top navigation for accounts and contacts in CRM 2013. So, how do you make this navigation option available?

It's fairly straightforward—you just have to customize the form to include Background Processes in the navigation.

  1. Go to Form Customization—also called the Form Editor—and click on navigation.
  2. Click on Background Processes, then drag and drop to the Processes section in the left navigation.
  3. Save and publish your changes.

Background Process Navigation in CRM 2013

Now let's check to see if it's available on the record.

  1. Open the record, then click on the down arrow in the top navigation.
  2. Scroll through the sub-menu and until you find Background Processes.
  3. Click on Background Processes and it will list a history of background processes.

Background Process Navigation in CRM 2013

That's it—a history of all the background processes for an account or contact is now quick and easy to see. If this was useful, keep checking back for more tips, tricks and features for Microsoft Dynamics CRM 2013.

Happy CRMing!

Send an Email Notification When Adding a Note to a Case in CRM

Workflows are a great way for achieving automation in Microsoft Dynamics CRM. PowerObjects has published numerous blogs already on various tips and tricks for using workflows in CRM. To add to this, here is a tip to trigger a workflow that sends an email notification when adding a note to a case in CRM.

In implementations where case management is used extensively, there is often a challenge to track and manage notes logged by users to cases. Although using activities is a much better practice to leverage, users often feel using notes is easier just for the sheer fact that it's free text data entry with an auto time stamp. This is one of the user adoption issues that organizations sometimes find a challenge to solve.

A simple workaround from a CRM admin standpoint is to trigger a workflow such as an email notification to the owner of the case whenever a new new note is added to a case. Notes seem to be a selectable entity in workflow, but with the conditional options there, CRM admins may find it difficult to figure out how to specify only when the entity is a case. There is "Regarding(Case)" field that can be used in combination with the "Case Number" field.

The screenshots below show the workflow configuration that can be triggered when a note is added to a case. Bonus tip: make sure to not use "Created On" Contains Data, as it will not trigger the workflow.

Adding a Note to a Case in CRM

Adding a Note to a Case in CRM

If this was helpful, you might want to check out these related blogs:

Stay tuned and we will bring to you more tips and tricks from Dynamics CRM world.

Happy CRM'ing!

How to Execute a Failed Workflow Using CRM ExecuteWorkflowRequest in a Console Application

Workflows are an extremely useful tool in Microsoft Dynamics CRM. In today's blog, we'll discuss how to execute a workflow using the CRM ExecuteWorkflowRequest message in a console application.

In this scenario, a workflow has failed a couple of times. Instead of re-running this workflow manually, we can use the code below to automate the process.

The screenshot below shows the System Jobs view of the workflow named Workflow Test that has failed.

The ExecuteWorkflowRequest message can be used to execute any given workflow. The ExecuteWorkflowMessage requires two values:

  1. WorkflowId
  2. EntityId

Note: You must ensure that the WorkflowId is of an active workflow.

You can manually set these values by using the CRM interface to attain each of these values and simply call the ExecuteWorkflowRequest in the console application.

The following code automates this process by doing the following:

  1. Query the System Jobs (asyncoperation entity) to retrieve failed worklows by the workflow name.
  2. Check to see if the workflow hasn't already succeeded.
  3. Select one failed workflow to rerun.

Console application code

After the console application executed, the failed workflow was rerun.

System Jobs view after console application was executed and workflow succeeded

When a workflow is created, CRM creates two entries in the workflow entity. When retrieving failed workflows from the asyncoperation entity, you will notice the workflowactivationid attribute has a reference to the workflow. If you attempt to use this value as the WorkflowId, you will get an error stating "Workflow must be in a published state" when the ExecuteWorkflowRequest message is executed.

The GetWorkflowId helper method is used to retrieve the published workflow by querying the workflow entity and retrieving the parentworkflowid attribute. This value will correspond to the WorkflowId that you will get when using the CRM interface.

You will want to expand the logic to determine a distinct set of failed workflows and regarding entity that have not succeeded.

There you have it! An easy way to automatically execute a workflow using a console application. If you are looking for help with your workflows, PowerObjects can help! Contact us for more information.

Happy CRM'ing!

How to Assign a Territory to a Lead in Dynamics CRM

In today's blog we'll take a peek at an extremely powerful tool in Dynamics CRM 2011: workflows. In particular, let's look at a scenario: Alpha Company would like to use CRM to automatically sort their lead records for their sales team. To accomplish this, they've decided to use a workflow to assign a territory to a lead.

We'll assume that Alpha Company has read up on adding a State/Province field as a drop-down or look-up, and that they've created a global option-set called State containing 50 US states and a custom look-up to the Territory entity, containing their desired territories. The state and territory fields will be located on the lead form.

After the State and Territory fields are created and implemented, a new workflow will be created under the Lead entity. This workflow will run when a record is created, and the Scope will be set to Organization.

The workflow will begin with a Check Condition and an Update step that looks like this:

If Lead:State equals (desired states for desired territory), then:

Update: Lead (set properties) > (Choose desired territory from Territory look-up)

The Check Condition and Update step work to check what state the lead record is in, and update the Territory field accordingly.

For example: A lead record is created, and located in Wisconsin (WI). The workflow would check for WI, and if found, it would update that same lead record's Territory field to read Midwest. This is useful in that it will automatically sort incoming leads to appropriate territories, unlocking a bevy of further automation possibilities!

If that was a little confusing, don't worry. Below you will find an easy-to-follow, step-by-step guide aimed at creating a workflow to solve Alpha Company's issue.

1. Click settings

a. Click processes

i. Click New

Assign a Territory to a Lead

2. Enter "Assign Territory to Lead" in Process Name

a. Choose Entity: Lead

b. Choose Category: Workflow

3. Choose Scope: Organization

a. Choose Start when: Record is created

b. Click Add Step

c. From the Add Step menu, choose Check Condition (not shown in screen-shot)

d. Click <condition> (click to configure)

4. Choose Primary Entity Lead

a. Choose State

b. Choose Equals

c. Choose desired States for Midwest Territory.

d. Click Save and Close

e. Select row and click Add Step (see 10b), in the Add Step menu, choose Update Record

f. Click Set Properties

g. Click Territory look-up.

h. Choose desired (in this case, Midewest) Territory.

i. Click OK.

j. Click Save and Close

5. Click on the word If of the Check Condition you created in steps 10 & 11.

a. Click Add Step

b. From the Add Step menu, choose Conditional Branch (not show in screen-shot)

c. Click on <condition> (click to configure)

d. Repeat steps 11a – 11h, for as many territories as you desire.

6. Repeat steps 12a – 12d until you've finished all of your territories.

7. Once you've finished all of your territories, click Save.

a. Click Activate

8. You made it! Test it out by creating a lead and assigning the lead a state from the drop-down. Wait 20-30 seconds and refresh the page, and you'll have your territory automatically assigned!

Want to learn more about workflows? Here are some more posts delving into a wonderful, wonderful world of automation:

Happy CRM'ing!