Sonoma Partners Microsoft CRM and Salesforce Blog

Announcing CRM WF Date/Time Utilities

I am pleased to announce the CRM WF Date/Time Utilities.  It consists of three custom workflow activities that help extend the limitations of Date/Time fields in CRM.  Together these utilities can be pretty powerful when working with Date/Time fields in CRM Workflows.  First, lets go over each of the three custom workflow activities.

Get Date Parts

This utility will take in a Date/Time field and return all the parts of the Date/Time such as the day, month, year, hour, minute, second, and millisecond.  This is useful for a Check Condition in a workflow if you need to check for a specific time or date of the field.

Set Date Parts

This utility will take in a Date/Time field and allow a specific part of the Date/Time field to be overwritten. For example, you could always set a Date/Time to 5pm by passing in the Date/Time field and 5 for the "Hour" parameter of this workflow activity.

Add Date Parts

This utility is similar to “Set Date Parts” but instead of overriding a part of the Date/Time field, it will add a date part onto the existing Date/Time field. In the above example, if you pass in 5 for the "Hour" parameter, it will add 5 hours to the existing Date/Time rather than setting the Time to 5pm.

With that, here’s an example workflow that shows off some of the power of the Date/Time Utilities.

Birthday Fix Workflow

The goal of this workflow is to workaround the native time zone issue when storing Date fields in CRM.  If you use a Date only field such as Birthdate, CRM will store the time as midnight in the user's local time zone. The issue with this is that, for example, if a user who updates the Birthdate field is in Central time zone and a user in Mountain time zone views the Birthdate, it will be one day earlier. This is because the Date/Time field is stored as midnight Central time which is 11 PM Mountain time the day before.

With the SonomaPartners.DateTimeUtilities, we can work around the time zone issue with a workflow using four simple steps.

1) First add a step for GetDateParts passing the Birthdate field into the custom activity.



2) Next use a Check Condition on the result of the GetDateParts custom activity. We want to check if the "Hour" is NOT set to 12. This way the Birthdate will not be updated multiple times if the Hour is already set to Noon.


3) Add a step for a successful Check Condition from step 1. This step will call SetDateParts passing in the Birthdate field and also with the "Hour" argument set to 12. This will overwrite the Midnight Date/Time field and set it to Noon.

Note: The default value of each argument is -2147483648 (the minimum value of an integer), therefore if you update the arguments after the first save, you will see each previous null value set to -2147483648 which is intended.


4) Lastly, add a native workflow step to Update the Contact record setting the Birthdate field to the result of the SetDateParts activity. This will set the Birthdate to Noon which gives some buffer so that users in other time zones will still see the same Date rather than the day before or the day after.


The finished workflow:


Scheduled Process

When Microsoft releases the ability to deploy custom workflow assemblies to CRM Online, these Date/Time Utilities could provide some great flexibility.  By utilizing the utilities, a scheduled process could be built for CRM Online using a workflow with a few steps.

1) Create a workflow that is marked as on-demand and a child process.

2) Add a step to execute a custom workflow activity that performs a desired operation.

3) Pass the Process Execution Time into the AddDateParts custom activity and set the “Day” argument to 1

4) Create a Wait condition and set the Process Timeout equal to the result of the AddDateParts activity.

5) Kick off the same workflow as a child process

This workflow can then be triggered on-demand and will wait until the next day to trigger again.  A SetDateParts activity could be used after the AddDateParts activity to set a specific time for this workflow to trigger.

Source and Download

The workflow assembly and source code for the Date/Time Utilities can be found on CodePlex.  Both CRM 4.0 and 2011 versions are available.  Head there and follow the project for any updates.  As always, any feedback is appreciated!

Topics: Microsoft Dynamics CRM 2011

CRM 2011 Timeouts and Limits Wiki Created

With all the technologies that CRM is built on, it can be tricky to hunt down the source of a timeout and how to configure it, if necessary.  Along the same lines, it can be hard to track down hard coded limits that Microsoft imposes (usually for performance reasons) and how to configure those limits as well.  Therefore in order to save some time, we decided to compile one list of the common timeouts and limits related to Microsoft Dynamics CRM 2011.  We also wanted to open up the list to the community if others want to add more timeout and limit information. Therefore we created a CRM 2011 Timeout and Limits wiki at:

Feel free to comment with any timeout or limit recommendations or provide updates to the wiki page.

Topics: Microsoft Dynamics CRM 2011

I'd Like to File a Missing Solution Report

I discovered an interesting ‘gotcha’ with managed solutions and reports the other day.  We had deployed a managed solution that contained a few reports, and then later we decided that one of the reports was no longer necessary.  Instead of leaving the solution cluttered with a report that is no longer used, we proceeded to delete it from the managed solution.  However when we tried to import the updated solution as managed into our QA environment (that had the older version of the solution with the extra report), I received the following error:

Managed solution cannot update reports which are not present in solution package. Report 81E46F90-FDA8-4103-866A-3142B8B34E08 is not part of current solution

The error makes sense that CRM cannot update a report which in not present in the solution, but I found it surprising that it would even attempt to!  Unfortunately this error prevented us from cleaning up the solution a little bit but there is a workaround.  You can edit the report and change the name to denote that it isn’t used anymore.  Also null the values in Categorization, most importantly the Display In field so that even though the Organization will continue to have the old report, it will not be displayed anywhere.


Microsoft Dynamics CRM Product Roadmap Updates from WPC 2012

Last week we attended the Microsoft Worldwide Partner Conference (WPC), and the conference was filled with plenty of updates (some good, some bad) about the Microsoft Dynamics CRM Product Roadmap. Right before WPC, Microsoft posted an update stating that some of the key features that were supposed to be part of the Q2 2012 Service Update will be delayed. The delayed features include:

  • Microsoft Dynamics CRM Mobile: support for various smartphones and tablets including iPhones, iPads and more
  • Cross-browser Support: support for users to run Microsoft Dynamics CRM with non-Internet Explorer Web browsers such as Chrome, Safari, and Firefox (on both Macs and PC’s)
  • Custom Workflow Activities: would allow developers to deploy custom .NET workflow activity assemblies to the Microsoft Dynamics CRM Online hosted environment.
  • Enhanced Social: new activity features such as “Like” and advanced feed filtering capabilities

While the blog post was a little light on details explaining the delay, Microsoft execs at WPC basically stated that they were not comfortable that these features were ready from a quality perspective. Therefore, these key enhancements will be included in the next service update, which the blog post refers to as “Microsoft Dynamics CRM Q4 2012 Service Update”. This Q4 update will also include other new features and enhancements, but the blog post did not specify the details of what that includes. The blog post promised a Q4 2012 Service Update Release Preview Guide “this summer”.

On the plus side, we attended some outstanding presentations at WPC that outlined some AMAZING new details about the future of Microsoft Dynamics CRM. The sessions were titled “Microsoft Dynamics CRM—Now and in the Future” and “Power of Possibilities with Microsoft Dynamics CRM” and you can watch both of these presentations online. Around the 20 minute mark of the Microsoft Dynamics CRM—Now and in the Future video, Bill provides some details about the product roadmap and future releases. Interestingly, these updates are bucketed into the names Fall 2012, Winter 2013 and Spring 2013 (different naming pattern than the Q2 and Q4 service updates).


Process Driven UI

WPC2012-ProcessUI-1 WPC2012-ProcessUI-2 WPC2012-ProcessUI-3
Both Microsoft CRM presentations included sneak peeks of the new process driven UI. Microsoft explained that as part of the cross-browser re-engineering process they took the opportunity to streamline the Web browser user interface to remove clutter and reduce pop-ups. Some of the neat tweaks that we liked include:

  • Better use of icons and visual elements (slick looking sales process)
  • Integration with Skype and/or Lync
  • Improved integration with activity feeds
  • Less use of the Ribbon when a record form is open

Again, Microsoft plans to release this revised user interface in the “Fall 2012” timeframe.

CRM Metro Application
Metro1 Metro2 Metro3

Looking into the Winter 2013 release timeframe, Microsoft showed a vision of what the Metro CRM app for Windows 8 might look like. Sticking with the Metro design principles, the user interface is super clean and minimal. In addition, it appears to be MUCH more touch-friendly that than the Web-based UI. Obviously this will be perfect for users running tablet / touch Windows 8 devices.

Summary and our $0.02
While of course we’re disappointed that some key features were delayed until later this year, we’d rather have a delay than have our customers suffer through a product that doesn’t meet their quality needs. We’re also left scratching our head a little about the change in nomenclature for the future releases. Will they stick with the Q2 and Q4 naming, or shift to the Fall/Winter/Spring naming? It doesn’t matter a ton, but I am sure those details will be clarified in the near future. With that said, we’re super excited about some of the great new capabilities and user interface improvements that Microsoft showed at WPC that will appear in the future product roadmap!

Topics: Microsoft Dynamics CRM 2011