Tip #1186: Race conditions with queue items

Today’s tip is from Marius “flow like a river” Lind. (And you can also become a tipster by sending your tip to jar@crmtipoftheday.com)

What happens when a race condition happens in a queue? Let’s say we have a bunch of customer service representatives who are working on cases in the same queue. The queue is sorted by priority and you should always pick the top case. Joel and Marius opens up the queue view at the same time, but Marius is a second faster than Joel to pick the top case. What happens now?

Well, one out of two things.

  1. Marius chose to pick but not remove the item from the queue.
    Joel picks the case, and since the queue item still exists the action taken by him simply resolves and the case is delegated to him.
  2. Marius chose to pick and remove the item from the queue.
    Joel is presented with the following error message

So how do we deal with this?

For scenario 1, here’s a few options:

  • Accept that this might happen
  • Create a plugin which prevents someone from picking something that’s being worked on

For scenario 2:

  • Tell users about this, accept that it might happen

How to reduce the risk of this happening:

  • Make sure you teach your users to refresh the list view if it’s been open for a while
  • Distribute over several queues to prevent too many people working in the same queue
  • Or maybe you have a better idea, drop it into the comment.

Best regards, your friendly neighbourhood Viking!

(Facebook and Twitter cover photo by davide ragusa on Unsplash)

Tip #1185: Customize the document grid

I upgraded to server side SharePoint integration and now I don’t see enough detail from the document grid. It doesn’t show me who checked out the file, and I have to open the SharePoint location to see who checked it out.


Good news–with server-side SharePoint integration you can customize the grid more than you could with the client side grid control. 

Do an advanced find of the view entity for where the name contains “Document Associated.” From there you can add a bunch of additional fields to the grid view.

(Facebook and Twitter cover photo by Stefan Schweihofer on Pixabay)

Tip #1184: Custom activity in Timeline

Under the rapid release cadence one of the challenges is to keep track of what’s changed when and how the features, both old and new, are exposed to end users. It’s like being on Masterchef when today’s challenge is cooking with open fire, tomorrow – flame thrower, and the day after we’re supposed to cook a perfect steak using nothing but our body heat.

For the reasons that will remain unknown, Neil “Agile” Benson decided to create a custom activity called Special Alert. Users could create special alerts from the Other Activities button on the main Activities command bar, but not from the Quick Create button or the Timeline control on the contact form or on the related Activities view on the contact form.

Turns out, there are few prerequisites for a custom activity to appear in the timeline control:

  • Entity is added to the app
  • Entity is enabled for Mobile
  • If Timeline is filtered by specific activities, entity is added in Timeline control configuration. Configuration is accessible via Timeline control properties.

If all these conditions are true, then Timeline will show the custom activity, as attested by Mr Benson.

(Facebook and Twitter cover photo by Jacob Miller on Unsplash)

Tip #1183: Templates are not working after upgrade

Release 9.1.X (the coveted October release) is already here and some organizations have already been upgraded to the new version. Steve “Mr SMB” Mordue was, for a change, on the receiving end, as his customers complained that Word templates stopped working after the upgrade. When a template is selected from a record, new shiny Dynamics UI says it is creating, the spinning dialog eventually stops, but then nothing happens and nothing gets created. Steve tried clearing cache, and re-uploading template with a new name, no luck.

Turns out, SharePoint integration was throwing a spanner into the shiny October mag wheels. When downloading your template, make sure the two highlighted SharePoint relationships are not selected.


After that, both Word and Excel templates work like a charm. To the extent they can charm anyone, of course.

The relationships on the screenshot are for the opportunity, you’d want to exclude similar ones when using a different document-enabled entity.

(Facebook and Twitter cover photo by rawpixel on Unsplash)


Tip #1182: The Tool Every Developer Needs (Even The Ones Who Don’t Use Code)

Whether your weapons are JavaScript and Plugins, or Processes and Flows,  there is a tool you should pick up before going anywhere near the keyboard. That is, of course, the pen.

This is a lesson I learned while at university with my computing lecturer insisting we write out our code before committing it to the screen. Our major assignment was to code a token ring network controller. It might have been tough to write out every line of Pascal to make it work but when I finally entered it into the computer, the entire thing was bug free. The time taken to write it out and think it through calmly and carefully paid dividends in not having to debug my otherwise incoherent, spaghetti code.

While I do not write every Workflow out in full before logging in to Dynamics, for the more complex ones there is a lot to be said for organising your thoughts on paper first. My general rule of thumb is if I cannot contain whatever it is I am developing on the screen (almost impossible for all but the most simple Flows), I write it out first. By going to a high level pseudo-version, I can see the algorithm on one page and usually improve my vision or discover issues which may not have been as visible in the weeds.

Often coders will lament that their non-coding associates do not have good habits when developing. For me this is the first good habit of any developer. The pen is mightier than the DWORD.

Tip #1181: Filtered lookups on editable grids

Today’s tip is from Nick “Benchpress” Doelman. Technically it’s from his wife which proves that all of us, MVPs, are mere mortals and the real knowledge still belongs to the users.

She only wanted to see contacts that belonged to an account on the record but the lookup view was showing all the contacts. Turns out, the editable grid lookup will only filter if the ‘filter by’ field is also on the view. For instance:

  1. Without the “Account” being visible on the editable grid view:
  2. Now with the “Account” being added to the editable grid view:

Don’t have a tip but your spouse works with Dynamics? Ask them and send the tip to jar@crmtipoftheday.com!

(Facebook and Twitter cover photo by Tyler Nix on Unsplash)

Tip #1180: Rejiggering the Outlook App

I dedicate today’s tip to Steve Mordue, who asked me how to do this.

Let’s say you have the Dynamics 365 App for Outlook configured against D365 instance A, but you are moving instances and want to use it with instance B.

  1. Log in to https://outlook.office365.com/owa/
  2. Click the settings gear in the upper right corner
  3. Select Manage Add-Ins
  4. Select “My Add-Ins”
  5. Tap the … on the Dynamics 365 Custom Add-In tile
  6. Select “Remove” 
  7. Install the Outlook app from Dynamics 365 instance B


Tip #1179: Add a dash of dash to your autonumbering


Jonas “The Shuffler” Rapp reports: when modifying autonumbering for built-in entities like case, always include a dash in the pattern to stop Dynamics 365 from self-combusting.

Long story

One of the awesome users of the Auto Number Manager for XrmToolBox managed to break the system settings for Auto Numbers in Dynamics 365, so he called me up to see if I could find the problem.


The Auto Number Format of the Case Number (ticketnumber) attribute on the Case (incident) entity had been changed from the default value:


To a custom format:


And now it was no longer possible to open the Auto-Numbering dialog in Dynamics 365.

I see four potential problems here:

  1. The prefix is four characters – will that fit?
  2. There is no dash between prefix and number
  3. The number is seven digits long
  4. There is no random string at the end

After some investigation using the number one troubleshooting methodology –  some simple trial-and-error – I came to some conclusions:

  1. Prefix may be even longer than that, I tried with CASENUMBER and that worked fine too
  2. Skipping the dash makes the dialog explode like above
  3. Seven digits works fine, even though the UI in the dialog will only show 6, there is no 7 available
  4. Works fine without random string, but in the dialog it still looks like it has the random suffix


So make sure you keep a DASH between your prefix and number when you are changing Auto Number Format for out of the box number attributes!

Happy numbering!

Tip #1178: Pure Unified Interface trials

I guess it was only the matter of time until Unified Interface started to take over. And so it begins with the changes coming to the trial experience that will let the customers experience and evaluate their workloads purely on Unified Interface.

Summary of experience enhancements are as follows. For more details, please refer to the original blog article.

  • Users will now land on the app selection page when they sign in instead of the legacy web client application and this page will showcase applicable app modules to the user.
  • When creating a new app module, you will only have the option to do so based on the Unified Interface. You will no longer be able to create new app module based on legacy experience.
  • If you have an existing legacy web app module, you will be able to run, edit and convert it to Unified Interface. Note: App modules converted to Unified Interface cannot be rolled back to the legacy web client experience.
  • The “Dynamics 365 – Custom” app that provided access to the full legacy web client sitemap will no longer be available to users or admins. The runtime will only be available through app experiences.
  • Admin sitemap and experience is still exposed in the legacy web client and can be accessed from the gear icon on the apps selection page or from within an app module by clicking on Advanced Settings. This will open another browser tab and direct you to the settings page.

These changes will be available in all regions in the next 2-3 weeks. Please note that this will not impact any existing customers.

(Facebook and Twitter cover photo by rawpixel on Unsplash)

Tip #1177: Use the CDS connector when you go with the flow

MVP Elaiza Benitez gave me some very helpful advice when it comes to Microsoft Flow:

If you want to filter Dynamics 365 records to only records that you create in your flow, you should use the CDS when a record is created (preview) trigger, not the Dynamics 365 trigger. If you use the CDS trigger, you can set the scope to “User.” This way the Flow will only execute if you create the record. This makes flow more consistent with how Dynamics 365 Workflow works, and vastly simplifies Tip 835.

For more details on how to use scope in your flow, check out episode 1 of Elaiza’s fantastic vlog series WTF.