Conditionally show a button based on the selected record in a subgrid

Haven't you ever wondered why the "Activate" button is still visible after you have selected an (already) active record? Well, I certainty did. For me, this is a clear example of bad user experience. Having both buttons available makes no sense and it can only bring confusion. In this case it would be better to either show the … Continue reading Conditionally show a button based on the selected record in a subgrid

Reactivate entity key is only supported for failed job

You might face the situation where the creation of an alternate key does not seem to do its job. It remains in the pending state: When trying to reactive the key: The system throws an exception saying "Reactive entity key is only supported for failed job": So, let's take a look at the linked system … Continue reading Reactivate entity key is only supported for failed job

Overwrite customizations when deploying a patch solution

Solution segmentation has greatly improved since Dynamics CRM 2016. You are able to deploy small fixes to your production environment by the use of a patch solution. This reduces the risk of unintentionally modifying objects on the target deployment. More information and getting started with patch solutions can be found on msdn. Unfortunately an important … Continue reading Overwrite customizations when deploying a patch solution

Custom column width in a CRM view

When creating a CRM view you can define the column width of each column (in pixels). The column properties editor gives you a few (limited) set of possibilities. You can find yourself in the situation where the pre-defined column widths don't suffice. Maybe you want to make the column width bigger than 300px? Now, can we? … Continue reading Custom column width in a CRM view

Debug your custom code (plug-ins & custom workflow activities) using the plug-in profiler

I'm a big fan of unit testing your custom code to prevent errors from ever occuring in the system. However it is not unlikely that QA can still report an issue that is related to your custom code. You will have to ask QA for a replication log, the replication log should describe the specific steps … Continue reading Debug your custom code (plug-ins & custom workflow activities) using the plug-in profiler

LINQPad and Dynamics CRM

I recently came across a program called LINQPad and decided to give it a try. What is LINQPad LINQPad is a software utility targeted at Microsoft .NET development. You can use the tool to write C# code without the need for an IDE (Visual Studio for example) and quickly prototype your code. On their website they state: Put … Continue reading LINQPad and Dynamics CRM

Retrieve linked record fields using a single query in C#

Image you have an entity record and you would like to retrieve properties of some related entities. You can accomplish this in C# by using the LinkedEntities property of a QueryExpression. Let's take the following example, we have a 'zen_career' record which is linked to a contact record which is in turn linked to an owner record. We would like to retrieve … Continue reading Retrieve linked record fields using a single query in C#

Update status (statecode & statuscode) of a CRM record using C#

Prior to Microsoft Dynamics CRM 2015 (update 1) we had to use special messages when updating special fields. Those special fields include the record’s status (statecode, statuscode), the owner of the record (ownerid), etc. The full list of those special messages can be found on msdn, here. Now since those special messages are deprecated we … Continue reading Update status (statecode & statuscode) of a CRM record using C#

Plugin Registration Tool: Could not load file or assembly

When registering a new assembly in the Plugin Registration Tool you might encounter the error "Could not load file or assembly". The reason you are receiving this error message is because the file is blocked. When downloading dlls from external recources, Windows might automatically block the file(s) as a security measure. When you are sure the file … Continue reading Plugin Registration Tool: Could not load file or assembly

Create record with related record(s) in a single request using C#

Creating a record in Microsoft Dynamics CRM using C# is pretty straightforward. When you try to create a record together with some related records in the same request, you should use the RelatedEntities property of the parent entity (msdn). The RelatedEntities property requires the relationship name and a collection of entities. To acquire the correct relationship name you should check your customization: … Continue reading Create record with related record(s) in a single request using C#