D365 URS – Resource with any of the roles

Dynamics 365 – Universal Resource Scheduling

Filter resources who contain any of the selected roles

Often clients want the ability to select multiple roles in the schedule board filter and get all of the resources who have any of those roles. Not just the resources which have ALL of those roles.

Thanks to the URS team we have the ability to setup customised filter panel, and customised filtering to achieve this. For an overview of customising the schedule board please see: Understanding and customizing resource matching in Universal Resource Scheduling

For an example of how to do it: Extending URS: Find resources by language – a step by step guide


Now, to walk through the example. In the below filter you will see 3 roles selected “Team Member”, “Project Manager”, “Personal Services Attendant”. And in the search results we have Alex Wu and Jane Doe. Looking at Alex Wu’s resource card we can see she only contains 1 role Personal Services Assistant.

Any Role Schedule Board Filter


  1. Open the schedule board settings. From the cog in the top right of the schedule board, then the bottom of that menu the Open Tab Settings.
    Open Schedule Board Settings
  2. Scroll until you find the “Retrieve Resources Query:” setting, and use the cog to open it.
    Retrieve Resources Query
  3. Copy the code in here into your favourite editor (Notepad++)
    Find the section that has:

    <!– Category join –>
    <link-entity name=”bookableresourcecategoryassn” from=”resource” to=”bookableresourceid” link-type=”inner” ufx:if=”$input/Roles/bag”>
    <attribute name=”resourcecategory” aggregate=”countcolumn” alias=”rolecount” distinct=”true” />

    <condition attribute=”statecode” operator=”eq” value=”0″ />
    <condition operator=”in” attribute=”resourcecategory”>
    <ufx:apply select=”$input/Roles/bag”>
    <ufx:value select=”@ufx-id” />

  4. Replace this section with:

    <!– Category join –>
    <link-entity name=”bookableresourcecategoryassn” from=”resource” to=”bookableresourceid” link-type=”outer” alias=”categories” ufx:if=”$input/Roles/bag”>
    <condition attribute=”statecode” operator=”eq” value=”0″ />

  5. Then scroll down to <filter type=”and”>
  6. Inside this section add:
    <condition ufx:if=”$input/Roles/bag” entityname=”categories” attribute=”resourcecategory” operator=”in”>
    <ufx:apply select=”$input/Roles/bag”>
    <ufx:value select=”@ufx-id” />
  7. Copy this updated script back into the schedule board configuration, you will need to save the configuration as a save as new name. Save these settings changes to your board and give it a go.




D365 Education Workshop – Project Service Automation – 12th June

Tomorrow  evening 12th June I am running an education session on Dynamics 365 Project Service Automation. This is an introductory session to the features of Dynamics 365 PSA module, including:

  • Sales to Project Process
  • Project Planning
  • Project Resourcing
  • Team Collaboration
  • Time and Expenses (including Approvals)
  • Customer Billing / Invoicing
  • Analytics
  • Microsoft Project Integration
  • Universal Resource Scheduling
  • Utilisation

For further details and registration: Register Here

I have enabled webinar functionality, so if you cannot join in person, feel free to register and join us online.

D365 v9 SDK

When Microsoft released Dynamics 365 V9 they retired the concept of the SDK download.
See here:Developer Documentation V9

Instead the material was split up to allow easy updating and rapid release. For those needing the utilities in the SDK Microsoft provided NuGet solution for getting these:

D365 V9 Tools NuGet instructions

Which is great if you are a developer and familiar with NuGet, however not so good if you aren’t.

So I have shared zip’s to the main ones here (as at 7th April 2018)

Configuration Migration Utility

Core Tools

Package Deployment

Plugin Registration

Please note, when you download these your computer will consider them dangerous due to the exe in them. you will need to right click on the zip file, select properties, then check unblock and press ok. Now go ahead with extracting them.


D365 Field Service Work Order Addressing

Work Order Addressing

By default a work order will inherit it’s address from the service account selected for that work order. This will pull down the address and geospatial information from the account onto the work order.

The geospatial information (longitude and latitude) is critical for a work order, as it drives the location on the map and provides RSO with the information it needs to determine travel times and distances.

Account Addressing

When the Field Service module is installed, it provides auto geospatial coding for address information on out of the box entities. When entering an address on an account record a dialog will appear validating the addresses that match the information the user has selected. By choosing from this list the address information is updated to match, and the longitude and latitude is also set automatically on the Account record.

Work Order Addressing

If the work order needs to occur at a different address to the service account the user can replace the information in the address fields. This will trigger the same dialog mentioned on the account form, to select a valid address, also populating the longitude and latitude.

Bulk Uploads

The problem with the fore-mentioned dialog is it is client side, the same logic does not run automatically on the server side. So if work orders are imported with addresses by bulk from excel or via integration the longitude and latitude will not be set.

This in turn means the system does not know where the job is occurring so it cannot show it on the map, and RSO cannot determine the travel distance and time.

This can be addressed through a workflow that triggers on create and update, Field Service offers a custom action that will use the address information to identify the long and lat, allowing it to be set back on the record. This particular function is available across the system, so it can be used on non-OOB entities, to determine long and lat information.


Resource Starting and End Locations

On a resource record there are settings for where a resource starts and ends their day. This can be their address as recorded in the system (resource address), the address of the organisational unit, or location agnostic (they will start and end their day at the address of the work order).

For the first two it is important we have that addressing information set, otherwise the RSO and Find Availability engines will not be able to determine travel distances and time.

Organisational Unit Address

An organisational unit record does not have separate address information, but it does have a longitude and latitude. As mentioned in the previous section this needs to be set for distance and time calculations.

Out of the box the longitude and latitude fields are not visible on the Organisational Unit form, these need to be added to the form to allow ease of setting. It is unfortunate that out of the box there are not address fields as it means we cannot take advantage of the dialog or the custom workflow activity to find the longitude and latitude.

The only plus around this is organisational units should be a set and forget that do not need to be changed very often.

Resource Schedule Optimisation

The RSO module which auto schedules according to the criteria defined requires long and lat information for work orders, organisational units and resources so it can determine travel times, and distances when determining the best order and allocation of work. A default for the organisation can also be set in regards to how far a person can travel to do the work. This by default is 50km, but for teams that do a lot of travel will need to be increased.

Credit to a Reference

Call back to https://community.dynamics.com/crm/b/crmpowerobjects/archive/2017/04/25/geocode-anything-with-dynamics-365

Talks back to some of the geocoding options and settings.

Setup/Install RSO – Dynamics 365 Field Service Resource Schedule Optimisation

A couple of tips for those looking to setup Dynamics 365 Field Service – Resource Schedule Optimisation.



RSO is a licence add-on for Dynamics 365. Depending on how you purchase your Dynamics affects how to get an add-on.

  • If you have purchased directly through the O365 Admin portal, goto subscriptions, and select the Dynamics 365 subscription. You will then have under one of the menu’s the ability to add add-on’s.
  • If you have purchased through a CSP or Enterprise agreement you will need to goto the portal that manages the agreement and add the RSO add-on there.
    Office 365 Subscription


Enabling for Dynamics 365 – Part 1:

Goto the Dynamics 365 Admin Center. Select your instance, and choose the Solutions option on the right.

Office 365 Subscription

Find the RSO option, select it and install.

Office 365 Subscription

Whilst that is installing, move to part 2.

Enabling for Dynamics 365 – Part 2:

In the D365 Admin Center, select the Applications header. At this point Resource Scheduling Optimization should be showing up as “not configured”, open the configuration and follow the steps.

Office 365 Subscription

The detail of this part is covered in the Microsoft post: https://www.microsoft.com/en-us/dynamics/crm-customer-center/use-resource-scheduling-optimization-to-schedule-multiple-booking-requirements-on-a-recurring-basis-field-service.aspx

Enable Optimisation

Resource Schedule Optimisation should now be available in your Dynamics 365 environment. The final part to getting it enabled, goto the Resource Scheduling module, select Administration, open the Scheduling Parameters option, and set the “Enable Resource Scheduling Optimization” to yes (also covered in the above MS post).

Office 365 Subscription


The post above outlines some more details on how to then configure and setup RSO schedules.

Hopefully this helps anyone who is looking to setup Resource Schedule Optimisation.

Good Luck!


Blog at WordPress.com.

Up ↑