Feb 23, 2018

How Booking Alerts work in Dynamics 365 – Field Services

Booking Alerts in Dynamics 365 – Field services is an activity type with one speciality, which is its ability to show in the schedule board. Booking Alert is actually an effective alert for the Dispatcher who is working with the schedule board.

Booking Alert is created in two entities those relates as below;

Let’s see standard Booking Alert form;

Most of the fields here are obvious and standard for activity types, but two marked ones are special. Idea of them are as follows;
Due date – This Due date is the date/time this Alert will be pop-up in the schedule board. This should be a future date.
Assignees – These are the users who need to be logged in to see the Alert. My opinion these ones should be the Dispatchers in typical Field Service implementation.

Let’s see behind the scene how Booking Alert Status records being populated. Next time to show field is nothing but the Due Date.

Caution: Once created don’t change the Due Date in Booking Alert without changing these values in Associate records (this doesn’t update automatically).

Here we see our Booking Alert.

Dec 13, 2017

Get Form Type in Business Rules

There is no proper way of identify if form is in CREATE or UPDATE. This seems a big missing piece when it comes to implement field functionalities especially for Form Scopes. Then only I came to know that passive way of doing that is to check if Create On field contains data.

Create On - Not Null - Update
Create On - Null - Create

Using Create On is particularly sensible since that field is not set with on Load event even by chance.

Hope this is cool.

Nov 20, 2017

Enforce Calculation of Rollup fields

Rollup fields are handy in many scenarios, it takes one hours to update by default. If the business case needs real time updating, we can write plugin/WF to enforce the recalculation based on trigger. In such situation, below generic method can be used.

public static void EnforceCalculationRollup(IOrganizationService OrganizationService, EntityReference record, string rollupField)
CalculateRollupFieldRequest rollupRequest = new CalculateRollupFieldRequest { Target = record, FieldName = rollupField };
CalculateRollupFieldResponse response = (CalculateRollupFieldResponse)OrganizationService.Execute(rollupRequest);
Entity entity = response.Entity;

Hope this helps!