- 13 Jul 2022
- 5 Minutes to read
- Updated on 13 Jul 2022
- 5 Minutes to read
Add the Blackthorn Events Lightning Component to your Community to display a list or calendar of Events or a dynamic Event!
This guide assumes you have Salesforce Communities setup.
Please note, at this time the "Build Your Own (LWR)" template is not supported.
Please make sure Blackthorn Event and Event Group objects have
Default External Access = "Public Read Only" or "Public Read/Write". If Sharing Settings are set to "Private", the Event page will not render in the Community.
If you currently have a custom domain for a Community, you will need to allowlist the domain before the component will load. Please navigate to CSP Trusted Sites in Salesforce Setup to add your site name and URL (Trusted Site URL = Community URL).
Configure the Blackthorn Events Component
Drag and drop the "BT Events Listing" Lightning Component to a page.
If the Blackthorn Events community component is grayed out, it is because your lightning locker is not enabled. To enable lightning locker please navigate to:
Community > Settings > Security > Switch on Lightning Locker.
Configure a List or Calendar View of Events
The instructions below are for setting up a list or calendar view of an Event Group. The Event Group shows a group of available Events.
Define the Event Group.
Only Events associated to the Event Group will be displayed on the component. To display all Events, leave blank.
Category Filter will allow to display Events by type. Example: Conference, Virtual Event, Brunch, etc.
For View, select "Calendar" or "List".
Specify Height; the default is 500px.
The Click Behavior field defines how to open the Event details.
Enabling the Show My Events field will allow an Attendee to view the Events they are registered for.
Configure a Specific Event
Only define the Event field.
Go to the Event page in Salesforce that you want to post in your Community. Click on the Event URL link.
Grab the last portion of the URL to load a single Event:
Here is the full link for reference:
Configure a Dynamic Event URL
What is this wizardry?! You are telling me that I can create a static Community page but dynamically load any Event I want? Stop playing, Blackthorn!
Open your Community in "Builder" mode and click the Settings icon at the top.
Click New Page.
Select a "Standard Page" in the pop-up menu.
Add the Blackthorn Events component to the page.
- Set Event Group = "None"
- Set View = "List"
Click your page and you'll see the URL field. This is used as part of the dynamic URL.
Now, any Event you want to give to your Attendees is a simple copy and paste. Here is the formatting for the URL to provide:
- Here is an example URL:
Our suggestion would be to create the URL in a text formula field on the Event object.
- Create a text formula field on the Event object.
- The formula will be:
Register Community Users
There are several steps that need to be completed before Community users can register. External users need to be able to access your Community and have the ability to log in. Salesforce documentation to enable this can be found here.
Once the six steps in the Salesforce documentation have been completed, you are ready to log in as a Community user! Community users that have log in credentials will be able to log in and register for Events.
Register Non-Community Users
You may want to share your Community with guests as well as verified users. To do this is simple! Follow these easy steps.
From your Community builder, navigate to "Settings" and click on your Guest User Profile.
Give the guest user access to the Blackthorn | Events (Community Guest User) permission set.
Make sure "Sharing Settings" are defined properly. To do this, navigate to Setup and search for "Sharing Settings". Set all Blackthorn Events Objects have
Default External Access= "Public Read Only" or "Public Read/Write".
Navigate to "Event Sharing Rules" and click New.
Recreate the settings below to allow access to view all Events by default:
Navigate to "Event Group Sharing Rules" and click New.
Recreate the settings below to allow access to view all Event Groups by default:
Now all guest users will be able to access the Blackthorn Events Community component!
Allow Users to View Your Community
The user you assign must have a profile that you assigned to the access the Community. This will allow them to view the Blackthorn | Events Lightning Component.
This can be found under Communities > Administration > Members > Available Profiles.
Please make sure Community users have the following permission sets assigned to them:
For authorized users:
- Blackthorn | Events (Community/Platform User)
- Blackthorn | Payments (Community/Platform User)
For guest users:
- Blackthorn | Events (Community Guest User)
There are two ways to test the Community component for users. You can log in via the Contact, or sign in directly to the community with the user's login credentials.
Option 1: Navigate to the Contact record and click Log in to Community as User.
Option 2: Log in to your Community using the user's login credentials.
Click on the Event you want to register for.
Click Add Myself.
You will see all contact information pre-filled into the Attendee Form!
If Show My Events is enabled from "Configure a List or Calendar View of Events" Step 6 for the Configuration in Community, an Attendee will be able to view all the Events they are registered for by clicking the "Heart" icon in the categories section.
In this example, the Attendee has registered for "SDO - Blackthorn Conference," notice the heart icon is full.
The following image shows all the Events the Attendee is eligible to register for. Notice the heart icon is empty.
Q: My Events aren't showing the changes I make in Salesforce, what gives?
A: Salesforce Communities + Blackthorn takes some time to clear the cache and update the Event. Please wait approximately 15 minutes for this to happen. Please note, using the Publish button in this scenario will not manually refresh the cache.
Q: How can I control what language is displayed in the Community component?
A: The Community component is controlled by the Salesforce user's Locale setting. This can be found under User > Settings > My Personal Information > Language & Time.
Q: My Redirect URL is not working in the Community component.
A: To fix this, add the redirection domain to CSP Trusted Sites on Salesforce (Setup > Security > CSP Trusted Sites). The redirection domain should have relaxed CSP rules or the parent domain (in this case
https://*.force.com - for communities) needs to be added to the frame-ancestor rule.