Why would we create Celebrations or use the Trailshred Audio Player at all?
To be honest idk dawg, maybe just to spice up your life a little bit and have some fun? You could make a super sweet easter egg for your Salesforce org. Maybe you wanna boost your Sales teams morale with something interesting and unexpected? No matter how you slice this banana bread chocolate chip pancake it all boils down to choosing to do something that’s a little fun for the people around you and sometimes that’s the best thing you could build. Everybody gets tired of being a serious fanci boi all day. Take a stroll down having a little fun lane for once my guy.
How to setup Confetti Celebrations using Paths
To be honest, this is super easy. If you’ve never heard of paths, you can check out some sweet info here. Basically you just do the following:
1) Go to Setup -> Path Settings and click the “New Path” button
2) After clicking the “New Path” button follow the steps and fill out the fields as requested, until you get to Step 3.
3) On step 3 of the Path setup there will be an area called “Enable Celebrations”. Enable them. Then pick what triggers the confetti celebrations and how often the celebrations happen.
4) Congrats, you did it!
How to use the Trailshred Audio Player to play some ultra lit audio for your Sales Broz
And now we get to the guuuuuuddddddddddddd stuff. Salesforce has created a relatively simple and lightweight unmanaged package called the Trailshred Audio Player to allow you to play audio you upload to static resources by playing an LWC on lightning record pages. Let’s check out how to use this thing.
1) Install the unmanaged package here: https://login.salesforce.com/packagingSetupUI/ipLanding.app?apvId=04t1U000007sa55QAA
2) After the Trailshred Audio Player has been installed in your org, create and upload any audio file as a static resource (the audio must be less than 5mb and be an mp3 or wav file).
3) Copy the name of the static resource you just created.
4) Go to Setup -> Custom Metadata Types -> Trailshred Settings -> Manage Records
5) Create a new Trailshred Settings record and place the name of your static resource audio file in the “Audio Static Resource Path” field, then pick the Object you want the audio to run on, pick the field you want the audio to trigger on and the value for that field it should trigger on.
6) That’s it playur, you did it! On to the next section!
Setting up the Lightning App Record Page to Play the Celebration
Alright alright alright, we’re almost there, this is the last step and it’s super easy. You gotta create a lightning record page app. Let’s check out how to get it done son.
1) Go to Setup -> Lightning App Builder and click the “New” button to create a new lightning app record page (or choose to update an existing one).
2) Search for the “Path” component on the lightning app builder page and place it on the page. This will add your confetti celebration.
3) Search for the “Trailshred Audio Player” in the component search in the lightning app builder and place it at the bottom of the page. This component is invisible (because it just plays audio) so after placing it you should just see it represented by an empty space.
4) Save and Activate your lightning app record page.
5) That’s it! You did it homie! You finally had some fun!
That’s it guys, hopefully you had a little fun building it and someone gets a good laugh out of whatever you built!
Get Coding With The Force Merch!!
We now have a redbubble store setup so you can buy cool Coding With The Force merchandise! Please check it out! Every purchase goes to supporting the blog and YouTube channel.
Get Shirts Here!
Get Cups, Artwork, Coffee Cups, Bags, Masks and more here!
Check Out More Coding With The Force Stuff!
If you liked this post make sure to follow us on all our social media outlets to stay as up to date as possible with everything!
Salesforce Development Books I Recommend
Advanced Apex Programming
Salesforce Lightning Platform Enterprise Architecture
Mastering Salesforce DevOps
Good Non-SF Specific Development Books: