Dynamics CRM: Extensions to Improve IOrganizationService

Dynamics CRM: Extensions to Improve IOrganizationService

I’ve become a big fan of extension methods over the years to make my development work in Dynamics CRM, easier to implement and easier to read (i.e., easier to support.) Extension methods allow us to, exactly as the name implies, extended an existing class or interface with new methods - its a simpler version of implementing a derived class. Anyone familiar with developing .NET code for Dynamics CRM will be familiar with the IOrganizationService interface and its varied implementations. While in most cases I’m a fan of implementing my own version of IOrganizationService, often for code-base simplicity I’ll rely on some extension methods for my code. ...

May 26, 2015 · 2 min · Nicolas Nowinski

Dynamics CRM: FetchXML to Retrieve Access Team Members

The very smart folks over at PowerObjects recently posted a blog article on how to retrieve the membership of an Access Team using SQL. When working in CRM Online or when we need to use the query for a view we have to make our SQL statements work as FetchXML. Here is the FetchXML that will retrieve Access Team members. You can edit it for the desired entity and place filtering as appropriate. In this case, we are retrieving all the Opportunity records and User records for the Opportunity Sales Teams (CRM’s default OOTB example of Access Teams.)

May 19, 2015 · 1 min · Nicolas Nowinski

Duplication Instead of Automation: Retailers Need Dynamics CRM

This evening I was at a major national electronics retailer to purchase a new television. I recently moved into a new place and needed a television sized appropriately for the room (and, my old television being plasma, something that would run cooler to save money on air conditioning.) There was a very nice sales person - not too much pressure (and, being honest, didn’t know much about televisions) but there to help when I needed it. I had already done some research and really just needed to see a few models side-by-side to make a final decision. It probably didn’t take me more than thirty minutes to decide which television I wanted, at which point the sales person sprung into action. ...

April 8, 2015 · 3 min · Nicolas Nowinski

Dynamics CRM and ILMerge: The Easy Way to Merge DLLs for Plugins

Being able to use external DLLs in Dynamics CRM plugins is challenging but doable. Most people who have been doing development on the Dynamics CRM platform for any period of time know that it is not enough to simply reference the DLLs in Visual Studio - you must somehow make them available to run on the server - this can range from mildly annoying to impossible (if you using CRM Online.) ...

February 2, 2015 · 7 min · Nicolas Nowinski
Uber Event/Complex Location Pickup

Uber Event/Complex Location Pickup

This is a product idea I have for Uber. I’m hopeful they will, one day, implement it. Intent Allow users to better understand and communicate pick-up locations at complex locations (stadiums, airports, conference centers, etc.) and special events (Super Bowl, Golf Tournament, etc.) Reason In many of these instances it is very difficult for a requestor to understand and communicate their location to the driver in a manner that is consistent with the vehicle pick-up regulations. ...

June 7, 2014 · 3 min · Nicolas Nowinski

Dynamics CRM: SQL to Get CRM Metadata in 2011 & 2013

Occasionally, I need (or want – depending on your preference) a list of all the attributes (basic CRM metadata) in a Dynamics CRM organization. While there are several ways, including some great document generators, that will get such a list for you, SQL is always an option. If you are on-premises, or working in a developer VM, you can run this query against a CRM organization database to get the basic details. It can also be used as a starter for more complicated metadata query requirements. SELECT en.LogicalName , en.ObjectTypeCode , att.LogicalName , typ.Description , typ.XmlType FROM MetadataSchema.Entity en JOIN MetadataSchema.Attribute att on en.EntityId = att.EntityId JOIN MetadataSchema.AttributeTypes typ on att.AttributeTypeId = typ.AttributeTypeId ORDER BY en.LogicalName , att.LogicalName

March 26, 2014 · 1 min · Nicolas Nowinski

Dynamics CRM: Custom Entity Forms Specific to Users

Recently a question was asked about creating forms and specifying a default form in Dynamics CRM that was limited to specific group of users. The original question and answer are available on Stackoverflow. Stackoverflow is a great site for asking and getting answers to your Dynamics CRM questions. You already have a default form for the entity that is used by all users (All Users). You want to add an additional form to that entity that is only available to some of the users (Select Users). All Users are currently assigned a security role that gives them the necessary access to the system. ...

March 10, 2014 · 2 min · Nicolas Nowinski

Error 20000009 on Windows Update - Windows Server 2012

I was recently attempting to install SQL Server 2012 SP1 (KB2674319) via Windows Update on a VM. This is a Dev VM - specifically a new one I had built for working with SharePoint 2013 & CRM 2013. Nice new environment: Windows Server 2012, Visual Studio 2013, ReSharper 8, Dynamics CRM 2013, SharePoint 2013, and even Office 2013…heck 2013 is sounding like a great year! Anyway, while letting Windows Update install SQL Server 2012 SP1 I kept getting the dread red install failure and an error 20000009. I did several searches but couldn’t find anything. I performed a repair on SQL Server 2012 using the install media - still no luck. It was only went I back that next day and tried to copy a large file that I received an out-of-space error. ...

November 23, 2013 · 1 min · Nicolas Nowinski
Using LINQPad for Dynamics CRM Development

Using LINQPad for Dynamics CRM Development

You are likely already familiar with the excellent development tool LINQPad and if you are a Dynamics CRM Developer you, hopefully, are familiar with LINQPad Plugin for Dynamics CRM. Using LINQPad along with the LINQPad CRM Plugin is a great way to learn the ins and outs of writing LINQ queries for Dynamics CRM. In this article I will show you how, with just a minimal of effort, you can start using LINQPad to directly call Dynamics CRM. This will allow you to go beyond just building LINQ queries and execute code to test Request/Response messages, QueryExpression retrieval, FetchXml, and much more. Using LINQPad allows you to test and learn in real-time without waiting to compile your code and execute your test cases (if you even have test cases! You do have test cases, right?) ...

November 1, 2013 · 7 min · Nicolas Nowinski

Dynamics CRM 2011: Prep Plug-in for XrmToolbox

Originally published at http://goo.gl/bkewP1 ​I can’t really take a lot of credit for this post. All of the difficult work was done by a couple of Dynamics gurus. XRM Prep Plug-in This is a plugin for XrmToolBox (http://xrmtoolbox.codeplex.com/) by Tanguy Touzard. Great thanks to Tanguy for releasing XrmToolBox and providing really solid documentation on how to create Plug-ins for it. XrmToolBox and his numerous other very useful Dynamics CRM tools, which all now run in XrmToolBox, are a great value to the Dynamics CRM community. The idea, implementation logic, and solution file that are the basis for this plug-in are the work of Marc Schweigert from Microsoft. His excellent blogging has been the source of great education for me about how to get the most out of Dynamics CRM. The XRM Starter solution file and the code were published by him in the blog post linked to below. http://blogs.msdn.com/b/devkeydet/archive/2013/01/22/getting-a-new-crm-2011-organization-ready-for-xrm.aspx You must install XrmToolBox on your machine to use this plug-in (http://xrmtoolbox.codeplex.com/). After installing XrmToolBox copy the Procetrnix.CleanForXRM.Dll file to the same directory that XrmToolBox.Exe is installed. Run XrmToolBox and you should see the XRM Prep listed as one of the modules under the Home tab. This plug-in is intended to be used against a new Dynamics CRM organization prior to making any customizations to prepare it for custom development, it can perform the following: - Install the XRM Starter solution file from Marc’s post. Hide the existing reports. Remove all the non-required security roles. Remove the standard dashboards. There are four checkboxes that allow you to select what all you want XRM Prep to handle for you. If you do not want the solution file to be imported you should uncheck Import Solution, etc. When you are ready click on Run in the toolbar at the top of the tab to run the process. You’ll see a status screen while the work is being done and a message box will inform you when it is completed. If you want a copy of the solution file you may download it from the link in Marc’s blog article (URL above) or you can click the Export XRM Solution File from the toolbar to export the file. The DLL exposes a public class, XrmSolutionSetup, that can be used by any .NET 4.0 code. XrmSolutionSetup has a method called Execute that expects to be used as the delegate for BackgroundWorker.DoWork. Thus, this code could be reused in another solution if you did not want to use XrmToolBox. One idea would be to implement this in a console application or PowerShell script that deployed and configured a new organization to start development. Here is the plug-in DLL: http://sdrv.ms/11pTAIn If you want to modify it for your own purposes or just see how it was implemented here is the source:http://sdrv.ms/11pTMaB No guarantees or anything…the source code is there so make it do what you want it to do. I hope this will help you speed up development work and inspire a couple people to make use of the great platform that Tanguy has given us with XrmToolbox.

January 31, 2013 · 3 min · Nicolas Nowinski