Dynamics 365 Field Services, Field service, Microsoft Dynamics 365

How to upgrade your Tenant from Field service 7.x to 8.x (UCI Client)

I recently tried upgrading FS for one of my customer’s tenant but couldn’t see an option to upgrade to the latest 8.x from the administrative portal.

Asked the same question to the product team and gladly they shared the process customers can follow to do this.

To Opt-in please perform the following steps:

  1. Access the Dynamics Insider Portal here: http://experience.dynamics.com/insider
  2. Log in with your Insider credentials.
  3. On the Insider home page, search for a program with the name “Opt-in to Upgrade Project and Field Service – Unified Interface.”
  4. Click that program link in the search results and choose to “Join Now” in the page that opens. This will add you as a participant to the program.
  5. On the program page, access the link provided to sign up:  “Signup Link to opt-in for the latest Field & Project Service UCI Release (GA)
  6. The link will open a simple questionnaire and one of the questions is the instance URL; please provide the URL of the instance.
  7. Microsoft will receive the details you provide and, within a few days, will enable the install or upgrade of the latest versions of Field and Project Service on the instance that you provided. Once enabled, you will receive a confirmation email from Microsoft.
  8. Once you receive the email, you can access your Dynamics 365 Admin portal to install or upgrade Field Service and/or Project Service Automation on the enabled instance.
  9. For any questions and discussion on the functionality, please use the Forum on the program page. Use the Microsoft Support process to log any issues/bugs.
  10. If the identified instance has both Field and Project Service installed, please plan to upgrade both solutions before resuming normal use of the instance.
  11. For a smooth install experience, please make sure that the identified instance meets all the prerequisites listed on the Insider Program page.
  12. These releases of Field and Project Service will only be available for install or upgrade on the identified instances. They will not show up for any other orgs, even if they are on the same tenant.

Dynamics 365 Field Services, Resco Field service Mobile

Resco Field service mobile app – Error loading woodford solution – CRM metadata failed to refresh

If you are trying to make any customizations to the Resco Field service Mobile app, you would encounter few strange issues at times which can block development.

Note: In case you are unaware, the silverlight based woodford solution just works in IE(Tested in IE11) and that too in non-incognito mode i.e. if you are working in incognito mode, the solution will fail to load.

Also many times the solution gets loaded but towards the end it gives you error saying CRM metadata failed to refresh and then all you can access is your Profile tab (and other non dev related tabs).

I haven’t been able to find a solution to the above problem except for restarting IE again, seems like a caching issue.

Dynamics 365 Field Services, Microsoft Dynamics 365 Field Service

How to sync Resource Bookings in Field service with MS Outlook

A very basic Field service use case is that bookings should show as appointments in MS outlook so that users can keep track of bookings and other office tasks in one single view.

Fortunately this is configurable in D365 FS, however there are few prerequisites:

  • Dynamics 365 Field Service licenses
  • Office 365 Enterprise E3 licenses

Here are the steps to enable synchronization of bookings with User’s calendar:       To be done by Dynamics 365 Administrator

  • From the main menu, click Settings -> Administration.
  • Click System Settings -> Synchronization.
  • Under Select whether to enable syncing of resource booking with, check the Synchronize resource booking with Outlook.


1.png       To be done by each User(Bookable Resource)

  • Click the Settings button in the upper-right corner of the screen.
  • Click Options and then Synchronization tab.



  • Under Resource booking sync with Outlook, check the Synchronization resource booking with Outlook.


CRM, Dynamics 365 Field Services, Microsoft CRM Dynamics, Microsoft Dynamics 365, Microsoft Dynamics 365 Field Service

Creating Booking Rules in Microsoft Dynamics 365 Field Services

Booking Rules are Javascript validations that you can attach to the Booking creation event which is triggered when a booking is created on the schedule board or the schedule assistant.

To create a Booking Rule,  Field Service > Administration, and then choose Booking Rules.


What we need to do is attach a JS web resource with the Booking rule. The JS web resource should have a function which takes in the context and is called when a Resource requirement is dragged and dropped on to the Schedule board or the assistant.

Let’s see some code, in this example we are restricting creating of a Booking on the basis of how many bookings are already being created for a Resource.

function validateRules(sbContext) {
var ruleResult = {};
var resourceReqId = '';
if (sbContext.newValues.ResourceRequirementId != undefined) {
resourceReqId = sbContext.newValues.ResourceRequirementId;
else if (sbContext.newValues.ResourceScheduleSource != undefined && sbContext.newValues.ResourceScheduleSource == 690970004) {//SA
var rr = Xrm.Page.getAttribute('msdyn_resourcerequirement');
if (rr != null && rr.getValue() != null && rr.getValue().length > 0) {
resourceReqId = rr.getValue()[0].id;
if (resourceReqId == '') {
console.log('RR is null. Exiting..');

ruleResult.IsValid = true;
ruleResult.Message = “No RR”;
ruleResult.Type = ‘success’;
return ruleResult;

resourceReqId = resourceReqId.replace(‘{‘, ”).replace(‘}’, ”);
var resourceId = sbContext.newValues.ResourceId;
var startTime = sbContext.newValues.StartTime;
var endTime = sbContext.newValues.EndTime;
var hearingType = ”;

var req = new XMLHttpRequest();
req.open(“GET”, encodeURI(Xrm.Page.context.getClientUrl() + ‘/api/data/v8.2/msdyn_resourcerequirements?$filter=msdyn_resourcerequirementid eq ‘ + resourceReqId + ‘&$expand=new_wa_case($select=wa_hearingtype)’), false);
req.setRequestHeader(“Accept”, “application/json”);
req.setRequestHeader(“Content-Type”, “application/json;charset=utf-8”);
req.setRequestHeader(“OData-MaxVersion”, “4.0”);
req.setRequestHeader(“OData-Version”, “4.0”);
req.setRequestHeader(“Prefer”, “odata.include-annotations=OData.Community.Display.V1.FormattedValue”);
if (req.readyState === 4) {
req.onreadystatechange = null;
if (req.status === 200) {
var result = JSON.parse(req.response);
hearingType = result.value[0].new_wa_case[‘wa_hearingtype’];

if (hearingType == null) {
hearingType = 953860001; // Motion as default
console.log(‘motion set as default’);

var dt = new Date(startTime).toISOString();
var st = dt.substr(0, dt.indexOf(‘T’)) + ‘T00:00:00Z’;
var et = dt.substr(0, dt.indexOf(‘T’)) + ‘T23:59:59Z’; //2018-07-17T11:59:59Z
console.log(dt); // today’s date
var req = new XMLHttpRequest();
encodeURI(Xrm.Page.context.getClientUrl() +
‘/api/data/v8.2/bookableresourcebookings?$select=bookableresourcebookingid,starttime,endtime&$expand=Resource($select=wa_jurytrialhearinglimit,wa_motion)&$filter=_resource_value eq ‘ +
resourceId +
‘ and wa_hearingtype eq ‘ +
hearingType +
‘ and starttime gt (‘ + st + ‘) and endtime lt (‘ + et + ‘)’),
req.setRequestHeader(“Accept”, “application/json”);
req.setRequestHeader(“Content-Type”, “application/json;charset=utf-8”);
req.setRequestHeader(“OData-MaxVersion”, “4.0”);
req.setRequestHeader(“OData-Version”, “4.0”);
req.setRequestHeader(“Prefer”, “odata.include-annotations=OData.Community.Display.V1.FormattedValue”);
if (req.readyState === 4) {
req.onreadystatechange = null;
if (req.status === 200) {
var res = JSON.parse(req.response);
var data = res.value;

ruleResult.IsValid = true;
ruleResult.Message = “Validation succeeded”;
ruleResult.Type = ‘success’;

if (data.length > 0 && data[0].Resource != null) { // Court Room
var juryLimit = data[0].Resource.wa_jurytrialhearinglimit;
var motionLimit = data[0].Resource.wa_motion;
console.log(data, data.length, juryLimit, motionLimit);
var isDone = false;
for (var i = 0; i = new Date(data[i].starttime) && startTime = juryLimit) {
ruleResult.IsValid = false;
ruleResult.Message = ‘Jury Hearing capacity reached. Bookings not allowed.’;
ruleResult.Type = ‘error’;
} else if (hearingType == 953860001 && data.length >= motionLimit) {
ruleResult.IsValid = false;
ruleResult.Message = ‘Motion Hearing capacity reached. Bookings not allowed.’;
ruleResult.Type = ‘error’;
} else {
else {
return ruleResult;

CRM, Dynamics 365 Field Services, Microsoft Dynamics 365, Microsoft Dynamics 365 Field Service

How to hide Initial public view from schedule board in D365 Field services

As you would know in D365 field services schedule board, we can configure multiple boards and configure different filters or one scenario which is very common is having a board for each Organization unit/Territory.

We have a request from customer that they want to hide the Default Initial Public view from the board. There’s an easy way to configure this in D365.

Go to Advanced find and search for “Schedule board Settings entity”:

Find the record with Tab Name: “Initial public view” and change the Share Type to System instead of Everyone.

This is going to hide the tab from the schedule board.




Azure, Azure IOTHub, Connected Field Service, Dynamics 365 Field Services, Logic Apps, Microsoft Dynamics 365

Get Device ConnectionString from IOTHub using LogicApp

As of today, there are 3 connectors to Azure IOT Hub:


I recently had a requirement to get the Device Connectionstring from IOTHub using DeviceId and IOT Hub connectionstring.

The solution comprised of following 2 items:

  1.  Custom connector to get Device Connectionstring
    1. This is a Web api deployed on Azure which has a Post method, takes in DeviceId and IOTHub connectionstring and returns Device Connectionstring using Azure IOTHub sdk.
    2.  HTTP + Swagger action was used in Logic app to consume this.
  2.  Logic app wrapper which was consumed by other apps.

If you want to use the Connector, consume the following swagger file:



Here’s the logic app definition:









Dynamics 365 Field Services, Microsoft CRM Dynamics, Microsoft Dynamics 365 Field Service, Microsoft Dynamics CRM

How to show Crew on the schedule board in Dynamics 365 Field Services

If you have configured Crews in Field Services and trying to figure out why they aren’t showing on the Schedule board then you are in the right place.

The schedule board has few default filters and the default filter settings don’t have Crews configured to be shown on the board.

Let’s open the Filter settings in the board settings. Here is what the default settings look like:


Let’s open the Filter layout and scroll down to see the section which lists various resource type ids that should be displayed on the board:



Now, if we want to add Crew to this list, we need to add another item with value 6 in this list. Here’s how the config looks after the change:



Save the config and give it a name and apply. You should now see Crews in the Resource type in the filter pane: