Performance Tools Built Into CRM

There are a lot of factors that can contribute to CRM performance issues and sometimes it's hard to know where to begin troubleshooting. Maybe your issues are caused by a network latency issue, an SQL issue, or a possible server resource issue. CRM has built-in performance tools to assist you with this!

1. Check your latency and bandwidth at https://CRMUrl.com/tools/diagnostics/diag.aspx (make sure to replace CRMUrl.com with the actual CRM URL).

As a general guideline, performance will start to degrade when latency > 150 ms and/or bandwidth < 50 KB/s.

Performance Tools

2. Another great tool that is built right into CRM (2013 SP1 and up) is the CRM Performance Center. To activate, simply log into CRM then click CTRL+Shift+Q on your keyboard. Click Enable, then click Refresh. When browsing in CRM, this will capture how long it takes components to load. This is a great alternative to tools like Fiddler and won't require you to install additional third-party tools.

Performance Tools

Hopefully these tips will help you successfully troubleshoot performance issues you may be experiencing. Feeling overwhelmed with managing your CRM system? We offer a range of support options to fit a variety of needs!

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!