Microsoft publishes CRM SDK in NuGet (Visual Studio)

CRM SDK is now also available from the Visual Studio extension NuGet. This extension is a provider of third party packages where anyone can participate and publish their own ones. This makes very easy to add third party assembly references.

  • Install NuGet in Visual Studio from “Tools => Extensions and Updates”

  • Once NuGet is installed, create a Visual Studio Project (a library for example) and make right click on the Visual Studio project where the CRM SDK assemblies will be used. Select “Manage NuGet Packages…”

  • Choose the Online option on the left menu and search for “crmsdk“. A list with all the CRM SDK assemblies published by Microsoft will be presented. Choose the corresponding assembly based on its version.

In this case, I have installed the CRM 2013 assemblies:

  • Notice the new package and reference configuration linked to the project:
    • packages.config” file in the project where the NuGet packages have been installed

    • New folder with the assemblies in the root solution folder. You can find the assembly file within the package folder. In this case, the new CRM 2013 SDK package contains two assemblies, see below:

    • New library reference have been added automatically to the chosen project:

[Online Team Foundation Service] Icons are missed in the buttons

FIXED!

Last week I noticed many of the icons in the buttons of our Online Team Foundation Service have been disappeared. This issue only happens with IE 10. I have tried the compatibility mode but no difference.

Workarounds:

  • It works fine with Chrome (28.0.1500.95).
  • Turn on Internet Options -> Advanced tab -> Use Software Rendering in IE

See more information about this bug here:

http://connect.microsoft.com/VisualStudio/feedback/details/800974/online-team-foundation-service-icons-are-missed-in-the-buttons

Local DateTime CRM Online SSRS Report

Local DateTime in UK could get a bit tricky because of the summer time, where it is one hour less in UTC time.  This post will help you to find out the local Date.

There is a simple solution for this: Use the date only field from the dataset. When the CRM date attribute (e.g. “MyDate”) is declared in the Fetch XML query of your dataset, you get two SSRS fields in that dataset: MyDate and MyDateValue. The first one is a date only field in local time, so you can do something like Fields!MyDate.Value. The second one is a datetime field in UTC time. You are probably interested in the first one ;)

If you also want to force a UK time format, you can use the next expression:

=iif(IsNothing(Fields!MyDate.Value),

Nothing,

CDate(iif(IsNothing(Fields!MyDate.Value), 1, Mid(Fields!MyDate.Value, 4, 2)) &

“/” & iif(IsNothing(Fields!MyDate.Value), 1, Mid(Fields!MyDate.Value, 1, 2)) & “/” & iif(IsNothing(Fields!MyDate.Value), 1, Mid(Fields!MyDate.Value, 7, 4))))

Just to say thanks to my colleague Mario (@mtcantero // http://crmandcoffee.wordpress.com/) for his input in this article.

9th to 13th September, join the MVP community in London for a ‘real world’ look at the Microsoft Cloud OS

Image

Monday 9th September at the Microsoft Office, Victoria, London

Join leading MVPs for a two track one day event that tackles the delivery of Enterprise data platforms and analytics solutions.

Please register to attend either track 1 or track 2:

·         Track 1 will focus on building of an enterprise data platform exploiting both cloud and on-premises technologies. We will also talk about how to handle structured and unstructured data, along with integrating a range of Microsoft and non-Microsoft technologies to tackle architecture, process and governance issues.

Register to attend

·         Track 2 will focus on the creation of Business Intelligence and advanced analytics solutions that utilise both structured and un-structured data. We will demonstrate the use of data mining and predictive analytics technologies and also demonstrate how advanced visualisation technologies can be used by business users to deliver the insight and action required to drive real value from data.

Register to attend

Tuesday 10th September at the Microsoft Office, Victoria, London

Join leading MVPs for a one day event to assist management and virtualization experts to understand the advances in the modern datacentre.

 Each session will demonstrate how to:

·         Deliver best practices with Windows Server 2012 R2 and System Center 2012 R2

·         Lower costs through effective management of VMware and Hyper-V

·         Enable management of datacentres of any size!

·         Drive automation of complex applications with service templates

Register to attend

Wednesday 11th September at the Microsoft Office, Victoria, London

Join leading MVPs for a one day event focusing on technology that make up the Microsoft Integration Platform.  Allowing organisations to leverage a combination of cloud and on-premise applications through the hybrid integration pattern.

 Sessions will include:

·         Windows Azure Service Bus

·         Windows Azure BizTalk Services

·         Microsoft BizTalk Server 9both on-premise and cloud Virtual Machine

 Register to attend

Thursday 12th September at the Microsoft Office, London, Victoria

Join leading MVPs for a one day event to understand how to manage your client devices in a single tool while reducing costs and simplifying management. Best of all, you can leverage your existing tools and infrastructure.

Sessions will include:

·         Helping with data security and compliance

·         Unified device management

·         What powers people-centric IT with Cloud OS?

·         Real World customer examples

Register to attend

Friday 13th September at Microsoft Office, Victoria, London

The explosion in devices, connectivity, data and the Cloud is changing the way we develop and deliver software.  New infrastructure services permit existing server applications to be “lifted & shifted” into the Cloud.  Attend a one day event to hear from MVPs about how Microsoft’s data platform and development tools enable you to develop, test, and deploy applications faster than ever.

Sessions will include:

·         Infrastructure services,

·         Media services,

·         Service Bus  &

·         Mobile services

 Register to attend

Microsoft Developer Network

Microsoft Developer Network has just launched. Microsoft wants to enhance the experience to add better support for the growing number of developers that are embracing Microsoft’s platform and technologies for the first time.

There were a few goals Microsoft targeted with the Microsoft Developer Network experience:

  • Simple:   The new Microsoft Developer Network site is designed to help developers easily find information and get started with Microsoft more effortlessly.  They heard from the community that finding the right information, often spread between different locations, could be challenging.  The Microsoft Developer Network addresses that feedback by providing a single point of entry for all developers.
  • Relevant: They want to meet developers where they are and talk with them on their terms.  With the Microsoft Developer Network, an iOS developer, for example, can quickly understand the opportunity available from our platform and then easily navigate to the educational or technical content he needs to get started.
  • Community Driven: Microsoft has an incredible developer ecosystem, and they wanted to provide even more opportunity for the community to engage with them and with each other.  They designed the Microsoft Developer Network with that in mind, creating a “Perspectives” section with community blogs, an integrated social feed, and a “Connect” area that allows developers to tell their stories, get advice and connect with them directly.

The site launch happened last week for English-based geographies, but this is just the beginning of a phased worldwide launch.   Expect to see the global launch roll out over the next few months!

Check it out and let them know what you think.  http://developer.microsoft.com

I have read “Microsoft Dynamics CRM 2011 Reporting”

Reporting is already a fundamental pillar for many companies and senior management. It brings the ability to understand key factors of the business such as the volume of opportunities, revenue and performance. The book Microsoft Dynamics CRM 2011 Reporting is a useful technical guide which delivers a simple and clear overview of the available reporting options within the platform Microsoft Dynamics CRM.

Microsoft Dynamics CRM is a flexible business solution based on SQL server that provides different and several reporting capabilities. Business users can create their own reports without real technical knowledge. At the same time, more complex designs can be implemented by developers or technical administrators using known Microsoft tools like Visual Studio or Report Builder. The author of the book, an experienced Microsoft MVP, have captured all this reporting functionality within the same.

The book follows an intuitive structure, explaining how to create simple reports using the Report Wizard of Dynamics CRM and covering basics technical aspects like SQL and Fetch XML. Gradually, it introduces more complex implementations using SQL Server Reporting Services, integration with web resources and generation of reports using other technologies such as ASP.NET or Silverlight. Finally, the book offers a couple of interesting chapters related to Failure Recovery, Best Practises and Mobile reporting, which are very important aspects for enterprise implementations.

Other basic reporting features like Charts and Dashboard are also mentioned in the book. However, a topic which is not included in the book is the Export to Excel feature. With Dynamics CRM, users have the ability to create custom views and queries that can be exported to Excel. This is a very useful functionality, especially considering that many users are already familiar with Excel and its report capabilities.

Personally I have enjoyed reading Microsoft Dynamics CRM 2011 Reporting. It is a helpful reference I would recommend for new Dynamics CRM users and developers. It contains many images and screenshots that make very easy to understand and follow Damian Sinay’s explanations.

[CRM Online] Avoid attachments using a plugin and weird exception messages: The specified domain does not exist or cannot be contacted. An unexpected error occurred from ISV code

Writing a simple plugin to avoid attachments in Dynamics CRM Online, I have seen weird exceptions messages.

Note: Using Dynamics CRM 2011 Developer Toolkit from CRM 2011 SDK

Find all the code of this example and the CRM solution here

Initially, this is the code of the plugin linked to “annotation” in the Create and Update events (shown just the execute method):

image

Now, let’s try to attach a new file:

image

In this case, where an unknown error will happen, I could expect a message similar to this:

image

Notice I would be able to retrieve traces and see more information.

However, instead of that message, I am getting this other weird error without any trace or useful information: “The specified domain does not exist or cannot be contacted. An unexpected error occurred from ISV code”

image

To improve this message, I have had to add a try-catch, encapsulate that unexpected exception and throw an InvalidPluginExecutionException:

image

And now I get the next message:

image

As you can see, this message is a bit more friendly, but it is not yet the usual desired message we would like seeing with traces, something like this:

image

 

Conclusion:

Exception messages in attachments for the annotation entity seem to behave differently compare to what we have seen in other entities. Use InvalidPluginExecutionException correctly to guarantee the best result.

Other advices/ideas:

If you are using CRM 2011 Developer Toolkit, Plugins inherit from Plugin class. You can improve the error handling in this base class and customise the traces and error logs in the way you better want.

[CRM 2011] Insufficient permissions

Trying to create a Case (incident) and I was getting the familiar message “Insufficient permissions… contact your administrator”:

Insufficient Permissions

My security role seemed to be fine, I got enough permissions to create, update, read,… the case entity. But, the initial error message didn’t help me at all to understand what I was missing.

Then, I just released the details of the error and the reason of the same were in the URL :) :

https://org-name/_common/error/errorhandler.aspx?BackUri=https%3a%2f%2fredbank4.crm4.dynamics.com%2fmain.aspx&ErrorCode=0x80040220&Parm0=%0d%0a%0d%0aError%20Details%3a%20Principal%20user%20%28Id%3dcc0a77bb-d792-e211-b15e-b499bafdbeda%2c%20type%3d8%29%20is%20missing%20prvReadSubject%20privilege%20%28Id%3dd5d40a46-b459-438b-941e-d55691bf0827%29&RequestUri=%2fmain.aspx%3fetc%3d112%26extraqs%3d%253f_gridType%253d112%2526etc%253d112%2526id%253d%25257b2ABE0394-E875-E211-B10A-B499BAFDBEDA%25257d%2526pagemode%253diframe%2526preloadcache%253d1365599628453%2526rskey%253d846695103%26pagetype%3dentityrecord&user_lcid=1033

Exactly, in this case I was missing the read permission in the Subject entity

Hope it helps!

I’m presenting at eXtremeCRM 2013 Rome

eXtremeCRM 2013 Rome is the Can’t-Miss Conference

for Microsoft Dynamics® CRM Partners

There is no place like eXtremeCRM 2013 Rome. eXtremeCRM is the hub where Microsoft Dynamics
CRM partners come together to forge business relationships, gain knowledge from real-world experiences and dive deep into current and future technologies. For Microsoft Dynamics CRM partner organizations, it is the annual conference to attend to nurture best practices, facilitate business growth, and educate each organization member. The highly anticipated conference will be held in Rome, Italy, 3 – 6 February, 2013.

eXtremeCRM offers role-specific tracks for every member of the partner business. Over 50 sessions are available to those in positions of sales, implementation and development. eXtremeCRM continues its deep focus on technical depth and app development this year and continues its commitment to helping partners grow. To this end, business leaders are invited to attend the eXecutive Summit being held at eXtremeCRM, a workshop-style event that will address key CRM business leadership issues.

With its specialized content and enhanced technical focus (which includes the eXtreme App Challenge), all presented by industry leaders, experts, and innovators, eXtremeCRM 2013 Rome is the investment every partner organization should make.

And, like never before, Microsoft Dynamics will make a BIG splash at eXtremeCRM 2013 Rome. As a corporate sponsor, they have communicated that eXtremeCRM will be their #1 platform to share the latest Microsoft Dynamics CRM strategies and investments with partners.

Here are the sessions I will be presenting:

Dynamics under Control: Testing Microsoft Dynamics CRM from a 360 View

This session will show you how to easily test your Microsoft Dynamics CRM deployment at the different stages of the development lifecycle. It will cover all angles from designing your code for testability, unit, integration, performance, end-to-end and manual testing. It will introduce you to all the required tools, frameworks and processes you need to create and automate your tests through real life scenarios and practical demos. Demos will showcase the latest technologies such as Visual Studio 2012, TFS 2012, Microsoft Fakes & Test Manager 2012. This session will help you to increase productivity and quality while reducing risk and cost, thus resulting in happy developers and customers through successful deployments.

Building a Windows 8 App

In this session we will create from scratch a Windows 8 Modern UI application to solve the needs of a fictional company field service representative. The focus of the talk will be to demonstrate the powerful and yet easy to create user experiences that Windows 8 can deliver for Line of Business Applications. During this practical session we will create a complete working example of a Windows 8 App connected to Microsoft Dynamics CRM and talk about some of the amazing possibilities that this new Windows era offers to Microsoft Dynamics.

There are a number of other session offerings I am looking forward to attending. For more information about eXtremeCRM 2013 Rome’s agenda and to register, visit eXtremeCRM 2013 Rome.

Get eXtreme in Rome!

[CRM 2011] Intermittent RetrieveMultiple error: Index was out of range. Must be non-negative and less than the size of the collection

Few weeks ago, I faced an interesting intermittent issue using the CRM Service, specifically with the RetrieveMultiple message. Basically, there was a WCF service wrapping the CRM Service and eventually we were getting the same issue you can find in this MSDN CRM forum post

 After some deep investigation, it turned up to be a thread safe issue related to the way IServiceConfiguration and IServiceManagement are shared internally in the CRM libraries. IServiceConfiguration is not safe thread. Another important point to be considered was the early-bound types, which are not guarantee to be thread safe. (See http://technet.microsoft.com/en-us/library/gg326004.aspx).


Finally, a simple solution for this issue was to change the connection configuration:

CrmConnection crmConnection = new CrmConnection("myCRMConnection");
crmConnection.ServiceConfigurationInstanceMode = ServiceConfigurationInstanceMode.PerInstance;
using (CRMContext serviceContext = new CRMContext(crmConnection))
{

}

ServiceConfigurationInstanceMode.PerInstance is the key

Related to this topic, I recommend reading the new section Best Practices for Developing with Microsoft Dynamics CRM 2011, which is part of SDK 5.0.12 and newer ones.

Follow

Get every new post delivered to your Inbox.