Dynamics 365 – You do not have {0} permission to access {1} records on Qualify Lead

by Ritchey Hazeu

When you try to Qualify your Lead your Dynamics 365 will quite often encounter the error: “You do not have {0} permission to access {1} records”

In our case the user did not have access to the Sharepoint Document Location entity. Also known as: the Document Location entity, which can be found in the Core records tab on the security role.

You can find which privilege your user is missing by clicking the F12 button and read the error message from the console!

Dynamics 365 – Edit button on Subgrid

by Ritchey Hazeu

If you’re missing the Edit button on a subgrid it is probably not related to the edit privilege of the entity you are trying to create.

After some research I found out that it is related to the Bulk edit privilege on the security role, which can be found in the Business Management tab:

After adding this privilege you can find the Edit button in your subgrid:

Hopefully this post will save you hours of searching!

Dynamics 365 – How to setup Email to Case management with the new ARCUR (Power Automate flow)

by: Ritchey Hazeu & Robin Schaareman

1. Setup Mailboxes

Since we were going to connect multiple mailboxes to CRM there were several options on how to do that. We chose for the option to make an Exchange Online Rule to send all incoming e-mails to one leading e-mailbox. This mailbox will receive all the e-mails of all the connected (functional) mailboxes and this leading mailbox is connected to Dynamics 365. We choose to go for one leading mailbox because you only need to setup your configurations once, instead of a unique configuration for every mailbox.

1.1 How to set up a mailbox in Dynamics 365

When connecting the mailbox make sure you got Exchange Online admin rights or Office 365 admin rights (or connect with someone who got them instead).

When creating the mailbox make sure you use the below options:

When you’re done creating the mailbox, Save, click on Approve email, after approval click on Test & Enable mailbox. The status should go to Succeeded….

If you’re forwarding a mailbox to the leading mailbox with a lot of historical data you also got the possibility to choose for a particular time to sync. This can be found in the Email Server Profile, advanced tab (sorry for the Dutch language😉):

Don’t forget to create mailboxes for outgoing email traffic. Follow the same steps as above but only select Email router for outgoing email. Users will be able to select this outgoing mailbox (connected to a queue) when creating emails.

2.ARCUR and Routing rules

The new ARCUR is being managed by a Power Automate flow (actually 2 flows) which you can create from the ARCUR data record. Within this Flow you can execute all sorts of conditions to convert the email to a case and if this is not possible place the email in the right queue.

When a case record is created from the ARCUR flow we wanted to let the routing rules decide which queue it should enter. Therefore, we placed the email addresses (To and CC) in the e-mail field on the case so the Routing rule can pick it up and route it accordingly.

One of the most important things we’ve implemented was to extract the CC email from the activity party entity related to the email record, since the out of the box activity party was not working properly in Flow.

It should look similar to the following:

After that you can place the Cc email string variable in the creation of the Case, together with the To field. The routing rule will do it’s work accordingly.

3.Lessons Learned

Since we went live, at first with a pilot of 1 e-mailbox and later on we connected more e-mailboxes, we faced some issues/situations which we need to monitor more closely or improve on next time we connect an e-mailbox.

3.1 Tracked to Dynamics (undeliverable)
We noticed that no new e-mails were coming into Dynamics 365 anymore. We checked several things and saw that our “dummy” e-mailbox was receiving all the e-mails of the connected e-mailboxes but they were not showing up in Dynamics 365 anymore. All e-mails that were in Dynamics 365 had a label “Tracked to Dynamics 365” and all e-mails that were not tracked to Dynamics 365 had a label called “Tracked to Dynamics 365 (Undeliverable)”. After quite some research on several settings we created a ticket at Microsoft because everything was setup correctly and nothing was changed since the error occurred.

After a few calls with the Microsoft team we found out that is was a known issue on their side which had something to do with the ARCUR flow. We did not check the ARCUR flow since we thought that all e-mails should be in Dynamics 365 first for ARCUR to do something with it. Unfortunately we were wrong and ARCUR can influence the behavior of emails being tracked, or not. Simple solution/work-around for now was to disable ARCUR and enable it right away. New e-mails were coming in the system again and all seems fine.

Why this occurred has not been clarified by Microsoft yet since they still work on this issue that will prevent this*. It took some time for us to figure out that turning ARCUR off and on again would do the trick, all the e-mails that were send to the ‘’dummy’’ mailbox were not processed to Dynamics 365. To trigger this again we needed to add a field to the Mailboxes field. The field is called “Process Email Received After”. Once this field was added tot the form we could change the date to the past and it will trigger the process to track e-mails to Dynamics 365 again. 

*we will try to update this blogpost if we have more information about the error in the ARCUR flow.

3.2 Monitoring
Once we had the error that e-mails were not being processed we needed to make sure that the next time this happens we needed to be informed sooner. To be faster we need to create some monitoring that will check on the categories in Outlook, once a Undeliverable category is assigned we need a signal so we can fix it right away.

The other monitoring part is maybe an overkill but it will help to grow trust in the system. Check the number of e-mails being received on the e-mailbox vs the “dummy” e-mailbox vs Dynamics 365. These numbers should add up. Once this is not the case it needs investigation on what happened so you can act accordingly.

3.3 Delay ARCUR
Dependent on how your ARCUR flow is setup you need some delays build in to make sure an E-mail is attached to the correct Queue. In essence our ARCUR is doing the following:

  • Check if the e-mail can be converted to a case, if yes a Case is created
  • If the e-mail can’t be converted to a case the e-mail is attached to a general queue

Unfortunately, this interfered with the queues that were setup. The queues were setup that if an e-mail from Mailbox X was coming into Dynamics 365 it was going to be assigned to the queue of Mailbox X as well. We found out that some of the e-mails were in the queue of Mailbox X and some of the e-mails were in the general queue. This happened because sometimes the ARCUR was faster than the Queue itself and attached the e-mail to the general queue. In other scenario’s the queue was faster which resulted in the e-mail being attached to the queue of Mailbox X and ARCUR generating an error the there was already a queue item of that e-mail. The general queue is for e-mails that could not be attached to their correct e-mailbox queue, for example an e-mail that had the attached e-mailbox in the CC instead of the TO.

To prevent this, we made a wait condition in the ARCUR flow so it could check if the e-mail was already attached to a queue. If this was not the case ARCUR can attach the e-mail in the general queue.

3.4 Duplicate e-mail
We’ve faced a scenario where emails entered CRM accordingly, got converted to a Case, but for a particular mailbox the emails were not routed to the right queue. The Routing rules were setup accordingly but after some investigation we saw a contact person record created with the same email address as the mailbox. For CRM it’s 2 duplicate records, one queue and one contact person record with the same email. For CRM it’s impossible to decide where to route it to. So our advice is, inform users to NOT create contact persons with the same email as their own mailbox.


Eventually we managed to successfully setup Case management into Dynamics 365. We encountered numerous hick-ups during the implementation which costs us a lot of time. Hopefully you can use our blogpost in your advantage to save some precious time 😊

5 Ways to Make Digital Transformation with Microsoft Dynamics 365 Actually Work (PART II)

By Bas Bergstra

In my previous blog about Digital Transformation (‘DT’) with Dynamics 365 initially the concept of DT was briefly explained by stating that it serves strategic objectives of our customers, which can be realized with support of Dynamics 365. Next, I emphasized that DT can be applied in a variety of ways. After this introduction my blog then zoomed into two ways of making DT with Dynamics 365 work. As the title suggests, it is now time to bring in three additional best practices.

The earlier discussed way number 2 for DT with Dynamics 365 regarded the importance having strong awareness of out-of-the-box features. On the other hand, it is crucial to have your semantics in place. Besides the point of that each industry or even organization is likely to have its own jargon; once having deciphered that, you may experience another haze. Often departments, teams or groups people commonly have different interpretations for the same concept. Another challenge is that you may assume familiarity of your counterpart with concepts such as Artificial Intelligence (‘AI’) and Robotic Process Automation (or ‘RPA’), but these are still not so mainstream as you might assume. Just imagine how long it took before the term ‘Internet’ was starting to resonate with your grandparents. So before introducing more advanced Dynamics 365 functionality such as Customer Insights and Lead Scoring Models, make sure to get your audience acquainted with the underlying concepts.

Finding out the DT maturity level of your customer is an effective route to determine appropriate timing of introducing Dynamics 365 features to them. This fourth way of making DT with Dynamics 365 work also relates back to the second challenge previously mentioned in this blog. The reason is that interpretation and timing often go hand in hand. Consider an example regarding a customer service manager who currently receives a weekly report on customer complaints expecting the same from the new Dynamics 365 solution.  After finding what he perceives as a ‘report’, you realize that his requirement could be met by simply providing access to of view of cases in Dynamics 365 Service. Do this instead of overwhelming him right away with Dynamics AI for Customer Service, thus time the pace of digitally transforming their processes to support customers. Remember, Rome was not built in a day either.

The last success factor for a Dynamics 365 implementation that I would like to share here regards user adoption. DT implies change and the willingness to adopt varies per user. Roughly spoken users can be grouped into three categories, i.e. 10% very open to change (referred to as pro-change opinion leader), 10% resistant to change (alias ‘con-change opinion leader’) and the opinion of the rest (80%) is likely to be affected by the opinion leaders. With tactical involvement of the group who is in favor, you are likely to win the majority also with your demonstration of added value with Dynamics 365. So, make sure to first focus on the pro-change opinion leaders and convert them into ambassadors or advocates inspiring the 80% group.

With these 5 ways you have a head start to leverage Dynamics 365 and transform your customer’s business. Please feel free to share your experiences, so I can start improving and or extend these ways in new posts.

Link to part I of this blog.

Dynamics 365 – Transition to Unified Interface

By Robin Schaareman

Earlier Microsoft announced that in October this year (2020) cloud organizations need to be on the newest Unified Interface. Via the website https://runone.powerappsportals.com you can check what date is set for your own environments. You can postpone this date to a date which suit you and/or your organization more. Be aware that 1st of October is the deadline, after this all environments should be on the Unified Interface.

On the Microsoft website you can find a lot of information how to check whether your solution is ready for the Unified Interface. Most of the information will be about if the technical parts in your solution will still function after you transition to the Unified Interface. However this is really important it is just as important that all the end users will benefit/work with the new interface as well.

Since it has been changed a lot it is good to discuss a suitable approach to implement this feature. Via this blog I will share my approach in how I implement the new Unified Interface at a customer. It might be a standard approach but in my experience this was effective enough to bring the new feature in the organization.

  • Prepare with your team

Before you inform the users about this new feature it is important to check if your solution is applicable. If this is the case you can create a new App within Dynamics 365. This app can be used for testing all the forms etc and see how it looks. If it all looks good you can strip this new app to make the sitemap just with the minimal entities needed for sales to do their work. For example, accounts, contacts, activities and opportunities. This will be the app that will be used during a pilot period with the users. Create a separate security role so the users that will attend the pilot can access the new app.

  • Inform important stakeholders/champions

Most of the time at a customer there are some enthusiastic users which are happy to hear about new features or changes. These users can help you get a platform to all other users and make them enthusiastic as well! Get those people in a room and inform them about the new Unified Interface. Show them the benefits of the new interface (its faster than the “old” version 😉) and discuss your plan in how to implement this new feature. Important outcome in this meeting is a date and a list of users that can attend the demo/pilot.

  • Give a demo to the users + surprise pilot!

After you have set a date with the stakeholders you can give a demo to a group of users that will attend a pilot (which they don’t know yet!). During this presentation you can show the new Unified Interface and all the benefits that comes with it (tablet/mobile version etc). At the end you have a small surprise, users that want to attend a pilot can start with that right after the meeting. Show the users that they can access the new features via the new app and at all times can switch back to the more familiar interface (if they get stuck or something). Also try to explain that they work within the same database.

  • Discuss the outcome and way forward

During the pilot you need to be pro active and ask pilot users how it is going. If they found any issues or have recommendations just write them down and discuss them with your team and the other stakeholders. In the end you can facilitate a meeting with all the pilot users to discuss the outcome and which of the feedback will be implemented before the release. After that you can propose a date to go live 😊 at the beginning you can still make an app which contains the old version of the UI. For some users this can be helpful in the transition to the new UI. Like I said, pretty straight forward but in my opinion an effective way to implement the new UI. Hope this helps

Dynamics 365 – Javascript – formContext – Lock form & fields after subgrid is loaded

By Ritchey Hazeu

Hi! In some scenario’s you would like to know if there are any related records and based on this condition, lock a form or any fields (or do any other action!).

First you would like to count the related records which are present in a subgrid:

var gridContext = formContext.getControl("Gridname");// get the grid context

var count = formContext.getControl("Gridname").getGrid().getTotalRecordCount();

And you would like to run this code after the Subgrid is loaded. So you will use the gridContext and let it run on load (apart from the form).


How does this code look when you would like to lock fields?

function lockFieldsOnCount(executionContext) {

var formContext = executionContext.getFormContext(); // get the form context
var gridContext = formContext.getControl("Gridname");// get the grid context
var GridOnloadFunction = function () { 
var count = formContext.getControl("Gridname").getGrid().getTotalRecordCount();

if (count > 0){
var lockAccount = formContext.getControl("field1").setDisabled(true);

var lockContact = formContext.getControl("field2").setDisabled(true);


else {
var lockAccount = formContext.getControl("field1").setDisabled(false);

var lockContact = formContext.getControl("field2").setDisabled(false);
    gridContext.addOnLoad(GridOnloadFunction); //run onload of subgrid

How does this code look when you would like to lock a form?

function lockFieldsOnCount(executionContext) {

var formContext = executionContext.getFormContext(); // get the form context
var gridContext = formContext.getControl("Gridname");// get the grid context
var GridOnloadFunction = function () { 
var count = formContext.getControl("Gridname").getGrid().getTotalRecordCount();

if (count > 0){
formContext.data.entity.attributes.forEach(function (attribute, index) {    
var control = Xrm.Page.getControl(attribute.getName());
if (control) {
else {
formContext.data.entity.attributes.forEach(function (attribute, index) {    
var control = Xrm.Page.getControl(attribute.getName());
if (control) {
   gridContext.addOnLoad(GridOnloadFunction); //run onload of subgrid

Dynamics CRM/365 – Support lifecycle

By Ritchey Hazeu (Dynamics 365 Consultant @ Capgemini)


When you’re working for a customer which is using Dynamics CRM it’s always good to know if Microsoft still supports the current version. It depends on the Service Pack which ‘Support end date’ Microsoft applies.

For the older versions Microsoft applies 5 year Mainstream support and 5 year Extended support. Unfortunately this does not count for every Service pack. For Dynamics 365 it’s 5 year Mainstream support and 2 year Extended support.

An example: A customer is using Dynamics CRM 2016 Service Pack 1. This Service Pack has 23-05-2016 as start date and 08-01-2018 as end date. This means that, before the end date, an upgrade needs to be executed to Dynamics CRM 2016 Service Pack for Dynamics 365 (Service Pack 2).

If you want to know which End date is applied to your, or your customer’s Dynamics CRM solution, you can navigate to https://support.microsoft.com/en-us/lifecycle/search and type in the version.

Rewriting Xrm.Page

By Robin Pietens (Dynamics 365 Consultant @ Capgemini)
For those that have not yet heard: Microsoft has decided to deprecate the use of Xrm.Page.

Microsoft did indicate their understanding that this feature is used a lot, so they will retain compatibility with it for quite some time. However, new functions should be written in a way that is as future-proof as possible right? For some reason I was unable to easilly find a nice overview of what we should change to deal with this deprecation, and I decided to do something about that.

So where we used to write:

function doSomething(){
     var some = Xrm.Page.getAttribute("new_some").getValue(); 
     var action = Xrm.Page.getAttribute("new_action").getValue(); 
     console.log(some + " " + action); 


We should now do something else, and write:

function doSomething(executionContext){
     var formContext = executionContext.getFormContext(); // get formContext 
     // use formContext instead of Xrm.Page 
     var some = formContext.getAttribute("new_some").getValue(); 
     var action = formContext.getAttribute("new_action").getValue(); 
     console.log(some + " " + action); 


The other thing to do is to check the box of ‘pass execution context as first parameter’ when setting up the function on the form. If you, like me, make parameters of just about anything, simply pass them with comma’s separated from the executioncontext. Then put everything except the executioncontext in the box as comma separated parameters that will be passed to the function:


And the function itself will look like this:

function doSomething(executionContext, firstparam, secondparam){
     var formContext = executionContext.getFormContext(); // get formContext
     var some = formContext.getAttribute(firstparam).getValue(); 
     var action = formContext.getAttribute(secondparam).getValue(); 
     console.log(some + " " + action); 


Any new Scripts that you write should conform to the standard outlined in this blogpost. When making changes to existing libraries, it’s a good idea to take it into account as well. Talk the costs and benefits through with your customer, to keep them as upgrade-proof as possible!

If you want to stay up-to-date with features like this one, keep an eye out for new blogposts and follow us on LinkedIn.

For (hard to find) Microsoft references see: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/clientapi-form-context

Tips to improve User Adoption

By Robin Schaareman (Dynamics 365 Consultant @ Capgemini)

We have all probably seen a situation like this before, a customer has a Dynamics CRM/365 solution which is in use for several years but the adoption of the system is not satisfying enough. The client asks you to help improve their user adoption of Dynamics CRM/365. Improve user adoption is not an easy task. Via this article I want to give some tips/guidelines that can be used to help a customer improve their user adoption. Let’s start at the beginning….

1.Back to the beginning

To make sure you can start off with a solid solution for your client you need to take them back to the beginning. Why was CRM introduced in the first place? Did CRM solve the problem the client had? These are typical questions you can ask your customer in order to get a good picture of the situation.


2.Demonstrate the benefits

There will always be users that did not have a problem with the previous way of working and don’t see the value of the CRM system. Therefor it is extremely important to show the benefits of the CRM system. Even when the system has been live for some time it can be good to demonstrate new features or updates.


3.Involve users

Always involve the “daily” users when it comes to maintenance or development of the CRM system. Give them a voice when it comes to new features or changes in the system.  This can be done via several ways. The most important one is communicating about the CRM system. New features, roadmap, tips and tricks etc. Try to find topics which suit the users most so they are actually interested in the message you are spreading. This is one way of communicating, you can also try to organize workshops/training sessions every now and then to demo new features. These sessions are also a great way to interact with the end user!


4.Recruit champions!

Reach out to enthusiastic and influential business users to help improve user adoption. This will help with the overall usage of CRM. These so-called champions (this is just an example, you can name this group of people to your liking 😊) are the first point of contact for the other users. They are willing to help other users understand the system and are very valuable for you when it comes to information. Not every user complains via the helpdesk or via a ticketing system about the struggles they have with the system. Champions who are working with these users will pick up some of these complaints, and can inform you, the developper, and even help you think of a solution!


5. Keep it simple

CRM is very complex and can be confusing at some points. Keep the interface (e.g. forms ) clean with attributes that users currently need. A cluttered interface won’t help in making the system easy to work with. This can be done via some best practises for example; WYSIATI (What You See Is All There Is) and to let the user flow through the form with the help of a business process flow.


6. Sharing is caring

It can be hard in some environments to make this happen but keep in mind that CRM works best if you share the information in it. Dashboards, reports and views will be more valuable if there is a lot of data that can be used. Try to demo this to the business more often to show the benefits, this will help in security discussions you might have with compliance.


7. Accessibility

Make the CRM system accessible in various ways so the user can interact with CRM which suits them best. Tablet or Phone, but also on the browser and via the Outlook app! All these ways contribute in user adoption since these options will help the user create records easily.


8. Keep up the pace

And at last, keep up the pace! If your time to market is short, users will come to an understanding, that giving feedback about the system actually changes it as well. This will motivate users to actively think about their CRM system.