Knowledge Center

21 Aug, 2020

Simplify Agreement Booking Recurrence With One Click

Posted on 21 Aug, 2020 by Admin, Posted in Dynamics-365 Sales Dynamics 365 Field Service

Simplify Agreement Booking Recurrence With One Click Blogs

Simplify Agreement Booking Recurrence With One Click


In Field Service, you can create work orders automatically by using agreements and the interval in which the work orders are created can be set up by using booking recurrence from the agreement booking setup, but this might be confusing and time consuming for clients/users, so in this blog we will see how you can configure the booking recurrence and keep it at just one click.

Dynamics 365 Field Service OOB functionality to setup Booking Recurrence


  • Go to Agreements > Agreement Booking Setup –> Booking Recurrence.
  • Once user clicks on the “BOOKING RECURRENCE” button, the following window is opened, where the user provides the required information.

  • The above Booking recurrence pattern is an example of Monthly recurrence which will create a Work Order on 1st weekday of every month from the Start Date to End Date.
  • A user will require too many clicks and need to set the proper patterns to achieve requirements, and this can be tedious for some users.

Simplified one click solution for Booking Recurrence

  • To make the above process simple for Users, you can make a custom Option Set field “Booking Recurrence” on the Booking Setup form with the most commonly used option values like: “Weekly”, “Monthly”, “Quarterly”, “Bi-annually” and “Annually” as indicated in the below picture.
  • You can also add this field on some other entity if you are using the other entity to create the Agreement.

  • And by selecting any one option from the above option set, the Booking Recurrence pattern is automatically generated. Based on the Booking Recurrence pattern, the Booking Date record gets created.

To achieve this follow the below steps:

  1. There is a “Recurrence settings” field on the Agreement Booking Setup form, but it is hidden. This field takes an xml string.
  2. You will need to set the XML string in the field to achieve the above functionality.
  3. Once the XML string is set the OOB Field service workflow is triggered and the booking recurrence is set

The structure of the XML string for most commonly used Booking Recurrence Pattern is given below:

For Creating Bookings Weekly:

var recurrenceSettingXml =

For Creating Bookings Monthly:

var recurrenceSettingXml =

For Creating Bookings Quarterly:

var recurrenceSettingXml =

For Creating Bookings Bi-Annually:

var recurrenceSettingXml =

For Creating Bookings Annually:

var recurrenceSettingXml =


  • AGREEMENTSTARTDATE– “Agreement start date” of Agreement record.
  • AGREEMENTENDDATE– “Agreement end date” of Agreement record.

So, to finally use this functionality and generate the XML string based on the selected option set value and set it to the Recurrence settings field. You can simply write a JavaScript code for generating the XML string

Use the following code snippet to assign the selected option set’s value to Recurrence settings field:



This is a Required Field


Recent Updates

02 Apr, 2024

Sales accelerator in D365 Sales

Introduction: In this blog we will see how Sales accelerator works and also how 'My work list' displays the work items.…

01 Apr, 2024

How to Create Entitlement in D365 Customer Service

In this blog we will learn about what is Entitlement and how to create it. 1)what is Entitlement? Entitlement is…

22 Mar, 2024

How to Create Product Catalog in Dynamics 365 for Sales - Part 1

In this blog series we will learn how to set up a product catalog in D365 Sales. The Product Catalog contains…