Skip To Content
Back to Help Center

Publishing CalendarAnything on Force.comCategorized in Feature Setup

By leveraging CalendarAnything and Salesforce’s Force.com sites, you have the flexibility and versatility to create public-facing calendars to use as iframes on websites, contractor scheduling, or sharing externally for clients without a Salesforce license.

In this article you will learn how to:

Create a Force.com site page

To create a site calendar, you will first need to create the Force.com site page you will use to display the calendar. For the steps to set up a site, please refer to Salesforce’s Setting Up Salesforce Sites.

Create VisualForce page for CalendarAnything

Step 1: Make the visual force page

Go to Setup and in the quick search type: Visualforce Pages and click on “Visualforce Pages
Click the “New” button to create a new Visualforce Page
Check on “Available for Salesforce mobile apps” checkbox if applicable
Copy and paste the following code:

<apex:page sideBar="false" showHeader="false" cache="false">

<style>

/*To place the Today button to left align*/

body{

padding:0;

margin:0;

height:100%;

}

html{

height:100%;

}

div{

padding:0;

}

.JQ_CA > .CA_h > div.manage

{

left:20px !important;

}

@media only screen and (min-device-width : 320px) and (max-device-width : 1024px) {

#CA_INSIDE{

height:100% !important;

}

}

</style>




<apex:composition template="{!$Site.Template}">

<apex:define name="body">




<div style="position:relative;height:calc(100% - 150px);" id="CA_INSIDE">

<c:calendar date=""

view="month"

calendar=""

enabled=""

urlparams="l_ds=0&r_c=0&site=1&sb=1"

namespace=""

readonly="{

edit            : false,

create          : false,

detail          : false,

move            : false,

hover           : true,

contextEvent    : false,

contextCalendar : false,

contextArea     : false

}"




></c:calendar>

</div>

</apex:define>

</apex:composition>

</apex:page>

Make sure that the “Available for Lightning Experience, Lightning Communities, and the mobile app” is marked as true
Click Save

Calendar controls which calendars the site will display, while Enabled determines which calendars are toggled on when viewing a page.

For additional information on Calendar and Enabled attributes:
CalendarAnything URL and Component Parameters 

Grant a CalendarAnything license to the Guest Site User

To publish CalendarAnything to a Force.com site, assign a CalendarAnything license to the Guest Site User.

To assign a CalendarAnything license to the Guest Site User, go to Setup in Salesforce. Then click Develop > Sites, select the site label name, and click Public Access Settings. Under View Users, select the Guest Site User link and choose Managed Packages > Assign Licenses. There, you can add CalendarAnything.

Create sharing rules for Guest Site User on your Force.com site

In the Spring 2020 release, Salesforce updated their security and sharing model to restrict the sharing mechanisms that you can use to grant record access to guest users. Guest users can no longer be added to public groups.

In order to support visibility of the calendar and data exposed by CalendarAnything, your system admin must create sharing rules for all objects exposed on a Force.com site.

For example, to publish a Force.com site with an event calendar:

Create a sharing rule for CA_Calendar object.

Set Event/Activity to Controlled by Parent and the sharing rule should be added to a parent object such as Account.

After sharing rules are in place, the calendar on the Force.com site will display data that is visible only as defined in the sharing rules.

Site Guest User Apex Class and VF Page Access

To select the necessary CalendarAnything Apex Classes and VisualForce Pages for the Guest Site User, please go to Guest Site User profile record.

Setup > Develop > Sites > Select Site Calendar Label Name > Select Public Access Settings

This will take you to the Guest Site User profile record page.
At the top of the Guest Site User profile record page, access to select the necessary Apex Classes and VF Pages are available.

At the top of the Guest Site User profile record page, access to select the necessary Apex Classes and VF Pages are available.

Select VisualForce Page Access
All SLCA2 VisualForce Pages must be enabled and Saved

Create and assign custom CalendarAnything permission set for a Guest User

Click Here for step-by-step instructions on how to create and assign a custom CalendarAnything permission set for a Guest User.

Set up a Force.com Calendar’s time zone

The Force.com calendar displays a calendar and has a Guest Site User assigned to it.
CalendarAnything displays the current time for Day View and for Swimlane View loaded from the user’s time zone in their settings.

To set the calendar’s time zone:

  1. Go to Setup
  2. In the Quick Find, type “Sites.”
  3. Click on Sites.
  4. Locate your Force.com site and click on its site label to open site details.
  5. Go to Public Access Settings and choose Assigned Users.
  6. Click on Edit next to the site guest user name and change the time zone to your desired one.
  7. Click Save.

Now your Force.com calendar will have a different time zone.

We don't support Internet Explorer

Please use Chrome, Safari, Firefox, or Edge to view this site.