Add the Custom Holidays Dictionary

If your company has corporate holidays, add the custom Holidays dictionary to mark those days as holidays at the calendar grid. Calendar Settings will affect the custom holidays, for example, if the creation of a CT CPG Activity record on a weekend is enabled, the representative can create a CT CPG Activity record on custom holidays.

Create a Custom Dictionary Object

First, customize your Salesforce organization by adding a new custom object:

  1. Go to Setup → Object Manager → click Create and select Custom Object.

  2. Specify the required fields and additional parameters.

    • Add the Label and API name, for example, Dictionary__c.

    • Set the Deployed status.

    • If needed, select Track Field History, Enable Reports, and other parameters.

  3. Click Save.

The setup is complete.

Next, add fields for the Dictionary object.

  1. Go to Setup → Object Manager → Dictionary → Fields & Relationships → click New.

  2. Create a Date field with the Date data type and click Save & New. For example, Date__c. This field is responsible for the calendar dates.

  3. Create a Holiday field with the Checkbox data type and click Save & New. For example, Holiday__c. This field indicates whether the calendar date is a holiday.

  4. Create a Description field with the Text Area data type and click Save. For example, Description__c. This field is used for comments.

The setup is complete.

Create and Add a .csv File with Custom Holidays to the Dictionary

The .csv file should have 365 days entries in the following format:

  • the first cell of the column contains the Date and Holiday fields of the Dictionary object, for example, Date__c, Holiday__c

  • Use the following format for the holiday: YYYY-MM-DD,true

  • Use the following format for the holiday: YYYY-MM-DD,false

Use the Data Import Wizard or Workbench to add a .csv file to the custom Dictionary object.

Customize the Use of the Custom Holidays Dictionary

To use the custom Holidays dictionary:

  1. Go to the CT CPG Calendar and click the Settings tab.

  2. In the User division field, select the required User division.

  3. In the Calendar Setup section, select the Use calendar day dictionary checkbox.

  4. Fill out the open table:

    • In the Calendar Day object cell, add the API name of the custom Dictionary object, for example, Dictionary__c.

    • In the Date field API-name cell, add the API Name of the Date field of the custom Dictionary object, for example, Date__c.

    • In the Holiday Flag field cell, add the API Name of the Holiday field of the custom Dictionary object, for example, Holiday__c.

    • In the Description field cell, add the API Name of the Description field in the custom Dictionary object, for example, Description__c.

  5. Click Save.

The setup is complete.

``