Customer Engagement & Dynamics CRM Forum

Customizing Field Service Scheduling Board

By Jandost Khoso posted Mar 26, 2019 09:45 AM

  
In my opinion Field Service Schedule Board is a masterpiece. It allows resources and schedules to be viewed on nicely designed user interface. I have been working on a project where we had to customize field service schedule board and I am sharing my experience of customizing the schedule board in this article. I hope this article can be useful for the community in future.

Customization Capabilities

Before going further and talking about actual customization, let's set the stage by outlining some facts. The schedule board functionality can be extended using "Scheduling Board Setting" button on the schedule board.
The setting tab allows you to change the information displayed in the scheduling assistant, requirements section, tooltip on various items on the board. 
 
The setting tab allows you to change the following important aspects of the schedule board:
  1. Filter Layout where you can configure the way the filter section of the board behaves.
  2. Resource Cell Template where you can configure what information to be displayed on cells in the board
  3. Retrieve Resources Query where you can configure what resources and resource attributes to be retrieved
If you want to make extensive changes in the layout of filter section and also resources information, I highly recommend you to read this article. The concept behind configuring the schedule board is based on Universal FetchXML or UFX which you will need to understand before configuring the schedule board. UFX is a xml based query language which provides dynamic query capabilities which you can use to manipulate data. A sample of UFX in action can be seen here.

The Challenge


My client wanted to implement the following scenario and let see how did we find a solution to their requirements. 
  1. The client wanted to see resources automatically sorted on load of the schedule board based on their distance to work order location.  
  2. The client was dealing with contacts as resources and each contact belonged to an organization. The challenge was that many contacts had same names so when the client was looking for resources, the schedule board was showing so many unique names in the list. The requirement was to show parent organization of contacts in a separate column so that users could differentiate contacts.

The solution

  1. The solution to the requirement 1 is still not available. The schedule board provides the sorting capability based on each column however users should click on the column header manually to sort records. The platform itself provides the capability of sorting by Name and Rating; but then other than these two fields, we could not find any other way to configure sorting based on Duration.

  2. We could not find a way to add the contact's parent organization as a Column to the schedule board however, using UFX we found a way to add contact's parent organization as a string to the contact name. The good news is that Sorting based on Parent organization (or any other field available in the Retrieve Query) works perfectly on the schedule board.
The first step to add Contact's parent organization is to include the required data elements to the Retrieve Query. We can either include additional data elements directly from the BookableReource entity or we can use LinkedEntity to bring data from related entities. In our case the default query brings the msdyn_organizationalunit field as part of the original query.
Since msdyn_organizationalunit is a lookup, we had to add one additional step to retrieve the "value" of the lookup and include in our query results. So we added the following snippet into the query.
For this we had to scroll down to the last part of the query and insert this code before the closing </bag>. If you notice you will see that we used "msdyn_organizationalunit/@ufx-formatvalue to obtain the name of the lookup. Furthermore, we assigned the name of lookup to a tag with the name of "orgname". The explanation of all UFX directives are here.
At this stage we retrieved the value of parent organizations and in the next step we had to display the value in the first column. Since we already stored the value of organizational unit in the variable "orgname", all we had to do was to include the "orgname" in the "Resource Cell Template". Below is how we did it.

 
We just added a "-" and {{orgname}} directive to get the value of organizational unit from the Retrieve Query and below is the output.
 
For the last step, we tried to sort resources based on the Resource Type and we did it just by changing the sort order in the Retrieve Resource Query as following
I hope it helps.
0 comments
9 views

Permalink