Quantcast
Channel: Dynamics 365 Customer Engagement in the Field
Viewing all 463 articles
Browse latest View live

Dynamic Activity Reporting using FetchXML

$
0
0

In a previous post I wrote about some of the differences and limitations around custom reporting in Microsoft Dynamics CRM, specifically of using FetchXML vs. the SQL Filtered Views. Because CRM Online is limited to the use of FetchXML, I have seen many of our online customers run into issues with activity reporting. There are out of the box reports available but do not allow flexibility when it comes to customizing them to fit the specific customer’s needs. Because of this limitation when one of my customers had the requirement to be able to run a report out of CRM that returned all activities that were “Set Regarding” an Account or their related Opportunities and/or Contacts it required a deeper dive into the capabilities of activity reporting using FetchXML. As I was developing this report I wasn’t able to find a lot of comparisons so I thought I would share what I did.

Through a few different iterations we were able to develop a custom activity report, using FetchXML that allows them to run an activity summary for selected Account or that returns activities that are set regarding either an account or that related accounts contacts or opportunities (@Accountid) and also filters based on these other parameters:

Parameter

Field

@Accountid

Regardingobjectid

@EventDateFrom

Scheduledend

@EventDateTo

Scheduledend

@ActivityType

Activitytypecode

@Status

Statecode

 

By using the link-type='outer' I was able to return the data I needed including custom columns from the phonecall and appointment entity. Note: performance should be considered when utilizing the outer link-type, for this particular customer they were okay with the fact that performance of the report may be impacted because their business need for this information is so high, they also put heavy restriction on who can run the report and the time of day that the report is run.

The query I used is:

<fetch version="1.0" output-format="xml-platform" mapping="logical"
       distinct="false">
  <entity name="activitypointer">
    <attribute name="subject" />
    <attribute name="ownerid" />
    <attribute name="regardingobjectid" />
    <attribute name="activitytypecode" />
    <attribute name="statecode" />
    <attribute name="scheduledstart" />
    <attribute name="scheduledend" />
    <attribute name="activityid" />
    <attribute name="description" />
    <attribute name="createdon" />
    <attribute name="createdby" />
    <attribute name="actualstart" />
    <attribute name="actualend" />
    <order attribute="modifiedon" descending="false" />
    <filter type="and">
      <condition attribute="regardingobjectid" operator="not-null" />
      <condition attribute="isregularactivity" operator="eq" value="1" />
      <condition attribute="statecode" operator="in" value="@Status" />
      <condition attribute="activitytypecode" operator="in" 
                 value="@ActivityType" />
      <filter type="and">
        <condition attribute="scheduledend" operator="on-or-after"
                   value="@EventDateFrom"/>
        <condition attribute="scheduledend" operator="on-or-before"
                   value="@EventDateTo"/>
      </filter>
    </filter>
    <link-entity name="opportunity" from="opportunityid" to="regardingobjectid"
                 alias="opp" link-type="outer">
      <attribute name="opportunityid" />
      <attribute name="customerid" />
      <link-entity name="account" from="accountid" to="customerid"
                   alias="opportunityaccount" link-type="outer" >
        <attribute name="accountid" />
        <attribute name="territoryid" />
        <filter type="and">
          <condition attribute="accountid" operator="in" value="@account" />
        </filter>
      </link-entity>
      <filter type="and">
        <condition attribute="accountid" operator="in" value="@account" />
      </filter>
    </link-entity>
    <link-entity name="contact" from="contactid" to="regardingobjectid"
                 alias="cont" link-type="outer">
      <attribute name="contactid" />
      <attribute name="parentcustomerid" />
      <link-entity name="account" from="accountid" to="parentcustomerid"
                   alias="contactaccount" link-type="outer" >
        <attribute name="accountid" />
        <attribute name="territoryid" />
        <filter type="and">
          <condition attribute="accountid" operator="in" value="@account" />
        </filter>
      </link-entity>
      <filter type="and">
        <condition attribute="accountid" operator="in" value="@account" />
      </filter>
    </link-entity>
    <link-entity name="account" from="accountid" to="regardingobjectid"
                 alias="acct" link-type="outer">
      <attribute name="accountid" />
      <attribute name="territoryid" />
      <attribute name="name" />
      <filter type="and">
        <condition attribute="accountid" operator="in" value="@account" />
      </filter>
    </link-entity>
    <link-entity name="appointment" from="activityid" to="activityid"
                 alias="appt" link-type="outer">
      <attribute name="activityid" />
      <attribute name="new_appointmenttype" />
      <attribute name="ownerid" />
      <filter type="and">
        <condition attribute="regardingobjectid" operator="not-null" />
        <filter type="and">
          <condition attribute="scheduledend" operator="on-or-after"
                     value="@EventDateFrom"/>
          <condition attribute="scheduledend" operator="on-or-before"
                     value="@EventDateTo"/>
        </filter>
      </filter>
    </link-entity>
    <link-entity name="phonecall" from="activityid" to="activityid"
                 alias="phone" link-type="outer">
      <attribute name="activityid" />
      <attribute name="new_phonetype" />
      <attribute name="ownerid" />
      <filter type="and">
        <condition attribute="regardingobjectid" operator="not-null" />
        <filter type="and">
          <condition attribute="scheduledend" operator="on-or-after"
                     value="@EventDateFrom"/>
          <condition attribute="scheduledend" operator="on-or-before"
                     value="@EventDateTo"/>
        </filter>
      </filter>
    </link-entity>
  </entity>
</fetch>
I was then able to use a table in SQL Server data tools (A.K.A. BIDS) report builder to group and format the data in the way the customer had requested.

 

 

Hope this was helpful! For additional information on FetchXML performance, specifically using the isquickfindfields function see my fellow PFE Sean McNellis’s blog post here: Take advantage of better query performance.

If you are interested, our PFE team is ready to help you with this, we can assist with query examples and various other engagements to help you improve your CRM reports and performance. In addition, we have many other services we offer such as reporting workshops, developer training, admin workshops, and code reviews.  If you would like to have another Microsoft PFE or I visit your company and assist with the ideas presented on our blog, contact your Microsoft Premier Technical Account Manager (TAM) for booking information.  For more information about becoming a Microsoft Premier Customer email PremSale@microsoft.com.

Thanks!

Sarah Champ

Microsoft Premier Field Engineer


Azure Mobile + JavaScript + WebResources = Easy Editing of OrgDBOrgSettings in Dynamics CRM 2011!

$
0
0

Project and Download URL: http://orgDbOrgSettings.codeplex.com

What are orgDbOrgSettings you ask? They work similar to registry settings but they’re stored in the CRM database instead of in a given servers registry.  OrgDbOrgSettings control behaviors and various other CRM system settings and have been added over various releases and will continue to be added as needed.  And customers may edit these when they want to optimize/tailor the experience based on specific requirements. As you may know, there is an existing command line tool referred to in the OrgDbOrgSettings KB: KB2691237, this existing command line tool can be used for all types of CRM Customers but requires extensive configuration.  If you’ve run the command line tool you’ll understand the desire for something having something with far fewer configuration requirements.  

The idea for the project came several months ago when I was prototyping various uses of CRM’s OData/REST endpoint and discovered a plethora of accessible entities that could be very useful including the “Organization” entity.  Using this prototype I added on more sample code and eventually had an HTML webresource that can be published CRM for editing OrgDbOrgSettings.  A few folks from the CRM Support team tested and gave feedback along with a few partners, after making some changes based on their feedback I now have something I consider “ready for use” and this is what it looks like:

 image_thumb4

The idea was to make it straightforward and simple given the time I had.  This project has taken place over many weeks and includes many different samples and concepts and I’ll admin the code isn’t as “neat” and clean as I would like it to be but, frankly speaking, I’m not sure if code is ever clean or neat enough to share with the “community” at large Smile.  In either case the time has come to get this out and let folks use it and give feedback.  First, I want to say that you should only really edit these settings when you have a specific reason to do so – a couple of the more advanced settings should also be tested or set with guidance of other KB articles or support engineers.  I can cover these settings and why you should be using them instead of the registry in a later blog post if there’s interest, but for now I’m sure you’re thinking: how exactly does it work?  And where can I get it?  You can download it here, and for those who are curious read on to learn more.

Technical Details: The utility is simple in concept, there’s an XML file describing all the various orgDbOrgSettings and there’s an HTML file that uses JavaScript (along with JSON & JQuery) to parse the information and display it in a table.  When you initially add any given setting to your organization, it will insert the setting with it’s default value into the “orgDBOrgSettings” attribute on the “Organization” entity using CRM’s REST endpoint.  And when you edit a setting value it will update that same value via the REST endpoint.  If you look at the HTML page source you’ll find a thousand or so lines of HTML & Javascript, the majority of which is: validation helpers, formatting helpers, custom “classes”, and prototype methods to parse and handle BuildNumbers and orgSettings as they are read from the settings XML file and from CRM.

But there’s more, if you’re accessing this page from a modern browser and computer connected to the internet, it will also call out to AzureMobile services and retrieve the latest build version number. When I publish an update you’ll get a message in the settings editor from AzureMobile telling you there’s an updated version along with a URL. It’s important to keep this updated as new settings get released in update rollups.  To update in the utility, click the link to download and save the solution, click another link to launch CRM’s import wizard, import the solution, and press F5 to refresh the solution window and you’ll have the latest update with the newest settings! For those curious about how the caching and callbacks to Azure work, the editor will only call back to Azure once every 7 days.  This timeframe is stored using HTML5 localStorage and will reset under a couple different conditions (localStorage is available in all modern browsers and IE8, more info on localStorage can be found here) .  And for those concerned about the amount of data stored there, I’m currently storing three values, all of which contain a very small amount of string data. 

I have had a lot questions recently around extending CRM interacting with other services (odata/rest) residing in different domains – these requests and communications are commonly referred to as a Cross Domain Requests or XDR’s.  Generally, the answer to any cross domain communication from the browser is to use Cross Origin Resource Sharing (CORS) along with XDR’s (XDR’s are partially supported in IE8, more standardized partial support is in IE9, and full support in IE10).  And if you’re you look for a very easy way to create a REST endpoint that supports CORS for XDR’s - AzureMobile supports the configuration right in the dashboard and thus allows JavaScript to call back into Azure using OData without having to sacrifice browser security – reducing browser security settings should not be taken lightly nor done as a ‘simple' solution or ‘workaround’.  If you’re working on a project and are finding the need to add sites to the trusted zone so you can Disable XDR checks – please stop and investigate the use of CORS, your clients and users will thank you for the reduced complexity and increased security of the solution.

I hope you find the Org Settings Utility to be useful and it should save you some time as your configuring, implementing , and deploying CRM.  And if you’re building mobile apps you should look at leverage AzureMobile.  As always I appreciate the constructive feedback of the community and look forward to hearing from you!

Sean McNellis

 

PS: For those who are interested in how AzureMobile works, setting up the service and connecting via JavaScript for this project took no more than 45 minutes and if you’re looking for easy support of CORS/XDR’s, writing a mobile app for Windows8, Windows Phone8, iOS, or Android you absolutely must look at Azure Mobile! Oh, as if this wasn’t enough – AzureMobile also natively supports logins for MicrosoftID, Facebook, Google, and more to come.  I certainly intend to write a blog post about my experience with this as well as provide some kind of blog video / podcast that will cover how I used Azure Mobile as well as show off some of the other very cool and easy to use features for mobile apps like Identity, Push Notifications, etc – I was amazed at the functionality as well as how easy it is to implement (Azure Mobile Services and the AzureMobile Preview Signup URL). Also, what I just referred to only scratches the surface of what you can do – for some interactive videos check these out: https://channel9.msdn.com/Series/Windows-Azure-Mobile-Services

Dynamics CRM 2013 – formerly codename: “Orion”

$
0
0

If you haven’t heard yet, there have been some recent disclosures in the Dynamics CRM world – you may recall the next version of Dynamics CRM was code named Orion – it now has officially been named “Dynamics CRM 2013.”  So, you want to know all the juicy details on CRM 2013?  Stay tuned, we’ll post pointers to new information as it becomes available – but for now here are some tidbits:

PR & Vision (higher level but informative – screenshots as well)

Technical information:

 

Thanks for reading!

Sean McNellis

Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 14

$
0
0

We're proud to announce that all packages for Microsoft Dynamics CRM 2011 Update Rollup 14 were released on Thursday, July 11th, 2013 to the Microsoft Download Center!  The Update Rollup 14 packages should appear on Microsoft Update on or about July 23rd, 2013.

Update Rollup 14 Build number:

5.0.9690.3557

Update Rollup 14 Microsoft Download Center page

Here's the "Master" Microsoft Dynamics Knowledge Base article for Update Rollup 14: (KB 2849744). Going forward, the plan is for the Master Knowledge Base article for CRM 2011 Update Rollups to be published a bit in advance of release to aid planning.

On Friday, July 12th, 2013 Greg Nichols and Ryan Anderson from the Microsoft Premier Field Engineering provided information about:

  • The release of Update Rollup 14 for Microsoft Dynamics CRM 2011
  • New fixes made available In Update Rollup 14
  • Collateral available about Update Rollup 14 and CRM Update Rollups in general
  • The upcoming release of Microsoft Dynamics CRM 2013, codenamed "Orion"

at 9 AM Pacific time on BlogTalkRadio during their Microsoft Dynamics CRM 2011 Update Rollup 14 Podcast.

Note regarding Podcasts: You can make our CRM Premier Field Engineering podcasts available on Zune by using the RSS feed below.  In the Zune software, go to Collection -> Podcasts and click on the Add a Podcast button on the lower left, then enter the url for the RSS feed: http://www.blogtalkradio.com/pfedynamics.rss. After that, you can adjust the series settings like any other podcast, so you can sync with your smartphone or Zune.

 

The "CRM Update Rollup Collateral Page"

For pointers to download locations, release dates, build information, and CRM Premier Field Engineering blogs and podcasts for all Microsoft Dynamics CRM Update Rollups, visit the "CRM Update Rollup Collateral Page"

Update Rollup 14 news!

Unlike some earlier Update Rollup releases like Update Rollup 6 and 12, Update Rollup 14 does not add major functionality changes. It is a collection of fixes for issues reported by customers or found by Microsoft's Engineering Team, plus changes to provide support for related technology components. No new support for the technology stack that CRM 2011 relies upon was added via Update Rollup 14, but as per the Microsoft Dynamics CRM Compatibility List Update Rollup 13 provided support for:

Note: to install Microsoft Dynamics CRM on a server running Windows Server 2012, you must install the latest SHS (Self-Healing Setup) package hosted on the Microsoft Update site when you are prompted to "update install files" during CRM setup. This SHS package is also needed for upgrading a Windows Server to Windows Server 2013 when CRM 2011 is already installed.  For more details on the last scenario, see:

How to upgrade a Microsoft Dynamics CRM Server application to Windows Server 2012

Update Rollup 12 news that you need to know because Update Rollups are cumulative, so these significant changes are also in Update Rollup 14!

  • UR12 includes the "Microsoft Dynamics CRM December 2012 Service Update"  See:
  • Additional cross-browser compatibility provided
    • The December 2012 Service Update component of Microsoft Dynamics CRM 2011 Update Rollup 12 introduces additional browser compatibility for Firefox, Chrome, and Safari
  • Indexes added to support the Update Rollup 10 Quick Find Optimizations
    • Update Rollup 12 includes new indexes for the following entities in the Quick Find Search Optimization feature. To fully reap the benefits of the platform changes included in Update Rollup 10, indexing is needed.  The indexes created are listed below:
      • Cases
      • Opportunities
      • Competitors
      • Contact (the Phone Number fields)
      • Business Unit
      • Connection
      • Connection Role
      • KB Article
      • Lead
      • Product
      • Sales Literature
    • These indexes are created during the Update Rollup 12 installation and you may notice that part of the installation will take longer to complete. The reason for this is that the indexes need to be populated and based on the size of your dataset the completion time will vary
  • Enhancements to Activity Feeds
    • The enhancements made to the activity feeds include a new feature called Like/Unlike
    • With this feature, you can express your immediate feedback about a post
    • For more information, see Like/Unlike
  • Updated User Experience for Sales and Customer Service and Product Update Functionality for Microsoft Dynamics CRM Online
    • The Microsoft Dynamics CRM December 2012 Service Update introduces a variety of new features and functionality, including an updated user experience. For Sales and Customer Service users, the updated user experience provides a new process flow visualization, which appears at the top of the forms, such as the Opportunity , Lead or Case form. The process flow guides users through the various phases of the sales and customer service processes
    • For trials and subscriptions initiated after December 2012, the updated Sales and Customer Service user experience is included by default. Existing Microsoft Dynamics CRM Online customers have an option of adding the updated user experience to the Opportunity , Lead and Case forms by installing the Product Updates. This lets Administrators install selected feature updates based upon the specific needs of their organizations. The Product Updates are installed by using the Microsoft Dynamics CRM web application; they cannot be installed programmatically
    • For more details, see What's New for Developers for Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online
  • Custom Workflow Activities for Microsoft Dynamics CRM Online
  • Developer Toolkit Support for Microsoft Visual Studio 2012
    • The Developer Toolkit for Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online now supports Microsoft Visual Studio 2012. The installer can be found in the SDK download in the sdktoolsdevelopertoolkit folder
  • Microsoft Dynamics CRM 2011 Software Development Kit (SDK) updated for Update Rollup 12 (version 5.0.13)
  • Bulk Data Load performance enhancements
    • To support bulk data load scenarios, this release introduces the ExecuteMultipleRequest message. This message supports the execution of multiple message requests using a single web method call. ExecuteMultipleRequest accepts an input collection of message requests, executes each of the message requests in the order they appear in the input collection, and optionally returns a collection of responses containing each message’s response or the error that occurred. Processing requests in bulk results in lower network traffic and higher message processing throughput
    • For more information, see Use ExecuteMultiple to Improve Performance for Bulk Data Load
  • Activity Feeds changes
    • Microsoft Dynamics CRM Activity Feeds provide real-time notifications and quick sharing of information through short updates. These updates appear on your personal wall in the What's New area of the Workplace . Activity Feeds enable you to follow and learn about important activities that take place around people, accounts, contacts, leads, and anything else that you care about
    • Updates can be posted manually by you, or automatically based on predefined system rules through a workflow. Activity Feeds can also be posted to by external applications through the Microsoft Dynamics CRM web services API. Activity Feeds expose Microsoft Lync real-time presence functionality so that you can initiate communication activities such as IM, phone calls, and emails. For more information, see Activity Feeds Entities
  • More performance and stability-related fixes, including fixes to the CRM Client for Microsoft Outlook
  • Contains all hotfixes / updates released in earlier Update Rollups
  • Quick Find performance optimizations and EnableRetrieveMultipleOptimization SQL query performance optimizations (originally released in Update Rollup 10)

For Microsoft Dynamics CRM business solutions that include an entity with a large dataset, record retrieval and grid rendering performance can be negatively impacted for users that do not have global access to all records associated with that entity. Code changes to mitigate this behavior first appeared in Microsoft Dynamics CRM 4.0, and have been fine-tuned since then.

With Microsoft Dynamics CRM 2011 Update Rollup 10 and later, big advancements have been made to optimize the performance of queries against large datasets by adjusting specific “statistical” settings to address the issue. Should this fail to achieve desired levels of performance, adjust the value associated with EnableRetrieveMultipleOptimization (ERMO) setting. You may have heard these changes described at this year's Convergence.

A first step in efforts to optimize the performance of queries against large data sets is to make adjustments to the “statistical” settings that affect the behavior of RetrieveMultiple queries. Although you can configure these settings by modifying the Windows Registry (under HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSCRM) on the each of the Web servers that is used in a deployment, we recommend that these settings be configured by using the OrgDbOrgSettings, which will ensure that the configuration applies to a specific organization. For additional information about configuring these settings by using the OrgDbOrgSettings, and to download the tool that makes the OrgDbOrgSettings changes you desire, see the Microsoft Knowledge Base article titled "OrgDBOrgSettings Tool for Microsoft Dynamics CRM 2011" (KB 2691237)

If making adjustments to these settings does not yield satisfactory levels of performance, then consider adjusting the value of the EnableRetrieveMultipleOptimization (ERMO) setting. The ERMO setting is commonly used to limit the duration of certain long running queries; specifically, to overcome issues related to local or deep business unit access within Microsoft Dynamics CRM 2011 security roles.

Many more details describing appropriate scenarios for the available settings are already available via the Microsoft Download Center in a revised version of the whitepaper "Optimizing and Maintaining the Performance of a Microsoft Dynamics CRM 2011 Server Infrastructure", in the sections “Optimizing the Performance of Queries against Large Datasets” and “Optimizing the Performance of Quick Find Queries”. The details will appear in the MSDN version of this whitepaper as quickly as possible.

 

NEW RELEASE REGARDING OrgDbOrgSettings!

You're probably familiar with the OrgDbOrgSettings command line tool (mentioned above) released by the CRM Product Group in the "Tools" package that is updated and released with each set of Update Rollup packages.  With it, you configure some .xml and call your .xml with the command line utility described in KB 2691237. However, you may be daunted by configuring this .xml, to the point that you may not use the tool, or use it minimally - not exploring the many options outlined in KB 2691237 that may be of use to you.  Well, the Microsoft Dynamics PFE team now has another option for you!  By popular demand, our esteemed CRM PFE colleague Sean McNellis has developed a tool  - a CRM 2011 managed solution - that provides you with an easy-to-use GUI with which you can configure all of the options outlined in the Knowledge Base on a per-tenant basis.  Feel free to download it, install it, and check it out... I sure use it!

This is a FREE downloadable tool - the "Dynamics CRM 2011 Organization Settings Editor".  Check it out; the download page has screenshots and information that will help you make good use of the tool.  Sean has also published a Premier Field Engineering blog: "Azure Mobile + JavaScript + WebResources = Easy Editing of OrgDBOrgSettings in Dynamics CRM 2011!" to share more details on the tool.

Thanks, Sean!

 

General Update Rollup Notes:

  • Testing Update Rollups: Best Practices
    • Premier Field Engineering recommends treating Update Rollup 12 testing like to a new, major CRM release because of the introduction of new functionality introduced with the December 2012 Service Release. Do all the standard testing like you generally do for all UR’s, but then also all the functional and performance testing that you would do with a new major release
    • The “general rule of thumb” for test plans for Update Rollup installs are:
      • Test any changes in a pre-production environment BEFORE introducing into your production environment. Manage your risk!
      • Consider using the Performance Toolkit for Microsoft Dynamics CRM 2011 to simulate your production user load in your testing environment, to shake out any performance-related issues early
      • Test using the permissions your end-user roles (most restrictive) have. Testing with CRM Administrator permissions, for example, does not give you the complete picture
      • Concentrate on your SDK customizations, JavaScript, ISV add-ons – basically anything that’s not OOB functionality or customizations done from within the UI
  • Microsoft Dynamics CRM 2011 Custom Code Validation Tool
    • Consider familiarizing yourselves with this tool… though the download page mentions Update Rollup 9, it hasn’t had much utility until now since the UR9 changes mentioned in the summary below were never released until UR12:
      • Microsoft Dynamics CRM 2011 Custom Code Validation Tool
      • Use the Microsoft Dynamics CRM 2011 Custom Code Validation Tool to identify potential issues with custom JavaScript in JavaScript libraries and HTML web resources. The Microsoft Dynamics CRM Online Q2 2012 Service Update and Microsoft Dynamics CRM 2011 Update Rollup 9 include significant changes in the web application in order to be able to support a variety of browsers such as Safari, Chrome, and Firefox. When using JavaScript code in Dynamics CRM, it is possible that some code will stop working or cause an error when you upgrade. The Microsoft Dynamics CRM 2011 Custom Code Validation Tool helps identify potential problems so that a developer can fix them
  • Update Rollup 12+ require Microsoft .NET Framework 4
  • Update Rollup 6 established a new servicing baseline. This will enable uninstalls of some future CRM 2011 Update Rollups, but this also means that Update Rollup 6 is prerequisite for installation of all future Microsoft CRM 2011 Update Rollups starting with Update Rollup 7
  • A database created with Microsoft Dynamics CRM 2011 Update Rollup 6 or a higher version cannot be imported to a deployment of Microsoft Dynamics CRM 2011 Update Rollup 5 or an earlier version. This scenario is not supported.  Best practice is to import databases or customizations between environments that are at the same Update Rollup level
  • As Update Rollup 14 is cumulative, containing all changes released in earlier Update Rollup releases, it also contains the Dynamics CRM Q4 Service Update features released via Update Rollup 6.  Some of these features include:
    • Outlook Client Updates:
      • Dialog Enhancements
      • Data Visualization Enhancements:
        • Chart Designer Enhancements
        • New Chart Types
      • Data Management En

Microsoft Dynamics CRM / Dynamics 365 Updates: Release Dates, Build Numbers, and Collateral

$
0
0

Note: The Updates documented in this blog for:

update the Dynamics CRM components described in this Microsoft Knowledge base article:

Microsoft Dynamics CRM Installations, Updates and Documentation

Notes:

New naming conventions for Microsoft Dynamics CRM updates explained HERE

Microsoft Dynamics CRM Stack Technology Compatibility: Do you want to know if certain Service Packs or versions of a Microsoft product or technology are supported with Dynamics CRM? If so, consult the Microsoft Dynamics CRM Compatibility List. For example, you can use this KB to determine the latest Microsoft SQL Server major version and Service Pack that is supported. Microsoft will list new products like Internet Explorer 11 and Windows 8.1 as "TBD" until testing is complete; generally near General Availability (GA) of that product.

Dynamics CRM Organization Settings Editor (OrgDbOrgSettings)!

You may be familiar with the OrgDbOrgSettings command line tool released by the CRM Product Group in the "Tools" package that is updated and released with each set of Update Rollup packages. With it, you configure .xml and call your .xml with the command line utility described in KB 2691237. However, you may be daunted by configuring this .xml, to the point that you may not use the tool, or use it minimally; not exploring the many options outlined in KB 2691237 that may be of use to you.

The Microsoft Dynamics PFE team has another option for you; the "Dynamics CRM Organization Settings Editor." CRM Senior PFE Sean McNellis developed this managed solution which provides an easy-to-use GUI with which you can configure all of the options outlined in the Knowledge Base on a per-tenant basis. The download page has screenshots and information that will help you make good use of the tool. Sean has also published a Premier Field Engineering blog to share more details on the tool, and he keeps the tool update as needed. Thanks, Sean!

>===============================================================

Microsoft Dynamics 365 (v9.X)

Dynamics 365 CE RTM ("Release to Manufacture") build is 9.0.2.3034

Dynamics 365 v9.X Update #

Release date and Download Center URL

Release date – Microsoft Update

Build number

Knowledge Base article

PFE Blog

PFE Podcast

0.2.3034

12/5/2018

n/a

9.0.2.3034 - Only Server package available

4344184

n/a

n/a

0.2.3034

12/5/2018

n/a

9.0.2.3034 - Supported Component Downloads:

Dynamics 365 for Outlook, version 9.0 (Outlook client)

Dynamics 365, version 9.0 Email Router

Dynamics 365, version 9.0 Report Authoring Extension (with SQL Server Data Tools support)

Dynamics 365, version 9.0 Language Packs

4344184

n/a

n/a

1.0

3/7/2019

n/a

9.1.0.1511 - Only Dynamics for Outlook package available

4491851

n/a

n/a

 

Microsoft Dynamics CRM 2016 / Microsoft Dynamics 365 (v8.X)

CRM 2016 RTM ("Release to Manufacture") build is 8.0.0.1088

CRM 2016 / Dynamics 365 Update #

Release date and Download Center URL

Release date – Microsoft Update

Build number

Knowledge Base article

PFE Blog

PFE Podcast

0.1

2/21/2016

3/14/2016

8.0.1.79

3133963

Blog

Podcast

Bing Maps AJAX Upgrade for Dynamics CRM 2016 0.1

8/21/2017

n/a

8.0.1.136 - cumulative update containing fixes between build 80 and 136. Only Server package available

4038205

n/a

Podcast

1.0

5/23/2016

6/24/2016

8.1.0.359

3154952

Blog

Podcast

1.0 Outlook Client re-release

9/21/2016

12/2/2016

8.1.0.371 packages for Outlook Client (32-and 64-bit) ONLY re-released, please discard build .359 Client packages

3154952

Blog

Podcast

Microsoft Dynamics CRM 2016 Service Pack 1.1 (on-premises)

5/17/2017

TBD

8.1.1.1005

3203310

Blog

Podcast

Bing Maps AJAX Upgrade for Dynamics CRM 2016 1.1

8/11/2017

n/a

8.1.1.1100 - cumulative update containing fixes between build 1106 and 1100. Only Server package available

4038205

n/a

Podcast

2.0 (December 2016 Update for Dynamics 365)

12/16/2016

3/28/2017

8.2.0.749

3205084

Blog

Podcast

Microsoft Dynamics 365 (on-premises) Update 2.1

4/27/2017

6/15/2017

8.2.1.176

4013759

Blog

Podcast

Bing Maps AJAX Upgrade for Dynamics 365 (Update 2.1)

8/14/2017

n/a

8.2.1.342 - cumulative update containing fixes between build 176 and 342. Only Server package available

4038205

n/a

Podcast

Microsoft Dynamics 365 (on-premises) Update 2.2

10/26/2017

TBD

8.2.2.112 - All packages available

4046795

Blog

Podcast

Microsoft Dynamics 365 (on-premises) Update 2.3

12/1/2018

TBD

8.2.3.0003 - All packages available

4467675

Blog

Podcast

Microsoft Dynamics 365 (on-premises) Update 2.4

3/18/2019

TBD

8.2.4.6 - All packages available

4490601

Blog

Podcast

 

Mainstream Support Lifecycle: Keep in mind that Mainstream Support for Microsoft Dynamics CRM 2016 ends January 12th, 2021 as per CRM 2016’s supported lifecycle.

Go to Top
===============================================================

Microsoft Dynamics CRM 2015

CRM 2015 RTM ("Release to Manufacture") build is 7.0.0.3543

CRM 2015 Update #

Release date and Download Center URL

Release date – Microsoft Update

Build number

Knowledge Base article

PFE Blog

PFE Podcast

0.1

4/14/2015

6/23/2015

7.0.1.129

3010990

Blog

Podcast

1.1

9/10/2015

10/7/2015

7.1.1.3113 (Outlook client, MUI, and Email router packages compatible with On-Premise and Online. No Server package for On-Premise)

3072333

Blog

Podcast

1.2

7/18/2016

TBD

7.1.2.1032 (Outlook client, MUI, and Email router packages compatible with On-Premise and Online. No Server package for On-Premise)

3141809

Blog

Podcast

0.2

11/3/2015

n/a

7.0.2.53 (MUI, Email router, CRM Server, SSRS, and Tools packages compatible with On-Premise. No Outlook Client packages shipped with 0.2)

3075889

Blog

Podcast

0.3

8/14/2017

n/a

7.0.3.109

4018584

Blog

Podcast

Bing Maps AJAX Upgrade

8/11/2017

n/a

7.0.3.110 (Server package only available)

4038205

n/a

Podcast

3.2

3/8/2019

n/a

7.0.3.144 (Server package only available)

4490493

n/a

Podcast

 

Mainstream Support Lifecycle: Keep in mind that Mainstream Support for Microsoft Dynamics CRM 2015 ends January 14th, 2020 as per CRM 2015’s supported lifecycle.

Go to Top
===============================================================

Microsoft Dynamics CRM 2013

CRM 2013 pre-release builds

Build number

Knowledge Base article

Beta

6.0.00215

n/a

RC

6.0.0.514

n/a

RTM

6.0.0.809

n/a

CRM 2013 Update Rollup #

Release date and Download Center URL

Release date – Microsoft Update

Build number

Knowledge Base article

PFE Blog

PFE Podcast

1

12/16/2013

1/2014

6.0.1.61

2891271

Blog

Podcast

2

3/22/2014

4/8/2014

6.0.2.46, 6.0.2.51 (Server-only re-release)

2919956

Blog

Podcast

3

7/15/2014

7/21/2014

6.0.3.106

2930480

Blog

Podcast

CRM 2013 Service Pack

Release date and Download Center URL

Release date – Microsoft Update

Build number

Knowledge Base article

PFE Blog

PFE Podcast

1

5/27/2014

7/21/2014

6.1.0.581

2941390

Blog

Podcast

CRM 2013 Service Pack 1 Update Rollup #

Release date and Download Center URL

Release date – Microsoft Update

Build number

Knowledge Base article

PFE Blog

PFE Podcast

1

9/23/2014

10/14/2014

6.1.1.132

2953252

Blog

Podcast

2

2/6/2015

2/19/2015

6.1.2.112

2963850

Blog

Podcast

3

4/16/2015

5/12/2015

6.1.3.119

3016464

Blog

Podcast

4

2/22/2016

5/23/2016

6.1.4.145

3122951

Blog

Podcast

Bing Maps AJAX Upgrade for CRM 2013 SP1 UR4

8/11/2017

n/a

6.1.4.244 - cumulative update containing fixes between build 146 and 244. Only Server package available

4038205

n/a

Podcast

5

10/11/2017

tbd

6.1.5.111

4018582

tbd

Podcast

 

Mainstream Support Lifecycle: Keep in mind that Mainstream Support for Microsoft Dynamics CRM 2013 ends January 8th, 2019 as per CRM 2013’s supported lifecycle.

Go to Top

===============================================================

Microsoft Dynamics CRM 2011

CRM 2011 pre-release builds

Build number

Knowledge Base article

Beta

5.0.9585.101

n/a

RC

5.0.9688.53

n/a

RTM

5.0.9688.583

2461082

CRM 2011 UR #

Release date and Download Center URL

Release date – Microsoft Update

Build number

Knowledge Base article

PFE Blog

PFE Podcast

1

4/4/2011

4/26/2011

5.0.9688.1045

2466084

Blog

Podcast

2

6/6/2011

6/28/2011

5.0.9688.1155, 5.0.9688.1157 (server)

2466086

Blog

Podcast

3

7/26/2011

8/23/2011

5.0.9688.1244

2547347

Blog

Podcast

4

9/22/2011

Was not released to Microsoft Update

5.0.9688.1450

2556167

Blog

Podcast

5

10/25/2011

11/8/2011

5.0.9688.1533

2567454

Blog

Podcast

6

1/12/2012

1/24/2012

5.0.9690.1992 (contains the Q4 2011 Service Release and provides limited SQL 2012 support)

2600640

Blog

Podcast

7

3/22/2012

3/27/2012

5.0.9690.2165

2600643

Blog

Podcast

8

5/3/2012

5/22/2012

5.0.9690.2243

2600644

Blog

Podcast

9

Not released publically

n/a

n/a

n/a

n/a

n/a

10

8/16/2012

n/a

5.0.9690.2720

2710577

Blog

Podcast

10 re-release

10/4/2012

n/a

5.0.9690.2740

2710577

Blog

Podcast

11

10/11/2012

n/a

5.0.9690.2835

2739504

Blog

Podcast

11 re-release

10/15/2012 (client), 10/22/2012 (server)

10/23/2012

5.0.9690.2838 (Client), 5.0.9690.2839 (Server)

2739504

n/a

n/a

11 Critical Update

7/26/2013

8/13/2013

5.0.9690.2903 (Client, Server, MUI),

2855319

Blog

n/a

12

1/29/2013

1/6/2013 (except for Server)

5.0.9690.3233 (Client), 5.0.9690.3236 (Server)

2795627

Blog

Podcast

13

3/27/2013

4/8/2013

5.0.9690.3448

2791312

Blog

Podcast

14

7/11/2013

7/23/2013

5.0.9690.3557

2849744

Blog

Podcast

15

10/7/2013

10/2013

5.0.9690.3731, 5.0.9690.3739 (V2 - Outlook Client only re-release)

2843571

Blog

Podcast

16

1/22/2014

2/2014

5.0.9690.3911

2872369

Blog

Podcast

17

5/8/2014

5/23/2014

5.0.9690.4150

2915687

Blog

Podcast

18

9/24/2014

10/14/2014

5.0.9690.4376

2958724

Blog

Podcast

18.1

10/19/2016

See note directly below

n/a

5.0.9690.4439

3179593

N/A

N/A

CRM 2011 UR #

Release date and Download Center URL

Release date – Microsoft Update

Build number

Knowledge Base article

PFE Blog

PFE Podcast

 

Mainstream Support for Microsoft Dynamics CRM 2011 ended July 12th, 2016 as per CRM 2011’s supported lifecycle.

CRM 2011 Update Rollup 18.1 (Update for Microsoft Dynamics CRM 2011) will be the final Update for Microsoft Dynamics CRM 2011. There are no plans to release an Update Rollup 19 for CRM 2011.
Support for .NET 4.6 or SQL Server 2014, will not be included for CRM 2011. The Supportability Knowledge Base article has been updated accordingly (https://support.microsoft.com/en-us/kb/3005163)
Per the support lifecycle policy mentioned above, when extended support starts, the only fixes delivered will be security fixes.

Notes:

Mismatched Update Rollup versions within a Microsoft Dynamics CRM 2011 or 2013 deployment: In a scenario where you may be running many client workstations with Microsoft Dynamics CRM 2011 or 2013 for Microsoft Office Outlook, a common question is whether it is supported to run mismatched versions. For example, where Update Rollup 5 has been installed on the CRM 2011 Server but the Outlook clients are still on Update Rollup 1, or where Update Rollup 1 is on the CRM 2011 server but due to updates available to the Outlook client you have decided to install Update Rollup 6 on the clients without installing Update Rollup 4 on the server.

The general rule of thumb is to try to keep the versions in sync as much as possible. However, it is permissible (though not recommended as a long-term solution) to run mismatched Update Rollup versions on Outlook client and server, as Microsoft does do some testing of such combinations.

However, regarding the other Update Rollups (for example Rollups for the Microsoft Dynamics CRM 2011 or 2013 Email Router or Microsoft Dynamics CRM 2011 2013 Reporting Extensions), it is not supported nor recommended to run mismatched versions. A best practice is to update these components at the same time you update your CRM Server. Do the best you can to keep these Update Rollup versions in sync.

See: Mismatched Update Rollup versions within a Microsoft Dynamics CRM 2011 deployment and "User experience while accessing CRM 2011 application servers while Update Rollups are being applied"

Silent Update Rollup installs: Please review Jon Strand's blog posting "CRM 2011: Silently Installing Update Rollups" which provides details on installing CRM Outlook client update rollups "silently" in order to limit end-user interruption

See also: Customers' choices... The most popular "Dynamics CRM in the Field" technical blog posts from Premier Field Engineering!

Ryan Anderson, Greg Nichols (retired), Walter Carlin
Senior Premier Field Engineer
Microsoft Corporation

CRMInTheField articles now available in Japanese!

$
0
0

Looking for CRMInTheField articles in Japanese?  If so, I have great news for you!  A friend and colleague, Kenichiro Nakamura, has been translating many of our CRMInTheField articles in Japanese.  Ken has been supporting CRM at Microsoft for quite a while now and is an Escalation Engineer on the Asia Pacific CRM Support Team .  If you read Japanese or know any CRM admin’s that do send them Ken’s way: http://blogs.msdn.com/crmjapan

image

Thanks Ken!

Sean

Defer Database Updates Installing CRM 2011 Update Rollups

$
0
0

Calling all CRM admins – here’s a tip you’ll want to bookmark for your next round of update rollups.  Dynamics CRM 2011 Update Rollup executable packages automatically process and update the organization database updates during the installation.  If your deployment has several large tenants or just one very large tenant you may prefer to first install the “binary” updates and worry about applying the database updates after the binary installation of the rollup (on an organization by organization basis). This would put the control and timing of when to update organizations from a SQL perspective in the hands of the administrator.  Additionally, if your environment is highly operationalized, this feature allows you to separate the installation of the binary updates (DLL’s, executables, etc) from the installation of the database components (updated stored proc’s, udf’s, schema updates, out of box index changes, etc). Both updates still need to be completed as part of the update but you can now separately manage and execute those operations (likewise this allows you to retry database updates if they timeout or do not complete without jeopardizing the installation binary updates).

To accommodate this a new deployment property was added in Dynamics CRM 2011, I’ve been unable to narrow down the exact build in which this feature was applied but I’ve successfully tested it back to Update Rollup 6 (which should cover most).  Below you’ll find the instructions for how to enable this helpful feature. 

Values for the AutomaticallyInstallDatabaseUpdates Deployment setting:
True (default): during the update rollup execution the files will be upgraded on the server and additionally each DB will be updated  The update rollup will upgrade the CRM files, the DB updates are staged, then each org DB is updated to the update rollup version you’re installing, once completed you will see a success / finish screen as part of the installation. 

False: during the update rollup execution the CRM files are upgraded, the DB updates are staged, once completed you will see a success / finish screen as part of the installation.  The DB updates now must be manually applied to each organization, which is done by opening deployment manager, finding the organization you wish to update, right-clicking the organization, then selecting “update”. When you select update all the db updates that would normally be executed in the update rollup are now applied – this could include updates of UDF’s, Stored Procs, underlying schema changes, index updates, etc.  This event of applying updates should be considered maintenance as the organization may behave as if it’s “offline” and users updating data could potentially block the update installation.

So, now that we have that out of the way here’s all you need to know on how to check this value and how to update it, if you wish to change it. 

PowerShell Script to get the current value (default is true):

Add-PSSnapin Microsoft.Crm.PowerShell 
(get-CrmAdvancedSetting -ConfigurationEntityName "Deployment" -Setting "AutomaticallyInstallDatabaseUpdates").Attributes

PowerShell Script to postpone DB updates on installation*

Add-PSSnapin Microsoft.Crm.PowerShell
$setting= New-Object "Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity"
$setting.LogicalName = "Deployment"
$setting.Attributes = New-Object "Microsoft.Xrm.Sdk.Deployment.AttributeCollection"
$keypair = New-Object "System.Collections.Generic.KeyValuePair[String, Object]" ("AutomaticallyInstallDatabaseUpdates", $false)
$setting.Attributes.Add($keypair)
Set-CrmAdvancedSetting -Entity $setting

*NOTE: When you defer updates you will have to update the organizations using Deployment Manager.

I hope you find this simple setting change as helpful as our team does, again while it doesn’t change the fact certain updates must be applied as part of update rollups this allows for the separation of the app and the DB updates which can also help make troubleshooting easier.  In the worse case scenarios org DB’s could be left at a lower patch level for short periods of time if you need to wait for another maintenance window or stage org DB updates over a succession of nights in the case where you have numerous CRM organizations. 

Feel free to reach out with questions, if you would like someone from our team to host a deep dive on this, facilitate a chalk talk about updates in general, or come onsite and work side-by-side with you on this or other topics please reach out to your TAM and ask them to put in a request – we’d be happy to help!

Sean McNellis

Premier Field Engineer

CRM Sandbox Plugin Issues fixed in .NET 4.0 KB 2872041

$
0
0

NOTE: This blog was updated on 7/25/2012: As some of you commented the binaries were missing from the KB article posted, the patches are now available for download within the KB apologies for any confusion around this. Adds/changes are highlighted below. 


On July 9th, 2013 the .NET team released a Critical Security Patch (KB 2840628) that was release to mitigate identified security risks in .NET Framework Version 4.0.  After applying this critical update customers using partial trust experienced issues including Dynamics CRM customers running sandbox plug-ins.  The issue was limited to the use of specific methods within the System.Diagnostics namespace, which are also commonly used in Dynamics CRM sandbox plugins.  The .NET team working with the CRM Support team has identified the source of the problem and is working on a long term solution to address this specific problem with Partial Trust Code, which includes Dynamics CRM Customers using sandbox plugins.  The following article documents the known workarounds and also provides patches to fix these documented symptoms: http://support.microsoft.com/kb/2872041

If you are using CRM plug-ins registered in sandbox mode (or running other custom partial trust code) you may be experiencing the exception below. If you are seeing the below error message, please use the workaround or install the patches listed in KB 2872041 to temporarily resolve the issue and stay posted for a longer term fix.

System.MethodAccessException: Attempt by method ‘System.Configuration.TypeUtil.CreateInstanceRestricted(System.Type, System.Type)’ to access method ‘System.Diagnostics.AssertSection..ctor()’ failed.

NOTE: This only applies to .NET Framework 4.0, there has been no reported issues with .NET Framework 4.5.

If you are still encountering this message after installing the patches please open a support case so the support team can help you troubleshoot further.

Thanks!

Sean McNellis
Premier Field Engineer

This is also documented on the Dynamics CRM Support Team blog:  https://community.dynamics.com/crm/b/dynamicscrmsupportblog/archive/2013/07/22/release-of-critical-update-for-net-4-0-framework.aspx


Dynamics CRM 2011 UR11 Critical Update: What you need to know

$
0
0

On July 27th, 2013 the Dynamics CRM team released a critical update for CRM 2011 targeted on the Update Rollup 11 codebase. The critical update can be downloaded here: http://www.microsoft.com/en-us/download/details.aspx?id=39691 and the KB article for it is found here: http://support.microsoft.com/kb/2855319NOTE: Below the “KB2855319 Critical Update” will be referred to as “CU” and “Dynamics CRM 2011 Outlook Client Add-In” will be referred to as “Outlook Client” for consistency and readability.  Please also note, this article discusses both the Server and Outlook Client CU patch files, there are valid scenarios where your client and server versions do not match. As a general rule of thumb the following best practices apply:

  • If you are unable to patch your server to UR12 or higher due to compatibility concerns it is recommended to patch to at least UR11, I would strongly encourage you to consider installing this CU instead of UR11 (the CU is essentially UR11 with several updates highlighted at the bottom of the article).  Ultimately, you should have a plan to update your server to the newer update rollups and eventually to UR15 or higher.
  • If your server is on UR12, 13, or 14 – it’s encouraged to stay on your current rollup and plan to patch to UR15 when it releases.

Notable points regarding this CU:

  • The Server CU can be installed by customers who wish to have the latest server updates without going to UR12 or higher. If your server version is less than UR11 you must first update to UR11 then apply this CU on top of UR11. If your server version is less than UR11 and you apply this CU, it will bring your server build up to the equivalent of UR11 and will include the fixes in this CU.
  • The Outlook Client CU can be installed by any customers who wish to have improved stability and performance in the Outlook Client today – these enhancements and others will be included in UR15 for the Outlook Client and this CU offers a stop gap if you’re experiencing problems today.
  • The Outlook Client & Server CU cannot be applied on top of Update Rollup 12, 13, or 14, if you attempt to do so a message is displayed that states that this update rollup is not compatible with your installation.
  • The Outlook Client & Server CU version number is: 05.00.9690.2903
  • If you apply the Outlook Client CU, wait to apply any further update rollups until Update Rollup 15 has been released. This will preserve the existing stability and performance enhancements – from an Outlook Client standpoint you can deploy UR15 on top of this UR11 CU without compatibility concerns.
  • If you wish to have your Outlook Clients use this CU, the CRM server may be at UR level: 11*, 12, 13, 14, or CRM Online
    • *If your server is currently patched to Update Rollup 11 – it is highly recommended you install the latest CRM Server update as part of this CU (file name: CRM2011-Server-KB2855319-ENU-amd64.exe)

CU installation considerations and notable post-installation changes:

  • The CU patches are based on the Update Rollup 11 codebase, thus when you install the CRM Outlook Client CU your client version *must* be update rollup 11 or less.
  • If your outlook client is already past update rollup 11, (greater than or equal to build number 5.0.9690.3233) – you have two options three options:
    1. Uninstall the Outlook Client entirely and re-install with the base UR6 installation (here), once installed you can then apply the CU.
    2. Choose to remain at your current update rollup level and patch your Dynamics CRM 2011 Client with Update Rollup 15 when it releases.
    3. This option is no longer recommended due to issues encountered, please use one of the above two options. Downgrade the Outlook Client by uninstalling any rollups greater than UR11 on the client until it is at UR11 or below, then apply the new CU.
  • Once you apply the CU on your Outlook Client, the next patch you should plan to install is Update Rollup 15 – do not apply any rollups prior to the release of UR15 to preserve the improvements and settings.
  • *UPDATE* 8/14/2013: As of today UR12, UR13, and UR14 have been removed from being listed as an Automatic Update on Windows Update.  This will prevent your users Outlook clients from inadvertently receiving automatic updates which would supersede the CU.  UR 15 will be live on the Windows Update site a short time after it is made available to the public.
  • The SQL Server CE Outlook Client component is automatically upgraded to SQL CE 4.0 as part of the CU installation.  This is pre-packaged and contained within the update.
  • Two recommended registry entries are now automatically added/updated as part of the Outlook Client CU: “AddressBookMaterializedViewsEnabled” and “DisableMapiCaching” both are set to a value of 1.
  • As part of the Outlook Client CU two recommended registry entries have been removed from the registry and are now automatically defaulted as follows: “AddressBookMaterializedViewsEnabled” set to true and “DisableMapiCaching” set to true (when DisableMapiChaching is set to true pinned views in the Outlook Client will be paged instead of an infinite list after this change).
    • NOTE: If you’ve also installed the Server CU these values can now be overridden using the OrgDBSettings Editor (I will be releasing an update to allow UR11 CU customers to edit the settings in their organization).  Any Outlook Clients with the Client CU installed will then use the OrgDbOrgSettings value instead of the default value. 
  • The Outlook Client CU now has process isolation for hosting CRM forms, and the offline Sync process. The processes used for isolation are titled: “Microsoft.Crm.Application.Hoster.exe”, “Microsoft.Crm.Application.Outlook.WebFormsHost.exe”, and “OfflineSyncAgent.exe” and are all launched as child processes of Outlook. If you’re curious what this looks like, here’s a process explorer view of the Outlook.exe process after the CU has been installed and Outlook Client has been configured:
    • image

If you’re a premier customer feel free to talk to your TAM about working with a Dynamics CRM PFE (remote or onsite), and if you already have a Dedicated Dynamics PFE make sure to reach out and we can work together to have a plan to get your customizations and system updated.  If you don’t have Premier and are interested in working with us – please reach out and we can set you up to talk with someone about Premier.

Thanks for reading! 
Sean McNellis
Premier Field Engineer

Script errors when adding documents via the SharePoint integration CRM UR12+

$
0
0

As you may know, Dynamics CRM 2011 has the ability to embed a SharePoint document library within certain record types.  After applying update rollup 12 most of us will likely want to take advantage of the ability to turn off HTC’s and tell Internet Explorer to use a standards based browser mode (look for an article coming soon on turning off HTC’s and IE’s compatibility mode).  However, once you do this you may notice JavaScript errors when interacting with the SharePoint document library integration.  The error I’ve seen so far is: ‘action’ is undefined and will have a URL of: http://servername/org/crmgrid/crmgridpage.aspx

If you’re going to update or already have updated to UR12 or higher, don’t forget to update your SharePoint list components to avoid this issue – for reference here’s how to install this update:

Important note before starting:

  • You must be a SharePoint site collection administrator to be able to install the Microsoft Dynamics CRM List component on Microsoft SharePoint Server.
  • If you’re installing to SharePoint 2013 or SharePoint Online make sure you’re on the latest SharePoint update before adding the new list components.
  • (For SharePoint On-Premises only) The Microsoft Dynamics CRM List component is a site collection-level solution. If you want to enable the Microsoft Dynamics CRM List component at the farm level, you must write a script that does the following:
    • Retrieves all SharePoint site collections from SharePoint server.
    • Installs and activates the List component on each of these site collections.

To install the Microsoft Dynamics CRM List component:

  1. Download the latest SharePoint list component update from the download center: http://www.microsoft.com/en-us/download/details.aspx?id=5283 or search for it here
  2. Navigate to the folder where you downloaded CRM2011-SharePointList-ENU-amd64.exe or CRM2011-SharePointList2013-ENU-amd64.exe, and double-click it.
  3. In the Open File - Security Warning dialog box, click Run.
  4. To accept the license agreement, click Yes.
  5. Select a folder to store the extracted files, and click OK.
    • If you downloaded CRM2011-SharePointList-ENU-amd64.exe, the following files are extracted:
      • AllowHtcExtn.ps1
      • crmlistcomponent.wsp
    • If you downloaded CRM2011-SharePointList2013-ENU-amd64.exe, the following files are exstracted:
      • crmlistcomponent.wsp
  6. Open your web browser
  7. In the address bar, type the URL of the site collection on which you want to install the Microsoft Dynamics CRM List component, and press Enter
  8. Navigate to SharePoint’s Solutions Gallery
    • If you are using SharePoint 2010: click Site Actions, and then click Site Settings, under Galleries, click Solutions
    • If you are using SharePoint 2013:  click the Settings icon in the top-right corner, then click Site Settings, under Web Designer Galleries, click Solutions
  9. On the Solutions tab, in the New group, click Upload Solution.
  10. Click Browse, locate the crmlistcomponent.wsp file, and then click OK.
  11. On the Solutions tab, in the Commands group, click Activate.

Special thanks to Chris Donlan, another Dynamics CRM/SharePoint PFE, who helped document this when customers started to update and find this issue. Feel free to ping us via the “Email Blog Author” link to the right or comment and we’ll get back to you as soon as we can.  If you’re a Premier customer talk to your TAM about working with a Dynamics CRM PFE (remote or onsite), and if you already have a Dedicated Dynamics PFE make sure to reach out.  If you don’t have Premier and are interested in working with us – please reach out and let us know.  Thanks for reading!

Sean McNellis
Premier Field Engineer

Use PowerShell: build a redist folder to install Dynamics CRM 2011 without an internet connection

$
0
0

Most likely you’ve read Shawn Dieken’s wildly popular article on how to create a redist folder when installing CRM without an internet connection.  Today I was presented with a customer scenario where a server that should have had internet access did not and thus, we had to install without internet access.  No big deal, however after walking through the article I quickly realized this task, while effective, was pretty monotonous and not a lot of fun.  I caught myself thinking “there must be a better way” – and turns out there was and all we needed to do was bring PowerShell into the mix!

With a few lines of code and a little testing, I had a script to paste in to PowerShell and create my very own CRM 2011 Redist folder with all the pre-requisite files.

Usually you find PowerShell scripts downloadable as PS1 files, but sometimes in scenarios like this I find myself just wanting to, copy my script, open PowerShell, Paste, and Go.  With that in mind, this script can be simply copied and pasted into PowerShell so you can quickly build your redist folder.

Instructions for use:

  1. Open PowerShell on the computer you have internet access on
  2. Copy the script below top to bottom (from the “#begin script” to the “#end script”)
  3. Paste it right into PowerShell – if it doesn’t execute hit enter to run the “Create-CRM2011Redist” function
  4. This will pop up a folder picker, pick a folder and press OK
  5. After you press Ok, the script will create a new Redist folder in the destination you’ve selected it will then proceed to create the directory structure (11 Folders), then download 24 files, this should total about 216MB of disk space when it’s all done.
  6. Finally, once it has completed, copy the redist folder to the install folder containing: Server, Client, EmailRouter, and BIDSExtensions folders
  7. When you’re done copying your install folder should look like the graphic below:

Download the PowerShell Script as a .txt file.

#begin Script 
#Function to Show an Open Folder Dialog and return the directory selected by the user.
function Read-FolderBrowserDialog([string]$Message, [string]$InitialDirectory)
{
$app = New-Object -ComObject Shell.Application
$folder = $app.BrowseForFolder(0, $Message, 0, $InitialDirectory)
if ($folder) { return $folder.Self.Path } else { return '' }
}
#download pre-req function, also creates the folders
function dlPreReq($root, $folderName, $fileName, $url)
{
$fldr = Join-Path -Path $root -Child $folderName
$dest = Join-Path -Path $fldr -Child $fileName

#create folder if it doesnt exist
if((Test-Path -Path $fldr) -ne $True)
{
New-Item -Path $fldr -ItemType directory | out-null
}
Write-Host ("Downloading {0} to path: {1} " -f $fileName, $fldr)
$wc = New-Object system.net.webclient
$wc.downloadFile($url,$dest)
}
#download each pre-req
function Create-CRM2011Redist()
{
$folderRoot = (Read-FolderBrowserDialog "Pick the location to create the Dynamics CRM 2011 redist folder")
if(($folderRoot.length) -gt 0)
{
$folderRoot = Join-Path -Path $folderRoot -Child "Redist"
dlPreReq $folderRoot dotNETFX "dotNetFx40_Full_x86_x64.exe" "http://go.microsoft.com/fwlink/?LinkId=182091&clcid=0x409"
dlPreReq $folderRoot DotNetServicesSDK WindowsAzureAppFabricSDK-x64.msi "http://go.microsoft.com/fwlink/?LinkId=178254&clcid=0x409"
dlPreReq $folderRoot IDCRL wllogin_32.msi "http://go.microsoft.com/fwlink/?LinkId=194721&clcid=0x409"
dlPreReq $folderRoot IDCRL wllogin_64.msi "http://go.microsoft.com/fwlink/?LinkId=194722&clcid=0x409"
dlPreReq $folderRoot MSI45 WindowsServer2003-KB942288-v4-x86.exe "http://go.microsoft.com/fwlink/?LinkID=139114&clcid=0x409"
dlPreReq $folderRoot MSI45 WindowsServer2003-KB942288-v4-x64.exe "http://go.microsoft.com/fwlink/?LinkID=139115&clcid=0x409"
dlPreReq $folderRoot MSI45 Windows6.0-KB942288-v2-x86.msu "http://go.microsoft.com/fwlink/?LinkID=139108&clcid=0x409"
dlPreReq $folderRoot MSI45 Windows6.0-KB942288-v2-x64.msu "http://go.microsoft.com/fwlink/?LinkID=139110&clcid=0x409"
dlPreReq $folderRoot MSI45 WindowsXP-KB942288-v3-x86.exe "http://go.microsoft.com/fwlink/?LinkID=139113&clcid=0x409"
dlPreReq $folderRoot MsoIdCrl msoidcli_32.msi "http://go.microsoft.com/fwlink/?LinkId=221498&clcid=0x409"
dlPreReq $folderRoot MsoIdCrl msoidcli_64.msi "http://go.microsoft.com/fwlink/?LinkId=221500&clcid=0x409"
dlPreReq $folderRoot ReportViewer ReportViewer.exe "http://go.microsoft.com/fwlink/?LinkId=193386&clcid=0x409"
dlPreReq $folderRoot SQLCE SSCERuntime-ENU-x86.msi "http://go.microsoft.com/fwlink/?LinkId=147327&clcid=0x409"
dlPreReq $folderRoot SQLCE SSCERuntime-ENU-x64.msi "http://go.microsoft.com/fwlink/?LinkId=147326&clcid=0x409"
dlPreReq $folderRoot SQLExpr SQLEXPR_x86_ENU.exe "http://go.microsoft.com/fwlink/?LinkId=179623&clcid=0x409"
dlPreReq $folderRoot SQLNativeClient sqlncli_x64.msi "http://go.microsoft.com/fwlink/?LinkId=178252&clcid=0x409"
dlPreReq $folderRoot VCRedist vcredist_x86.exe "http://go.microsoft.com/fwlink/?LinkId=195255&clcid=0x409"
dlPreReq $folderRoot VCRedist vcredist_x64.exe "http://go.microsoft.com/fwlink/?LinkId=195257&clcid=0x409"
dlPreReq $folderRoot WindowsIdentityFoundation Windows5.2-KB974405-x86.exe "http://go.microsoft.com/fwlink/?LinkId=200432&clcid=0x409"
dlPreReq $folderRoot WindowsIdentityFoundation Windows5.2-KB974405-x64.exe "http://go.microsoft.com/fwlink/?LinkId=200430&clcid=0x409"
dlPreReq $folderRoot WindowsIdentityFoundation Windows6.0-KB974405-x86.msu "http://go.microsoft.com/fwlink/?LinkId=190775&clcid=0x409"
dlPreReq $folderRoot WindowsIdentityFoundation Windows6.0-KB974405-x64.msu "http://go.microsoft.com/fwlink/?LinkId=190771&clcid=0x409"
dlPreReq $folderRoot WindowsIdentityFoundation Windows6.1-KB974405-x86.msu "http://go.microsoft.com/fwlink/?LinkId=190781&clcid=0x409"
dlPreReq $folderRoot WindowsIdentityFoundation Windows6.1-KB974405-x64.msu "http://go.microsoft.com/fwlink/?LinkId=190780&clcid=0x409"
}
else
{
write-host "No folder selected, operation was aborted. Run Create-CRM2011Redist to retry."
}
}

#kick off the script
Create-CRM2011Redist

#end script

Performance: Turn off HTC’s and IE Compat Mode mode with Dynamics CRM 2011

$
0
0

After applying update rollup 12 most of us will likely want to take advantage of a setting which disables HTC’s and allows CRM to take advantage of Internet Explorers latest standards based browser mode. 

NOTE: This reference of HTC is not the mobile phone maker but instead DHTML behavior definitions used in IE5 and greater.

Why disable HTC’s?  There are a couple of reasons, the first of which is a general performance boost, anecdotally I’ve noticed that by disabling the HTC’s the perception of responsiveness in CRM seems to improve.  Second, by dropping the HTC’s (used for CRM 4.0 JavaScript API compatibility) you are removing a bunch of extra components from CRM including the forms – again these components specifically support CRM 4.0 javascript API’s.  By removing these behaviors you’re naturally streamlining the app. 

What are the settings and what do they do?

OrgDBOrgSetting UI Setting Label Setting Description
DisableIECompatMode Load pages in the most recent version of Internet Explorer True will attempt to turn off IE’s compatibility mode and allow for the use of HTML5, CRM accomplishes this by sending the X-UA-Compatible Response Header.  As of UR14 the header value (if this is set to true or checked) is “IE=7;IE=8;IE=9;IE=10”.  If False, the header is not set and the compatibility mode is left entirely up to the browser to determine.  Documentation
IncludeHTC Include HTC support in Microsoft Dynamics CRM forms If True (default) the HTC behavior files will be included in the Dynamics CRM UI to support the use of the CRM 4.0 JavaScript API’s – this is strictly in place for JavaScript backwards compatibility. If False will remove the HTC behaviors in CRM 2011. If you have updated your JavaScript to support CRM 2011 API’s this setting can be disabled. Documentation

How do I edit these settings?
You have two different ways to change the settings – both will change the same underlying setting but the second option has you to use an editor which allows for the altering of many other Dynamics CRM 2011 settings.

  1. To toggle the two specific settings listed above, open Dynamics CRM 2011 in the web browser and click Settings, then navigate toAdministration” in the left hand navigation.  Within the Administration navigation page, click “System Settings”.  Once in the System Settings modal dialog click the Customization Tab, you’ll find the two settings displayed as checkboxes under “HTML component support” a screenshot of this dialog can be found here
  2. To access all orgDbOrgSettings (Organization Settings) including the two above: download the Organization Settings Editor (see project page and blog article for more info).  This is a managed solution you import into CRM, then you open the solution in CRM, using the configuration page of the solution you are able to edit the above settings as well as dozens of others used to configure CRM (OnPrem or Online).  First, import the managed solution here.  Once you’ve imported the managed solution: open Dynamics CRM 2011 in the web browser, and click Settings, find and click Solutions in the left hand navigation, in the main solutions grid double click the “OrganizationSettingsEditor” managed solution to launch the configuration and editor page (you’ll want to maximize the editor page so you can see all the settings).  The above two settings, along with many others will be listed and can be edited within this editor page.

What setting values provide the most optimal experience and what are the defaults? To provide a standards based experience in IE and to allow for the user of cross browser mode you’ll should try to have the following settings:

Setting Suggested Value* Default Value
DisableIECompatMode Checked or True Unchecked or False (X-UA-Compatible header is not set)
IncludeHTC** Unchecked or False Checked or True (HTC’s are included)

*The values are suggested for the most optimal experience for users in IE – there are many cases where these settings may not be possible until customizations are updated to use CRM 2011 API’s. 
**If you wish to have cross browser support IncludeHTC must be set to False. However, this should not be used this as a way to restrict usage – if you wish to restrict usage of certain browsers read below.

The benefits: If you test and confirm customizations with these settings you can take advantage of the most recent IE versions and avoid having to be reliant on compatibility mode.  Additionally, Dynamics CRM 2011 can operate in cross browser mode and your customizations will meet standards making the use of your custom components in other browsers much easier to achieve. 

Can I control which browsers CRM allows? You can use the Browser Control solution documented on MSDN: here.  However, you’ll also want to work with your configuration management team – if using another browser isn’t supported in your business you want to make sure you inventory that and manage your software configuration appropriately.  Products like System Center Configuration Manager (SCCM) or for a cloud based approach appropriate for 1 user or thousands of users you can use Windows Intune.

More documentation: I want to call attention to the “Use JavaScript with Microsoft Dynamics CRM” MSDN article, this article does a great job of calling out many of the best practices when coding for Dynamics CRM.  It’s a great reference article and is a good reminder of the JavaScript best practices. The main issue we’ve observed with these settings is non-compliant or CRM 4.0 specific JavaScript.  The second largest issue I’ve observed is with custom pages in iFrames or embedded as WebResources – these pages should be tested to make sure they will render properly in a standards based browser mode and without HTC support. And a friendly reminder, please do not modify the DOM directly this has potential supportability consequences but this also can cause many unintended memory leaks if there are circular references caused by modifying the DOM.

More questions? Please leave a comment and we’ll try to respond as we have time.  If you’re a premier customer talk to your TAM about dispatching a Dynamics CRM PFE (remote or onsite), and if you already have a Dedicated Dynamics PFE make sure to reach out and we can work with you to put together a plan to get your customizations updated allowing you to take advantage of the most optimal settings.  If you don’t have Premier and are interested in working with us – please reach out and we can set you up to talk with someone about Premier.

By testing, preparing, and moving forward you will put yourself in a good position for future updates and upgrades to the CRM platform. Thanks for reading! 

Sean McNellis
Premier Field Engineer

Microsoft Dynamics CRM 2013 – Release Preview Guide is now available!

$
0
0

Bob Stutz posted a blog today highlighting the release of the Microsoft Dynamics CRM 2013 Release Preview Guide!  I recommend that you check out his blog post here and then download the Release Preview Guide for complete details!

We are planning to continuously update this Get ready for the next release site with all the latest information and links to white papers to prepare for CRM 2013.  The white papers to prepare for the CRM Online update and CRM Onpremise upgrade were just posted, so be sure to check them out.

Onpremise: How to Prepare for the Upgrade to Microsoft Dynamics CRM 2013

Online: How to Prepare for the Microsoft Dynamics CRM Online Fall '13 Service Update

The Dynamics CRM Premier Field Engineering team is very excited for CRM 2013 and all the new features and functionality discussed in the CRM 2013 Release Preview Guide. 

We are busy building out new CRM 2013 packaged services and deliveries, so let us know if you are interested in any Workshops, Webcasts, or any other related services.

If you would like to have another Microsoft PFE or I visit your company and assist with the ideas presented on our blog, contact your Microsoft Premier Technical Account Manager (TAM) for booking information.  For more information about becoming a Microsoft Premier customer email PremSale@microsoft.com, tell them CRMInTheField or I sent you.

Thanks!
Shawn Dieken

Microsoft Premier Field Engineer

Dynamics CRM Multi-Series Bar Charting – Returns Secondary Y-Axis

$
0
0

I was recently assisting a customer with some custom charting and dashboards in Microsoft Dynamics CRM 2011. One of their goals was to create a bar chart that allowed them to compare three currency fields by owner for the account entity. One of the features of creating multi-series charts in Microsoft Dynamics CRM is the ability to create charts with a secondary y-axis which allows  each series to have their own measurement scale.

In my customers scenario, because they had three series in their chart rather than two, this secondary axis actually caused an issue where the bars in the chart were appearing incorrectly.

  1. Note that there are two competing y-axis acting as different measurement scales for the different series
  2. The sum of the data being returned, though correct, displays incorrectly in the graph ($35,000 has the highest bar while both $40,000 and $50,000 appear shorter)

111111

In digging in deeper we noticed that the chart was returning a left y-axis and a secondary right y-axis which is deemed “secondary” but added by default to the second series. The 1st series uses the left y-axis and the 2nd series uses the right y-axis and the in their case the 3rd series goes back to the first, causing the appearance of the chart to be inaccurate.

ASP.NET charting allows for a Primary and Secondary X and Y axis, and because we had 3 series this was causing issues with only being allowed 2 y-axis.

There was no way to actually control or edit this from the application, so to edit this chart I exported the XML. You can do this by selecting the “More Actions” menu from the chart area within any entities customizations area and selecting to “Export Chart.”

3333

Upon opening the XML in visual studio I noticed that there that the second series node had the following attached to the end: YAxisType="Secondary"></Series>
    

 1: <Series>
 2:    <Series ChartType="Column" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40"></Series>
 3:    <Series ChartType="Column" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40" YAxisType="Secondary"></Series>
 4:    <Series ChartType="Column" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40"></Series>
 5:  </Series>
 
I went ahead and removed that from that node (YAxisType="Secondary") and saved a copy of the new xml.  I went back into the charting area for the account entity 
and through the same “More Actions” menu chose to import the chart.

After import the chart appears as desired, with no secondary y-axis and the chart data appearing correctly!

222222

If you are interested, our PFE team is ready to help you with this, we can assist with query examples and various other engagements to help you improve your CRM reports and performance. In addition, we have many other services we offer such as reporting workshops, developer training, admin workshops, and code reviews.  If you would like to have another Microsoft PFE or I visit your company and assist with the ideas presented on our blog, contact your Microsoft Premier Technical Account Manager (TAM) for booking information.  For more information about becoming a Microsoft Premier Customer email PremSale@microsoft.com.

Thanks!

Sarah Champ

 

6 Steps to Add a Deployment Administrator in Microsoft Dynamics CRM 2011

$
0
0

I received a call from one of my customers where when a Deployment Administrator, that was recently added, was receiving SQL errors when opening the Deployment Manager console.  The issue was the new Deployment Administrator did not have rights to the MSCRM_Config database.  TechNet has a series of pages, http://technet.microsoft.com/en-us/library/gg197626.aspx, that go through the steps of adding a new Deployment Administrator.  Today I’ll walk you through how to create a security group with the proper security privileges to reduce administrative overhead when adding new Deployment Administrators.  Here is an overview of what is in the CRM IG and Technet Articles:

Microsoft Dynamics CRM 2011 Deployment Manager is a Microsoft Management Console (MMC) snap-in that system administrators and value-added resellers use to manage Deployment Administrator accounts, organizations, servers, and licenses for Microsoft Dynamics CRM deployments.

Important notes:

  • At least one deployment administrator must be defined in each CRM deployment group
  • To run the CRM Deployment Manager and provision tenant organizations, you must be assigned the Deployment Administrator role
  • Deployment Administrators have complete and unrestricted access to perform Deployment Manager tasks on all organizations and servers in a Microsoft Dynamics CRM deployment
  • During Microsoft Dynamics CRM Server Setup, the process automatically assigns the Deployment Administrator role to the user who is running the Setup
  • While you could use the same account, it is recommended that you use separate accounts per CRM deployment group to minimize risk to a security breach
  • Although you should limit the number of Deployment Administrators, the best practice is to enable at least two or three trusted user accounts with this role. This will help prevent potential lockouts that could occur when only using a single account. A second option is to use an additional, separate, service account that would not leave the company and be used to avoid lockout. 

NOTE: The Deployment Administrator role is separate from the Microsoft Dynamics CRM user role.

 

The following walks you through how to create an AD Group to manage Deployment Administrators privileges:

 

1: Creating a New CRM Deployment Administrators Security Group in AD

Create a new Active Directory Security group for the CRM Deployment Administrator(s). This group will be used to assign permissions to the systems and security groups necessary to administer fully the CRM organizations in a CRM deployment. Consider naming this group unique to the CRM Deployment, such as CRMDG01Admins.

2: Adding the Deployment Administrators Group as a Local CRM Server Admin

When you add a Deployment Administrator role to a user, Deployment Manager does not grant the user local administrative rights to the CRM Deployment Administration and database servers. This is required to provision resources properly within the deployment.

  1. Log on to CRMDEP01 using an account that is a member of Domain Administrators group.
  2. Add the ContosoCRMDG01Admins group to the local Administrators group.
  3. Repeat this procedure on CRMSQL01

 

3: Granting CRM Deployment Administrator Permissions to the CRM Active Directory Groups

The user who creates, modifies, edits, and imports organizations in Microsoft Dynamics CRM must have permissions in the following Microsoft Dynamics CRM security groups in Active Directory:

  • PrivReportingGroup {guid}
  • PrivUserGroup {guid}
  • ReportingGroup {guid}
  • SQLAccessGroup {guid}

Note: make sure your various service accounts have the proper group membership, this is documented in our CRM 2011 Setup FAQ, the table in the FAQ is now also listed in the CRM IG.

CRM Deployment Administrator must have permissions to all four Microsoft Dynamics CRM security groups.  The specific permissions a deployment administrator must have on the CRM security groups are as follows:

Basic Permissions

  • Read
  • Write
  • Add/Remove self as member

“Advanced” or Detailed Permissions

  • List Contents
  • Read All Properties
  • Write All Properties
  • Read Permissions
  • Modify Permissions
  • All Validated Writes
  • Add/Remove self as member

The Deployment Administrators group you’ve created will allow you to grant the proper permissions on it and in the future you can save time by adding new CRM Deployment admins to the group we’ve created. To setup the proper permissions for members of this security group:

  1. Log into a computer with Active Directory Users and Computers management console installed 
  2. In Active Directory Users and Computers click the View menu, then check the Advanced Features option
  3. In the left hand navigation expand your domain, for this example: contoso.com.
  4. Click on the organization unit containing the CRM Security groups (as defined during the installation of the first CRM server), The listing pane should display the following CRM security groups:
    • PrivReportingGroup{…}
    • PrivUserGroup{…}
    • ReportingGroup{…}
    • SQLAccessGroup{…}
      *{…} represents the globally unique identifier (GUID) following the group name. The GUID will be unique in every deployment. A representative example group name could be ReportingGroup {4efba72a-232f-44ec-9d95-155eb6ffb1be}
  5. Right-click the PrivReportingGroup security group and then click Properties.
  6. In the Properties dialog box, select the Security tab, and in the Group or user names list, click Add.
  7. In the Enter the object name to select text box, type CRMDG01Admins, click the Check Names button, and then click OK.
  8. With the CRMDG01Admins group selected, click to select the Allow check box for the Write permission. This action causes the system to select automatically the Add/Remove self as member check box.
    • By default, the Allow check box is selected for the Read permission.
  9. Click Advanced.
  10. In the Permission list, select the CRMDG01Admins group, and then click Edit.
  11. Click to select the Allow check box for the Modify Permissions permission.  By default, the Allow check box is selected for the following permissions:
    • List Contents
    • List Object
    • Read All Properties
    • Write All Properties
    • Read Permissions
    • All Validated Writes
    • Add/Remove self as member
  12. Click OK three times.
  13. Repeat the steps in this procedure to grant the CRMDG01Admins permissions to modify the PrivUserGroup, ReportingGroup, and SQLAccessGroup security groups.

4: Grant CRM Deployment Administrators Permissions to CRM SQL Objects

When you add a Deployment Administrator role to a user, Deployment Manager does not add the required permissions on the instance of SQL Server where the Microsoft Dynamics CRM databases are stored. When the user tries to start Deployment Manager, the user might receive an error message that says, "Unable to access the MSCRM_CONFIG database. SQL Server does not exist or access denied." To resolve this issue, you must add the user to SQL log-ins by using Reporting Services. For the new deployment administrator to manage CRM organizations created by other deployment administrators, he or she must be granted db_owner permissions to those databases, or be assigned the sysadmin server role to manage all databases.

  1. Log on to CRMSQL using an account that is a member of Domain Administrators group.
  2. Launch the SQL Server 2008 Management Studio.
  3. On the Connect to Server dialog box, click Connect.
  4. Expand Security.
  5. Right-click Logins and select New Login.
  6. Click the Search button.
  7. In the Select User or Group dialog box, do the following:
    • Click Object Types, and then enable the Groups type.
    • Click Locations, and then select Entire Directory.
  8. Click OK.
  9. In the Enter the object name to select text box, type domain group name (that is, CRMDG01Admins), click the Check Names button, and then click OK.
  10. In the Default database drop-down box, select MSCRM_CONFIG.
  11. From the page list on the left, select Server Roles, enable the sysadmin role for the user, and then click OK.
  12. Expand Databases.
  13. Expand the MSCRM_CONFIG database.
  14. Expand Security.
  15. Right-click Users and then select New User.
  16. In the User name field, type the domain user login name (that is, CRMDG01Admins).
  17. In the Login name field, type ContosoCRMDG01Admins.
  18. In the Database role membership section, select the db_owner check box, and then click OK.
  19. Close the SQL Server 2008 Management Studio.

5: Adding Domain User Account to CRM Deployment Administrators Group

  1. Verify that a domain user account exists for the new deployment administrator. If it does not, create a new account.
  2. Add the new user to the previously created CRMDG01Admins group. Also, ensure this account is also member of the Domain Users group.

6: Add the User as a CRM Deployment Administrator in CRM Deployment Manager

You can add the Deployment Administrator using the either the Microsoft Management Console (MMC) or using a PowerShell Script

Add a Deployment Administrator Using MMC

In the console tree, right-click Deployment Administrators, and then click New Deployment Administrator.

In the Select User dialog box, in the Enter object name to select box, type the name of a user, who must exist in Active Directory, and then click Check Names.

After the user name is accepted, click OK.

To add the Deployment Administrator using PowerShell

The New-CrmDeploymentAdministrator cmdlet adds a new Deployment Administrator to the deployment.

Syntax:

New-CrmDeploymentAdministrator -Name username

where: username is the name of the user being given the Deployment Administrator role. It must be in the form domainusername. The user must exist in Active Directory.

  1. Logon to the CRM server with the Deployment Administrator role, such as CRMDEP01, using the account used to install CRM services.
  2. Launch an administrative Windows PowerShell command window from the quick launch bar, or from the Start menu under Program Files, Accessories, Windows PowerShell, and then Windows PowerShell.
  3. In the Windows PowerShell command window, execute the following commands:

    Add-PSSnapin Microsoft.Crm.PowerShell

    New-CrmDeploymentAdministrator -Name contoso<username>
    Note: No data will be returned upon successful completion, as the call is asynchronously processed.

  4. To verify that the account was properly created, either open the Deployment Manager and confirm the account is displayed in the Deployment Administrators list, or run the following CRM PowerShell cmdlet and confirm the account specified is found in the Name field: Get-CrmDeploymentAdministrator

 

Thanks!
Walter Grow

Microsoft Premier Field Engineer


Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 15

$
0
0

Contents:

We're proud to announce that all packages for Microsoft Dynamics CRM 2011 Update Rollup 15 were released on Tuesday October 8th, 2013 to the Microsoft Download Center!  The Update Rollup 15 packages should appear on Microsoft Update on or about October 22nd, 2013.

Update Rollup 15 Build numbers:

5.0.9690.3731
5.0.9690.3739 (Outlook Client re-release)

Update Rollup 15 Microsoft Download Center page

Here's the "Master" Microsoft Dynamics Knowledge Base article for Update Rollup 15: (KB 2843571). Going forward, the plan is for the Master Knowledge Base article for CRM 2011 Update Rollups to be published a bit in advance of release to aid planning.

On Tuesday, October 8th 2013 at 3 PM Pacific Greg Nichols and Ryan Anderson from the Microsoft Premier Field Engineering provided information about:

  • The release of Update Rollup 15 for Microsoft Dynamics CRM 2011
  • New fixes made available In Update Rollup 15
  • Collateral available about Update Rollup 15 and CRM Update Rollups in general
  • The upcoming release of Microsoft Dynamics CRM 2013

 

on BlogTalkRadio during their Microsoft Dynamics CRM 2011 Update Rollup 15 Podcast.

Note: We have identified a compatibility issue that occurs when you use the Microsoft Dynamics CRM 2011 Client for Outlook with Update Rollup 15 applied against a Dynamics CRM 2013 server. This issue does not affect Dynamics CRM 2011 servers. New Update Rollup 15 client packages were released to address this issue. If you are not in this specific scenario, you will not have to apply the new Update Rollup 15 client package. The new Outlook Client packages follow this naming convention:

CRM2011-Client-KB2843571-v2-ENU-amd64.exe
CRM2011-Client-KB2843571-v2-ENU-i386.exe

And are build 5.0.9690.3739.  Only the Outlook Client packages were re-released.

Note regarding Podcasts: You can make our CRM Premier Field Engineering podcasts available on Zune by using the RSS feed below.  In the Zune software, go to Collection -> Podcasts and click on the Add a Podcast button on the lower left, then enter the url for the RSS feed: http://www.blogtalkradio.com/pfedynamics.rss. After that, you can adjust the series settings like any other podcast, so you can sync with your smartphone or Zune.

Go to Top

The "CRM Update Rollup Collateral Page"

For pointers to download locations, release dates, build information, and CRM Premier Field Engineering blogs and podcasts for all Microsoft Dynamics CRM Update Rollups, visit the "CRM Update Rollup Collateral Page"

Go to Top

Update Rollup 15 News!

Update Rollup 15 provides a few functionality changes you should be aware of, including:

Many important CRM for Outlook Client improvements:

  • It includes a new feature that is also scheduled to be delivered with Microsoft Dynamics CRM 2013
    • This feature moves the CRM client-specific workload into its own process so that it no longer shares memory with the Microsoft Office Outlook process
    • This feature is also known as Process Isolation
  • An upgrade to Microsoft SQL Server for Windows CE 4.0 for better memory management, better caching, and connection enhancements
  • Updates to the CRM for Outlook configuration files to make the CRM for Outlook SDF files compatible with SQL Server for Windows CE 4.0
  • It materializes the Address Book Provider to reduce performance issues that are caused by large address books
  • It limits the amount of active open forms
  • It provides a MAPI Lock time-out
  • It hard codes a previous registry setting that prevented pinned views from pulling down information to local SQL CE cache. This new DisableMapiCaching setting defaults to a value of 1

Go to Top

Update Rollup 15 is of course also is a collection of fixes for issues reported by customers or found by Microsoft's Engineering Team, plus changes to provide support for related technology components.

Update Rollup 15 news that you need to know because Update Rollups are cumulative, so these significant changes are also in Update Rollup 15!

  • UR12 includes the "Microsoft Dynamics CRM December 2012 Service Update"  See:
  • Additional cross-browser compatibility provided
    • The December 2012 Service Update component of Microsoft Dynamics CRM 2011 Update Rollup 12 introduces additional browser compatibility for Firefox, Chrome, and Safari
  • Indexes added to support the Update Rollup 10 Quick Find Optimizations
    • Update Rollup 12 includes new indexes for the following entities in the Quick Find Search Optimization feature. To fully reap the benefits of the platform changes included in Update Rollup 10, indexing is needed.  The indexes created are listed below:
      • Cases
      • Opportunities
      • Competitors
      • Contact (the Phone Number fields)
      • Business Unit
      • Connection
      • Connection Role
      • KB Article
      • Lead
      • Product
      • Sales Literature
    • These indexes are created during the Update Rollup 12 installation and you may notice that part of the installation will take longer to complete. The reason for this is that the indexes need to be populated and based on the size of your dataset the completion time will vary
  • Enhancements to Activity Feeds
    • The enhancements made to the activity feeds include a new feature called Like/Unlike
    • With this feature, you can express your immediate feedback about a post
    • For more information, see Like/Unlike
  • Updated User Experience for Sales and Customer Service and Product Update Functionality for Microsoft Dynamics CRM Online
    • The Microsoft Dynamics CRM December 2012 Service Update introduces a variety of new features and functionality, including an updated user experience. For Sales and Customer Service users, the updated user experience provides a new process flow visualization, which appears at the top of the forms, such as the Opportunity , Lead or Case form. The process flow guides users through the various phases of the sales and customer service processes
    • For trials and subscriptions initiated after December 2012, the updated Sales and Customer Service user experience is included by default. Existing Microsoft Dynamics CRM Online customers have an option of adding the updated user experience to the Opportunity , Lead and Case forms by installing the Product Updates. This lets Administrators install selected feature updates based upon the specific needs of their organizations. The Product Updates are installed by using the Microsoft Dynamics CRM web application; they cannot be installed programmatically
    • For more details, see What's New for Developers for Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online
  • Custom Workflow Activities for Microsoft Dynamics CRM Online
  • Developer Toolkit Support for Microsoft Visual Studio 2012
    • The Developer Toolkit for Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online now supports Microsoft Visual Studio 2012. The installer can be found in the SDK download in the sdktoolsdevelopertoolkit folder
  • Microsoft Dynamics CRM 2011 Software Development Kit (SDK) updated for Update Rollup 12 (version 5.0.17 updated for CRM 2011 Update Rollup 13 and Microsoft Dynamics CRM Online)
  • Bulk Data Load performance enhancements
    • To support bulk data load scenarios, this release introduces the ExecuteMultipleRequest message. This message supports the execution of multiple message requests using a single web method call. ExecuteMultipleRequest accepts an input collection of message requests, executes each of the message requests in the order they appear in the input collection, and optionally returns a collection of responses containing each message’s response or the error that occurred. Processing requests in bulk results in lower network traffic and higher message processing throughput
    • For more information, see Use ExecuteMultiple to Improve Performance for Bulk Data Load
  • Activity Feeds changes
    • Microsoft Dynamics CRM Activity Feeds provide real-time notifications and quick sharing of information through short updates. These updates appear on your personal wall in the What's New area of the Workplace . Activity Feeds enable you to follow and learn about important activities that take place around people, accounts, contacts, leads, and anything else that you care about
    • Updates can be posted manually by you, or automatically based on predefined system rules through a workflow. Activity Feeds can also be posted to by external applications through the Microsoft Dynamics CRM web services API. Activity Feeds expose Microsoft Lync real-time presence functionality so that you can initiate communication activities such as IM, phone calls, and emails. For more information, see Activity Feeds Entities
  • More performance and stability-related fixes, including fixes to the CRM Client for Microsoft Outlook
  • Contains all hotfixes / updates released in earlier Update Rollups
  • Quick Find performance optimizations and EnableRetrieveMultipleOptimization SQL query performance optimizations (originally released in Update Rollup 10)

For Microsoft Dynamics CRM business solutions that include an entity with a large dataset, record retrieval and grid rendering performance can be negatively impacted for users that do not have global access to all records associated with that entity. Code changes to mitigate this behavior first appeared in Microsoft Dynamics CRM 4.0, and have been fine-tuned since then.

With Microsoft Dynamics CRM 2011 Update Rollup 10 and later, big advancements have been made to optimize the performance of queries against large datasets by adjusting specific “statistical” settings to address the issue. Should this fail to achieve desired levels of performance, adjust the value associated with EnableRetrieveMultipleOptimization (ERMO) setting. You may have heard these changes described at this year's Convergence.

A first step in efforts to optimize the performance of queries against large data sets is to make adjustments to the “statistical” settings that affect the behavior of RetrieveMultiple queries. Although you can configure these settings by modifying the Windows Registry (under HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSCRM) on the each of the Web servers that is used in a deployment, we recommend that these settings be configured by using the OrgDbOrgSettings, which will ensure that the configuration applies to a specific organization. For additional information about configuring these settings by using the OrgDbOrgSettings, and to download the tool that makes the OrgDbOrgSettings changes you desire, see the Microsoft Knowledge Base article titled "OrgDBOrgSettings Tool for Microsoft Dynamics CRM 2011" (KB 2691237)

If making adjustments to these settings does not yield satisfactory levels of performance, then consider adjusting the value of the EnableRetrieveMultipleOptimization (ERMO) setting. The ERMO setting is commonly used to limit the duration of certain long running queries; specifically, to overcome issues related to local or deep business unit access within Microsoft Dynamics CRM 2011 security roles.

Many more details describing appropriate scenarios for the available settings are already available via the Microsoft Download Center in a revised version of the whitepaper "Optimizing and Maintaining the Performance of a Microsoft Dynamics CRM 2011 Server Infrastructure", in the sections “Optimizing the Performance of Queries against Large Datasets” and “Optimizing the Performance of Quick Find Queries”. The details will appear in the MSDN version of this whitepaper as quickly as possible.

Go to Top

NEW RELEASE REGARDING OrgDbOrgSettings!

You're probably familiar with the OrgDbOrgSettings command line tool (mentioned above) released by the CRM Product Group in the "Tools" package that is updated and released with each set of Update Rollup packages.  With it, you configure some .xml and call your .xml with the command line utility described in KB 2691237. However, you may be daunted by configuring this .xml, to the point that you may not use the tool, or use it minimally - not exploring the many options outlined in KB 2691237 that may be of use to you.  Well, the Microsoft Dynamics PFE team now has another option for you!  By popular demand, our esteemed CRM PFE colleague Sean McNellis has developed a tool  - a CRM 2011 managed solution - that provides you with an easy-to-use GUI with which you can configure all of the options outlined in the Knowledge Base on a per-tenant basis.  Feel free to download it, install it, and check it out... I sure use it!

This is a FREE downloadable tool - the "Dynamics CRM 2011 Organization Settings Editor".  Check it out; the download page has screenshots and information that will help you make good use of the tool.  Sean has also published a Premier Field Engineering blog: "Azure Mobile + JavaScript + WebResources = Easy Editing of OrgDBOrgSettings in Dynamics CRM 2011!" to share more details on the tool. He will be updating it for the settings available in Update Rollup 15 very shortly.  Thanks, Sean!

Go to Top

NEW NOTE REGARDING "Deferring Database Updates when installing CRM 2011 Update Rollups

My esteemed PFE teammate Sean McNellis published a blog you should be aware of regardi

CRM 2011 Platform Tracing – Registry vs. Windows PowerShell

$
0
0

Should we enable CRM tracing via the Registry or Powershell?

Answer: It depends.

Let me explain.  First, let’s talk about why you would turn on CRM Platform tracing.  If you encounter and error in CRM and you are not able to determine the resolution to the issue by the error message and\or downloading the platform error from the error message; the next step you may want to do is to enable CRM platform tracing.  The CRM platform trace can give you more details about the entire call stack and verbose actions leading up to the error.  This would be true for errors received in the CRM web client and in most cases errors in the CRM Outlook client.  However, there is client side tracing you can enable as well if the error does not appear to be a server side error message.  First let’s focus on server side tracing and then later I will include some details on client side tracing.

Registry

We have a KB article about How to enable platform tracing in Microsoft Dynamics CRM.  This method walks you through enabling CRM platform tracing through the registry.  There are also some third party tools like the Diagnostics Tool for Microsoft Dynamics CRM 2011 available on the Internet that customers and partners have written to automate this process.  Even though those are not official Microsoft support tools, they are very commonly used with customers and partners and I personally haven’t seen any issues using these tools.

The registry is an effective way to enable platform tracing when you are troubleshooting an issue on a single CRM server.  You can add the registry keys and you can leave them in place after you disable tracing, so that you can re-use them if needed at a later time.  To disable tracing, you can simply change the TraceEnabled registry value to 0 and you also have to change the TraceRefresh value to a different number.  I always just increment the decimal number by one.  It’s very important to disable tracing when you are done troubleshooting, or you will fill up your C: drive.

Which leads us to my next point which is that the TraceDirectory is always ignored and no matter what you set this value to, the trace files will always go to  <Install Drive>:\Program Files\Microsoft Dynamics CRM\Trace.  Even if you change this in the registry or in a third party tool, the trace file will always go to the same directory.  Typically this is not too big of an issue, unless you installed CRM on a drive that does not have much available hard drive space and then you have to enable tracing for a long period of time.

Helpful Tips: 

  • You should go check that directory if you have enabled tracing in the past, or inherited this CRM Administrator role from someone else who may not have cleaned up old trace files.
  • When using a Network Load Balanced (NLB) CRM deployment, you should try narrow down the issue to a single server, so that you only have to enable tracing on a single server.  This will also save you from reading through extra trace files on servers that you were not even hitting while reproducing the issue.
  • There are many trace file readers available on the Internet, but here are a few common ones that I have seen customers and partners use.
    • BareGrep – This is a third party tool with a free version and also a registered version.  This works very well if you have several trace files to parse through quickly and do not know which file contains your error.  This is very common if you enabled Verbose tracing on a busy production server.
    • Trace Reader for Microsoft Dynamics CRM – This is a new trace tool that is supposed to work with CRM 4.0, 2011 and 2013, but I haven’t personally used it yet.  However, it was written by tanguy92 who also wrote the Diagnostics Tool for CRM 2011, so I am optimistic this should work well.
    • NotePad – Yes, Notepad.  It’s simple and built in for quick usage.  Turn off Word Wrap (under Format) and just use CTRL+F and search for “Error |” or whatever key word you saw in the error message.

 

PowerShell

Windows PowerShell is another method that you can use to enable CRM platform tracing when you want to quickly enable tracing for an entire CRM deployment.  This can be very effective when you have multiple CRM servers vs. going to each CRM server and enabling tracing via the registry.  This topic is also covered in the How to enable platform tracing in Microsoft Dynamics CRM KB article.

When tracing is enabled via PowerShell you should specify a different trace directory location to store the trace files.  By default CRM is set to use C:\crmdrop\logs, but since it's very likely that location does not exist on your CRM servers, you will think that tracing was not enabled correctly as you are looking in the <Install Drive>:\Program Files\Microsoft Dynamics CRM\Trace folder for the trace files.  You either have to update the TraceDirectory via PowerShell to that default location which already exists, or create a different location manually and specify that location (ie: D:\CRMTrace) using PowerShell.  I recommend this option, so that you do not risk filling up your primary C: drive with CRM trace files.

Helpful Tips:

  • When tracing is enabled via PowerShell, but disabled via the registry; tracing will still be enabled as it’s tracing for the Deployment vs. just a single server. 
  • If tracing is enabled via PowerShell and via the Registry; the Registry will override and the CRM traces will be in the <Install Drive>:\Program Files\Microsoft Dynamics CRM\Trace folder instead of the location you specified via PowerShell.  
  • If tracing is disabled via PowerShell, but enabled via the registry; then tracing will be enabled on that server with the registry key in place and the traces will be going to the <Install Drive>:\Program Files\Microsoft Dynamics CRM\Trace folder.

 

Summary

So, as you can see the answer to use the registry or PowerShell can depend on the scenario you are troubleshooting, type of environment you have an where you want to store the log files.  There is no right or wrong answer, so just use what makes sense for you and your CRM deployment based on the information provided in this blog post.

What about the CRM Outlook client tracing mentioned above?  If you were unable to find the error details in the CRM server platform trace and you suspect it’s a client side issue, you can enable CRM platform tracing on the CRM Outlook client machine.  Keep in mind that this only applies to the CRM Outlook clients and not the CRM web clients.  If you are using CRM through a web browser only, then you would just use server side platform tracing.  That’s why the first thing I do when there is an issue with the CRM Outlook client is to try reproduce the issue in the CRM web client to help reduce the complexity of troubleshooting the issue.

You can enable CRM platform tracing on the CRM Outlook client by going to Start, All Programs, Microsoft Dynamics CRM 2011, Diagnostics.  If you are using Windows 8 or 8.1, you can simply click the Windows key and start typing: Diagnostics.  Then click on the CRM Diagnostics tile.  When you are in the CRM Outlook client diagnostics tool, select the Advanced Troubleshooting tab, and then select Tracing to enable or click to clear Tracing to disable and then click Save.  After you reproduce the issue, disable tracing and the CRM for Outlook tracing files are located in the C:\Users\<username>\AppData\Local\Microsoft\MSCRM\Traces folder.  For additional details on CRM Outlook client tracing, please refer to our documentation on MSDN.

 

Hopefully this helps to clear up some of the CRM platform tracing questions you have, or may have had at some point while working with CRM platform tracing.

As always our CRM PFE and CRM Support teams are ready to help if you need the assistance.  In addition, we have a plethora of other services we offer such as developer training, admin workshops, and code reviews.  If you would like to have another Microsoft PFE or I visit your company and assist with the ideas presented on our blog, contact your Microsoft Premier Technical Account Manager (TAM) for booking information.  For more information about becoming a Microsoft Premier customer email PremSale@microsoft.com, tell them CRMInTheField or I sent you.

Please share any other helpful tips or tools that you use for CRM platform tracing in the comments below.

Thanks!
Shawn Dieken

Microsoft Premier Field Engineer

CRM 2011 Email Router – NullReferenceException error

$
0
0

Lately I’ve been working with a customer on re-configuring their CRM Email Router, which also means addressing a few issues they currently are running into. 

- Issue -

In this case, the customer is using the “Email Router” configuration for incoming emails, meaning that users have their “E-mail access type – Incoming” set to E-mail Router.  If you need an Email Router refresher, the Dynamics CRM Support Blog has a good FAQ.

The problem this particular customer was running into was that intermittently, messages from certain mailboxes would not be promoted into CRM and an error similar to the following would be generated in the application event log:

System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Crm.Tools.Email.Providers.ExchangeWSConnector.RetrieveMessage(ArrayList ids, Int32 index, ServiceLogger serviceLogger) at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.RetrieveNextMessageInternal() at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.RetrieveNextMessage() at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()

In addition, when tracing was enabled for the Email Router as described here, the following error was captured:

#27938 - An error occurred while checking for e-mail messages to process in mailbox test@contoso.com. System.NullReferenceException: Object reference not set to an instance of an object.

   at Microsoft.Crm.Tools.Email.Providers.ExchangeWSConnector.RetrieveMessage(ArrayList ids, Int32 index, ServiceLogger serviceLogger)

   at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.RetrieveNextMessageInternal()

   at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.RetrieveNextMessage()

   at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()

- Resolution -

After further research, this error was traced back to an issue that was fixed in Update Rollup 14 for CRM 2011.  In this case, this issue was occurring because the email did not have a From field, or it was a Null value.  However, this can also occur if other fields are missing such as Subject, To, CC…etc.  In addition, if this issue is generated, other emails in the mailbox after the problem message may not be processed.  After applying UR14, this issue was fixed and the messages began to flow properly.

If installing UR14 (or greater) is not an option right now, a workaround may be to delete the problematic emails from the user mailbox.  However, while you may be able to identify the mailbox where the issue is happening by enabling tracing for the Email Router, it may not be easily apparent which message in particular is causing the problem.  To capture more detailed information, use Fiddler to capture a trace and review messages there.  Remember that in order for Fiddler to capture Email Router traffic, you will need to change the account the Email Router service is running under to a domain account, and then log into the server with that account.

A simpler option may be just to log into the mailbox and review messages there for any missing fields as well.  Those messages could either be deleted or moved to another folder.

As always our CRM PFE and CRM Support teams are ready to help if you need the assistance.  In addition, we have a plethora of other services we offer such as developer training, admin workshops, and code reviews.  If you would like to have another Microsoft PFE or I visit your company and assist with the ideas presented on our blog, contact your Microsoft Premier Technical Account Manager (TAM) for booking information.  For more information about becoming a Microsoft Premier customer email PremSale@microsoft.com, tell them CRMInTheField or I sent you.

Thanks!

Ryan Anderson @PFEDynamics

Microsoft Premier Field Engineer

Where did my scripts go? How to debug JavaScript in CRM 2011 post-UR15

$
0
0

Chances are, you’ve recently read our Dynamics CRM 2011 Update Rollup 15 overview, read our post covering “what you need to know about UR11CU”, or read a partner blog article discussing UR15.  Each of these highlights how UR15 continues to enhance user experience, be it via the Outlook client or web browser.  As a result, specific changes focused on form load performance have a direct effect on how script libraries are served to the browser.  If you’ve already been developing/troubleshooting JavaScript in an environment updated to UR15, you may have noticed this effect.  Web Resources no longer show up individually by file name in your browser debugger (i.e. Internet Explorer’s F12 developer tools), rather they appear as dynamic scripts.  More on that to come, but first a little background.

Background:

In Update Rollup 12, changes were made so that JavaScript libraries linked to entity forms would be downloaded and processed without blocking the form.  Perceived form load performance increased, but not without a negative side-effect.  Script files weren’t guaranteed to load in a specified order, meaning dependencies between script libraries could lead to intermittent exceptions based on the actual load sequence.  For instance, if the jQuery library takes longer to load than your dependent JavaScript file, any calls referencing jQuery in your form onLoad event handler may throw an “Object Expected” error.

Enter Update Rollup 15 - A Fix:

To address this scenario, Update Rollup 15 again alters the way script library files are loaded to ensure a reliable behavior and address dependency constraints.  While script libraries now load in their intended order, the libraries are treated as dynamic script blocks making for an inconsistent debugging experience across browsers (debugging in Chrome? You won’t see them anywhere, although you can still do live debug by stepping into the functions or forcing a breakpoint in your code).

Form script load behavior by update:

  • CRM 2011 RTM through UR11: uses a method that guarantees script library load order and scripts are displayed as named scripts in browser debuggers.
  • UR12  through UR14: to increase perceived form load performance, introduces a non-blocking pattern to load custom form scripts which does not guarantee load sequence.  This change produced inconsistent behavior when dependencies exist between script libraries.  
  • UR15: uses a balanced approach, derived from the change introduced in UR12, that guarantees the script library load sequence as specified in the entity form definition.  This approach leverages synchronous XmlHttpRequests (XHR) and dynamic script blocks which in turn make browser debugging a challenge.

Now for what you’ve all been waiting for – how to debug entity form JavaScript libraries post-UR15:

Browser Debuggers: Dynamic script content is handled differently across the various browser debugging tools and even between versions.  In the case of Chrome’s debugging tools, you won’t see dynamic script content at all.  But have no fear!  We’ll address circumvent this roadblock by simply traversing up the call stack by one call.  Instead of breaking directly into your function, we’ll start from the point where CRM for script calls custom functions, then step into the custom function.  These calls originate from FormScript.js.aspx.

Note: Another option is to use the debugger statement – by placing it anywhere in a script file it will tell the browser to force a breakpoint and pull open your debugger (as long as script debugging is enabled).  This is not a desirable outcome for production code, so I suggest reserving this technique only for debugging in development environments.  The remainder of this article walks through how to debug without using a debugger' statement, which should be appropriate in all deployment scenarios. 

Debugging script libraries: Previous to UR15, you could simply launch the browser debugging tool, look for a named Web Resource file in the scripts list, and easily set a breakpoint to begin live debugging.  In UR15, the process changes slightly:

  • First open your browser debugger (for IE simply press the F12 key), then open the script debugger tab and make sure you’re actively debugging or attached .
  • Next, instead of looking for your Web Resource file in the document list, search for and select FormScript.js.aspx
    • TIP: This file may be nested under the edit.aspx file. In IE F12 developer tools, you may have to expand edit.aspx to find FormScript.js.aspx

image  

  • Within the FormScript.js.aspx document, you will find your custom function call wrapped in an event handler.  For custom functions registered with the form onLoad event, look for the crmForm_window_onload_handler function.  All registered functions will be called, in sequence, within this wrapper function.  For custom functions registered for field onChange events, look for a wrapper function named [attributename]_onchange_handler.  Other form events will have similarly named event handler functions.
  • Set a breakpoint within FormScript.js.aspx on your function name.  Now when the event is fired, the breakpoint will be hit before your custom function is called, allowing you the opportunity to step into your function.
    • IMPORTANT: If you have more than one event on the form registered to the same function, there will be a separate handler per call!  You may have to set a breakpoint on all instances or use the wrapping function name to determine if the call pertains to your debugging scenario.

image

  • Trigger the event that you want to debug (onLoad, onChange, onSave, etc.).
  • When the breakpoint is hit, press the F11 key to step into your Web Resource code.  From here, you should be in familiar territory – continue debugging as necessary.

image

That’s it!  Hopefully, these tips have helped your post-UR15 script debugging efforts (and avoided an unnecessary headache).  If you have further technical questions about how to debug, post comments or click email blog author.  I am contemplating the creation of a video to walk through three or four common CRM debug scenarios.  If you would find this valuable, please provide that feedback.  As always, our team of Dynamics CRM PFE’s and Dynamics CRM Developer PFE’s are here to help, either remotely or onsite:

  • If you already have a Premier contract let your TAM know you want to work with a Dynamics CRM PFE and they’ll know where to find us
  • If you don’t have a Premier contract and you’re interested in Premier support and/or working directly with a PFE, contact us via our Premier Services contact page or reach out via the email blog author page.

Thanks for reading!
Sean McNellis

Follow me: @seanmcne

Microsoft Premier Field Engineer

CRM 2011 and ASP.NET Single Sign-on: Use WAUTH for Integrated Web Apps

$
0
0

What is 'wauth' and why do your integrated web apps need it to achieve seamless single sign-on (SSO) with Dynamics CRM 2011 (on-premise)? Suffice it to say that simply configuring Windows Identity Foundation (WIF) in your ASP.NET web app and federating it as a relying party (RP) to the same Identity Provider (IdP) targeted by your CRM environment will not always provide a seamless SSO experience. Achieving a seamless experience requires handling a scenario presented by CRM 2011's custom WIF implementation. Don't worry, we'll help you there…but before we show you the "how", let's answer the "what" and "why".

What is 'wauth'?

The passive WS-Federation protocol's wsignin1.0 request message contains an optional parameter, 'wauth', which correlates to a SAML assertion regarding authentication context. When specified, it instructs the IdP's Security Token Service (STS) to use a certain method for authenticating the requestor. This assertion is then incorporated into the SAML security token(s) issued by the STS for subsequent authorization activities. On the other hand, if 'wauth' is not included in the request, the IdP determines the appropriate method (Active Directory Federation Services [ADFS] 2.0 provides the ability to configure the authentication method priority).

Why then, if 'wauth' is optional, do web apps integrated within CRM 2011 need to leverage it?

Think about the process of enabling your CRM environment for claims authentication. There are two primary steps. First, you configure internal claims using a hostname for users to authenticate on the corporate domain (or federated domain) via integrated windows authentication (Kerberos). Second, you configure the Internet Facing Deployment (IFD) with a separate hostname for users that need to authenticate from external locations using the IdP's forms-based authentication process.

How then does the IdP know CRM's desired authentication method for internal and external realms? You guessed it, CRM's authentication module declares a 'wauth' URI in the redirect requests to the IdP! Curious? Open your Internet Explorer Developer Tools (F12) and capture a network trace to view the redirect request URL in both scenarios. In that trace you'll see encoded versions of the following 'wauth' URI's:

  • Internal: wauth=urn:federation:authentication:windows
  • External (IFD): wauth=urn:oasis:names:tc:SAML:1.0:am:password

For custom web apps integrated to CRM via iframe, SiteMap, or Ribbon Action, the user will already be authenticated via either CRM's internal or external realm. Thus, a SAML assertion will have been established regarding authentication context before the user even enters the authentication pipeline of your application. When the IdP receives the authentication redirect request from your web app, it will attempt to use an issued security token for a federated RP as proof that a security token can be safely issued for the requesting RP without requiring a separate submission of credentials by the user. If the authentication context assertion on the previously issued token(s) doesn't apply to the authentication method being employed for the current request, the IdP will ignore the token(s) and attempt to gather the user's credentials before issuing a token for the current RP.

How does this translate to the user experience for your integrated application? Without ensuring that the IdP leverages the same authentication method as was used when authenticating for CRM, the user will encounter an unexpected prompt to supply credentials. If accessing CRM via the external (IFD) URL, this could mean that the user encounters an integrated windows authentication dialog or vice versa depending on the IdP's configuration.

Is configuration an option?

You could specify a URI value for the authenticationType attribute on the wsFederation configuration element in web.config. This will cause all sign-in requests from your RP application to include the 'wauth' parameter using the specified URI. If your CRM deployment only supports one of the two claims-based authentication methods, you may find this acceptable. Otherwise, a programmatic approach to conditionally specify the 'wauth' assertion is your best recourse.

How do I make conditional 'wauth' assertions in the sign-in requests from a relying party web app?

Fortunately, you can reliably handle either authentication scenario without requiring major surgery to your application. You need to first intercept the sign-in request being issued by your application before the user is redirected to the IdP. This can be accomplished by implementing a handler for the WSFederationAuthenticationModule (WS-FAM) RedirectingToIdentityProvider event. Next, within the event handler, you need to determine the appropriate authentication method and conditionally assign the 'wauth' parameter value on the intercepted redirect request. The conditional assignment can occur based on an inspection of the referrer URL hostname to determine if the user accessed CRM via IFD. Without further ado, let's dive into the code:

Pre-requisite(s): The recommendation below assumes that you configured your CRM deployment for claims authentication, have a working knowledge of the basics, and configured WS-FAM for your application. If not, the SDK provides a walkthrough that I recommend you review before proceeding.

In your ASP.NET web application project, add or open the Global application class (Global.asax.cs) file and reference two Windows Identity Foundation (WIF) namespaces.

using Microsoft.IdentityModel.Web;
using Microsoft.IdentityModel.Web.Configuration;

Find the Application_Start event handler and register a new handler for the WIF ServiceConfigurationCreated event.

/// <summary>
/// Handler for application Start event: 
/// register handler for WSFAM ServiceConfigurationCreated event
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_Start(object sender, EventArgs e)
{
    FederatedAuthentication.ServiceConfigurationCreated +=
        new EventHandler<ServiceConfigurationCreatedEventArgs>(FederatedAuthentication_ServiceConfigurationCreated);
}

Implement the WIF ServiceConfigurationCreated by registering an event handler for the WS-FAM RedirectingToIdentityProvider event.

/// <summary>
/// Handler for WSFAM ServiceConfigurationCreated event: 
///  register handler for WSFAM RedirectingToIdentityProvider event
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <remarks>
/// IMPORTANT: Must register other WS-FAM event handlers 
/// after configuration has been created
/// </remarks>
void FederatedAuthentication_ServiceConfigurationCreated(object sender, ServiceConfigurationCreatedEventArgs e)
{
    FederatedAuthentication.WSFederationAuthenticationModule.RedirectingToIdentityProvider += 
        new EventHandler<RedirectingToIdentityProviderEventArgs>(WSFederationAuthenticationModule_RedirectingToIdentityProvider);
}

Finally, implement your WS-FAM RedirectingToIdentityProvider event handler. First, compare the CRM Organization name provided as a contextual querystring parameter to the first segment of the referrer's hostname. If there is an exact (case-insensitive) match, it's safe to assume that the referrer origin is external (IFD). In that case, specify the SAML username/password AuthenticationType URI on the SignInRequestMessage. Otherwise, we'll assume the origin was internal and specify the integrated windows authentication type URI.

/// <summary>
/// Handler for WSFAM RedirectingToIdentityProvider event: 
/// infers SAML auth context (wauth) based on referrer URL scheme
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void WSFederationAuthenticationModule_RedirectingToIdentityProvider(object sender, RedirectingToIdentityProviderEventArgs e)
{
    //Assuming this is a CRM embedded app, auth context can be inferred by inspecting CRM referrer URL
    var referrer = HttpContext.Current.Request.UrlReferrer;
    var orgName = HttpContext.Current.Request.QueryString["orgname"];

    //If referrer exists and OrgName query string param is found, attempt to infer SAML auth context
    //Otherwise, let ADFS determine appropriate auth context
    if (referrer != null
        && !String.IsNullOrEmpty(orgName))
    {
        //If the OrgName matches the first sub-domain of the referrer host, 
        //assume external claims (IFD) auth context (User Name/Password)
        //Otherwise, assume internal claims auth context (Integrated Windows)
        if (referrer.Host.Substring(0, referrer.Host.IndexOf("."))
            .Equals(orgName, StringComparison.OrdinalIgnoreCase))
        {
            //Set 'wauth' request param to SAML User Name and Password authentication context
            e.SignInRequestMessage.AuthenticationType = "urn:oasis:names:tc:SAML:1.0:am:password";
        }
        else
        {
            //Set 'wauth' request param to SAML Integrated Windows authentication context
            e.SignInRequestMessage.AuthenticationType = "urn:federation:authentication:windows";
        }
    }

After you've deployed your updated web application, be sure that your hooks into CRM receive contextual details including the Organization name via querystring parameters. Find details specific to your scenario here:

Stay tuned for follow-up posts that continue the discussion of Single Sign-on between custom web apps and Dynamics CRM 2011. For now, let us know about similar scenarios you've faced, general questions, or issues with the recommended solution presented by commenting below or contacting our team directly. We look forward to hearing from you!

 

M. Austin Jones

Follow the conversation:
@maustinjones
@pfedynamics | http://www.pfedynamics.com

Viewing all 463 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>