function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
James GeorgeJames George 

How to add Shared Calendar automatically to the user's calendar without manual intervention

Hi All,
I have a shared team calendar, which I would like to add automatically to all the users calendar either during user registration.

I know there is a manual option, which requires every user to add the shared calendar to added to their calendar manually, which we would like to avoid.

Is there any 'Out of the Box' settings available or do need a custom apex required.

Thanks in advance,

DishantDishant (Salesforce Developers) 
Hi James,

There is no 'Out of the box' solution for this. As the user data is not already present in the system (pre-registration). It might fail to take the new user's data and automatically sync it with the calender sharing. We have to do it manually. 

Important Update

We appreciate your participation in these Salesforce Discussion Forums! It’s active members like you that keep our amazing community going strong.

At this time, we want to give you a heads up that on December 4, 2023, the discussion forums will shut down and all relevant discussions will migrate to the Trailblazer Community digital platform. This move brings all conversations around Salesforce development together in one place and provides more opportunities for our broader community to connect and share. We will be removing outdated, obsolete, or spam content and migrating only relevant discussions to the Trailblazer Community digital platform.

Starting November 20, you can view discussions but not post new questions or responses. On December 2, you will no longer be able to access the discussion forums from the Salesforce Developers website.

Please take these steps before November 30, 2023, 11:59 p.m. PT to ensure your contributions follow you to the Trailblazer Community:
  1. If you’re not already a member of the Trailblazer Community, sign up for a Trailblazer account using the same login email address associated with your Developer Discussion Forums account. This is crucial.
  2. If you already have a Trailblazer account, and it’s using a different email address from the one you used for your Developer Discussion Forums account, we recommend that you log in to the Trailblazer Community and connect your forums email address to your Trailblazer account.
Once you’re in the Trailblazer Community, join the Migration Support Hub users group to help you navigate this transition.

We will keep you up to date throughout the transition, and we look forward to seeing you joining the developer discussions in the Trailblazer Community!

The Forums Support Team

James GeorgeJames George
Thanks Dishant for your reply.

so the way we can automate is by creating a batch job runs every 1 hour or so for checking for the new user records in system and assigning the calendar.
does this approach have any pitfalls?

Do you have any sample apex code for reference.


faizi chfaizi ch
great, my isse also solved