Category Archives: MS CRM 2015

Get contact based on name and it’s BU- Sample Code

If you got requirement to get contact record based on it’s full name and it’s business unit name, this sample code will help you. Sharing following sample code to get contact using Query Expression. Hope it will help someone !!

SystemUserAccessMode is not either of (NonInteractive, SetupUser)

While creating work order record, I got following error: “Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The user with SystemUserId=2….. in OrganizationContext=5…… is not licensed, and its SystemUserAccessMode is not either of (NonInteractive, SetupUser)……..” First thing I checked if the current user Access Mode is not set to Administrative or non-interactive as the error message was saying, but it was… Read more »

Query intersect entity and it’s attribute- Sample Code

Introduction When we setup system N:N relationship between two entities an intersect entity is created internally, which is not accessible directly. Let’s say we have N:N relationship between case and workorder entity. And if you will try to see attributes of this entity, you will find following attributes So in case we want to query this entity, we need to… Read more »

No Code solution for Filtering Subgrid based on the Lookup

There is a common requirement to filter subgrid based on the lookup field, but there is no easy way to implement it without writing code. In this post I am going to discuss a quick workaround to implement this requirement. Let’s see how we can implement this. Requirement: We want to show marketing list for accounts in contact form based… Read more »

Implementing Duplicate Detection using Keys

Dynamics CRM contains duplicate detection feature, if want to know about this feature you can check here. This feature can be enabled for multiple operations for example, we can see different options under duplicate detection settings below: These setting work differently based on operations for example if user will try to import data to respective entity for which you have duplication detection rule… Read more »

Re-adding accidently deleted statusreason option- Quick Tip

Requirement: Have you been in a situation where you accidently deleted status reason option from quote entity and now want to add it back as soon as possible?? If yes then this article is going to help you. Solution: While adding options to option set, it’s value is generated automatically based on the option value prefix (You can find this… Read more »

Track Security Role Changes using Auditing

Requirement: Track security role changes in Dynamics 365/CRM or earlier versions. Have you been in a situation where client is complaining about sudden access to unwanted entities/not required for their process or suddenly they are not able to perform some set of actions? If yes this article is going to help you. Solution: This is very common in CRM implementation… Read more »

Form and Fields Notification in Dynamics 365 Part 1

Dynamics 365 provides different ways to implement client side notifications, we can implement them in different level. In this article we are going to provide different methods which can be used to work with notifications. setNotification This method is used to work with individual control over entity form. We can make use of this method to implement our client side… Read more »

Using PickFromQueue in Dynamics CRM -Sample Code

I saw one question in CRM community forum today where user was looking for help to use PickFromQueue message, so I thought of writing sample code for the same, so that it can help others as well. Let’s first understand the message, why we need it. As name suggests this message is used to pick item from queue and used… Read more »