Tips on Working with Dynamics CRM 2015 Calculated and Rollup Fields

Dynamics CRM 2015 release brings a rich tool for system customizers to be able to do their work with less dependency with code. The most useful features in Dynamics CRM 2015 is the Calculated and Rollup Fields.

First of all there are some good post from fellow MVPs regarding these new features:

Calculated Fields (by Leon Tribe): http://blogs.msdn.com/b/mvpawardprogram/archive/2014/12/15/dynamics-crm-2015-calculated-fields.aspx

Rollup Fields (by Jukka Niiranen): http://niiranen.eu/crm/2014/12/analyzing-customer-behavior-data-crm-2015-rollup-fields/

So, I did my hands on with these new features to test and found out that some limitations in regards these new features:

  1. Currently there is no way to upgrade/update existing fields (Simple) to calculated or rollup fields. This situation could be common when there are some fields that calculated through other methods before (plugin/WF/js) that would like to be updated with the new functionality.
  2. The calculated or rollup fields need to be created first in metadata before it could be configured. Therefore if the configuration process was not completed during the creation of the fields there is potential “orphan” calculated/rollup fields that do nothing.
  3. The rollup fields are calculated asynchronously through the system job, therefore there will be some delay to get these fields to be calculated.

CalculateRollup

I hope this helps!

Dynamics CRM 2013 SP1 – UX Update – Mostly Unnoticed

Dynamics CRM 2013 SP1 comes with lots of new good stuffs, such as the new Service Management, SLA, Timer on Case, Queue Routing, Social Listening and many more. However, for me as CRM user that always use PC and web browser to work with Dynamics CRM, the user experience for PC client quite cumbersome, especially the navigation bar that collapses immediately when my mouse pointer is navigated away from the bar. I love to have responsive mouse pointer and most of the time my mouse pointer goes out the navigation bar and closes the navigation bar, resulting multiple click to main navigation menu.

As my online instance being updated with Spring 14 release, I noticed an improvement in their UX. The navigation bar does not collapse immediately when my mouse pointer goes out of the bar.

updated

This UX definitely gives a massive impact to my productivity. Big thanks to Dynamics CRM product team to listen to the feedback and delivered this feature!

 

Important information about supported configurations in the next release for CRM

The CRM Product team recently released the latest updates on supported configurations in the next release for Microsoft Dynamics CRM.

It includes removal of their supports for the popular Windows and SQL Server 2008 (time to upgrade!)

And also completely removes some of the deprecated javascript functions:

  • GetServerUrl()
  • IsOutLookClient()
  • IsOutlookOnline()

Full post: http://blogs.msdn.com/b/crm/archive/2014/05/14/important-information-about-supported-configurations-in-the-next-major-release-for-crm.aspx

Data Migration/System Integration using SSIS (Salesforce to Dynamics CRM Example)

Recently I had a chance to do a couple of data migration & integration projects for Dynamics CRM. On these projects, the ISV product that we chose is Dynamics CRM SSIS Connector by KingswaySoft. I got a great support from my MVP role model, Daniel Cai, during the project.

In this post, I would like to explain some basic setup, features and benefits of using the SSIS connector for Dynamics CRM. SSIS is really useful in system integration and migrating the data from legacy system to a newer one. In my sample scenario I’ll be using Salesforce.com as the data source and Dynamics CRM as target source. (This sample scenario is considering the of the situation of migrating data from Salesforce to Dynamics CRM. So, I hope this post will be beneficial for anyone that migrating data or considering to move from Salesforce to Dynamics CRM).

Note: KingswaySoft provides free SSIS connector to run under BIDS/Visual Studio, therefore it is a great tools for once-off data migration projects. For continuous processes (set the SSIS package schedule for instance), we need to buy the paid license (really reasonable price for this quality of tool + support). For pricing & purchasing info: https://www.kingswaysoft.com/purchase

Part 1: Environment Setup

1 . Visual Studio 2012 with SSDT Installed / BIDS 2008

(Note: Depends on the Production environment; AFAIK, the manifest file generated for deployment will be based on the IDE that generate the SSIS package; e.g. BIDS 2008 is for SQL Server 2008, and SSDT 2012 is for SQL Server 2012)

In this example I’m going to use Visual Studio 2012 with SSDT installed. (Download: http://www.microsoft.com/en-au/download/details.aspx?id=36843)

ssdt visual studio 2012

2. Install SSIS Connector for Dynamics CRM.

Download: http://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-crm/download

Dynamics CRM Connector help Manual:

http://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-crm/help-manual

3. Intall SSIS Connector for Salesforce.

Download: https://www.kingswaysoft.com/products/ssis-integration-toolkit-for-salesforce/download

Salesforce Connector help Manual:

https://www.kingswaysoft.com/products/ssis-integration-toolkit-for-salesforce/help-manual

 

The installers from KingswaySoft will then install the License Managers for both products (Dynamics CRM and Salesforce)

Kingswaysoft License Manager

Part 2: Getting Started With “CRM” SSIS Project

For this sample, I’m using Salesforce.com developer edition. To get a free developer license: https://developer.salesforce.com/ then click on Sign-Up.

The SSDT installation for Visual Studio 2012 will install Business Intelligence Project Templates in Visual Studio. Therefore, when we create on New Project, the new Business Intelligence Projects will appear on the template list. Select Business Intellience > Integration Services > Integration Services Project:

SSIS Project

For a fresh install on BIDS 2008, the Dynamics CRM and Salesforce connector will not appear automatically, to add the Conneciton Manager and the Toolbox components please refer to the help manuals listed above (part 1). Visual Studio 2012 + SSDT installation automatically lists all available pipeline components by scanning the system.

Setup Connection Managers

First of all, we need to create connections to both Salesforce (Source) and Dynamics CRM (Target). By Right-Click the Connection Managers box > New Connection:

ConnectionManagers

Dynamics CRM and Salesforce connection will be listed amongst the connection list:

ConnectionManagersCRMAndSF

  • Create Salesforce Connection Manager:

The connection manager will open up the connection window that consist of Username, Password and Security Token to Salesforce org. To test whether connection has been successfully configured, click on “Test Connection” button. Then click OK to create the Salesforce Connection Manager.

SFConnectionManager

Note: Salesforce connection is highly secured and they implemented Security Token for any API connections that came from outside trusted IP ranges. To reset the security token (in case not provided initially):

SalesforceResetSecurityToken

  • Create Dynamics CRM Connection Manager:

The conncetion manager will open up the connection window that consist of Authentication Type, Discovery Service URL (please note the discovery service only need the first part of the URL. Without the following “XRMServices/2011/Discovery.svc”), Service Endpoint, SDK Client Version, Username, Password and Organisation Name. To test whether connection has been successfully configured, click on “Test Connection” button. Then click OK to create the Dynamics CRM Connection Manager.

CRMConnectionManager

Note: (As usual) to get the Dynamics CRM web services URLs, navigate to: Settings > Customizations > Developer Resources

discovery Server

Build SSIS Control Flow & Data Flow

To start building the SSIS package, it starts with the Control Flow and Data Flow. For this example I’ll transfer Lead and Account object from Salesforce to be mapped to Lead and Account Entity in Dynamics CRM. To achieve that: drag 2 Data Flow Task components into the Control Flow and named it with meaningful name, example:

control flow

Then drill down to the underlying data flow task by double click the task in Control Flow. Drag Salesforce Source and Dynamics CRM Destination component and link them:

DataFlowUnconfiged

Double Click Salesforce Source to configure the Lead data source. And click on “Columns” to select the required columns as part of the data source. Then click OK:

SalesforceSource

Double click Dynamics CRM Destination to configure the destination and field mappings from Salesforce:

CRMDestination

SampleCRMMapping

Note: I created a custom text field with 18 character to store the Salesforce id as reference (FYI: Salesforce ID is generated in either 15 or 18 length format, not GUID).

Do the same with the account and run the project:

SuccessRun

Confirm that the data are transferred from Salesforce to Dynamics CRM:

LeadTransferred

Bonus Part (Part 3): Deployment Preparation and Package Configuration

Configuration

In Visual Studio 2012 + SSDT, we will not find “Package Configuration Wizard” in SSIS when we right click in Control Flow (this is the way to prepare the configurations in BIDS 2008) as the 2012 version introduced the new model for configuration and deployment called the Project deployment model. As part of that change, the old way of doing configuration (environment, xml, parent package, registry and table) is not an option. In the project deployment model, you get parameters and environments. Therefore to create the configuration in the “classic” way, right click on the solution and click on “Convert to Package Deployment Model”:

Package Conversion

Now the package configurations option is back:

packageconfig

Config

Since we have converted the deployment mode, the deployment .manifest file can be generated through the solution properties and setting the “Create Deployment Utility” to True:

Deployment

 

And as the project being built; The deployment files are generated:

DeploymentFolder

Set Filter Attributes – Update Plugin – Dynamics CRM 2013 Upgrade Gotcha

Recently I upgraded one of my virtual machine with Dynamics CRM 2011 to Dynamics CRM 2013. That instance contains my old solutions from previous learning and testing. One of the solution contains several plugins to be triggered on Update request.

With the new auto-save feature in Dynamics CRM 2013, any modification to the form will be automatically saved every 30 seconds or when the user navigated away from the from (click other records or navigate to different page). 

There was an unexpected performance issue every a couple seconds (30 seconds to be exact) when I was working with the new CRM 2013 form. After I traced the source of the problem, it was coming from the plugin that triggered every 30 seconds by the auto-save. The new auto-save functionality will trigger the plugin because I was not filtered the plugin on the required fields (attributes). This problem never happened on CRM 2011 as the update request will only be triggered through “Save” button with manual user interaction.

I think it is a best practice to filter the update plugin to only be triggered on the related attributes, to achieve that:

Method 1: through Plugin Registration Tool, on the step registered:

Image

 

Method 2: through Developer Toolkit in Visual Studio, on the step registered:

Image

 

This would be a lesson learn in future to do the due-diligence in selecting the correct filter attributes for the plugin.

 

CRM System Admin & Customiser – Working with Dynamics CRM on iPad

Recently I stumbled across a question in Dynamics CRM Forum regarding “How to see CRM Settings on a tablet browser”

Out of my curiousity, I tried something on my iPad. The steps that I used to achieve this is using Google Chrome on iPad (never bother to check it on Safari though, as I never use that):

1. Open a new Tab, navigate to Dynamics CRM instance.

2. On Google Chrome option (the three lines at the right hand side of url bar), select “Request Desktop Site”

3. It will redirect to https://<crmserverinstance>/m/default.aspx change it to https://<crmserverinstance&gt;/main.aspx

4. Voila, the Settings button is there and works! It’s quite slow though.

Image

Don’t Try This At Home – Adding CRMAppPool User as Dynamics CRM User

No matter how lazy we are to add new user, especially during “Proof of Concept” or Testing period.

Do not add CRMAppPool User as Dynamics CRM SystemUser. This will breaks the system, moreover in multi-tenant environment – Considering the amount of time required in repairing might be bad in Multi-Tenancy environment in regards to the SLA, all of your CRM Services will break and show the following error:

Missing Dynamics CRM Security Role” – Access to Microsoft Dynamics CRM has not been fully configured for this user. The user needs at least one security role before you can continue.

Image

Microsoft stated: “This behavior is by design. Making the account that is running the CRMAppPool into a Microsoft Dynamics CRM user is not supported.” in this KB article: http://support.microsoft.com/kb/2500917

I did that, so what I need to do?

1. Create new AD User to replace the corrupted one.

2. Open Control Panel > Programs and Features

Image

3. Open Microsoft Dynamics CRM Server 2013

Image

4. Select Repair

Image

5. Update the following user configuration with the new AD user 

Image

6. Continue the whole repair process (“Next” button spam!).

7. Test to access your CRM instances back.

Image

Lesson Learned

Before start working with Dynamics CRM Server, read through the Implementation Guide carefully: http://www.microsoft.com/en-au/download/details.aspx?id=40322 (On CRMIGv6_Planning.docx, Section: Microsoft Dynamics CRM Services and IIS Application Pool Identity Permissions).