Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Update the Lightning Page and Test the Project

It’s Almost Time to Rock

OK, by now you uploaded an audio file, installed a package, and created a custom metadata record. The final step is to update the opportunity page, so that your component will play the audio file you uploaded.

Create an Opportunity

Create a sample opportunity. 

  1. From the App Launcher ( ), find and select Sales.
  2. Click Opportunities.
  3. Click New.
  4. For Opportunity Name enter Winning Deal.
  5. For Stage select Prospecting.
  6. For Close Date select any future date.
  7. Click Save.

Update the Opportunity Page

Now, update the page to use the custom Trailshred Audio Player component.

  1. From your sample opportunity record, click Setup and select Edit Page. This opens Lightning App Builder. You use Lightning App Builder to update the page.
  2. Enter audio in the Search Components box, then drag the Trailshred Audio Player custom component onto the canvas and drop it at the bottom of the page. Be sure not to drop the component inside any existing components on the page.

Adding custom Trailshred Audio Player component to the canvas.

The component has no visible content, so you should see an outline around a transparent box at the bottom of the canvas.

Custom Trailshred Audio Player component added to the canvas.

Activate the Opportunity Page

Save your changes and activate the modified page for your users.

  1. Click Save.
  2. Click Activate.
  3. Select Assign as Org Default.
  4. Leave the form factor selection as is and click Next.
  5. Click Save.
  6. Click Back button to return to your sample opportunity record.

Test the Project

It’s time to test it out! You should be back on your sample opportunity, but if not, from the App Launcher ( ), find and select Sales, click Opportunities, and open the Winning Deal opportunity.

Make sure you turn up your speakers on your computer and get ready to rock.

  1. Click Edit.
  2. For Stage, select Closed Won.
  3. Click Save.

And listen to the sounds of your audio clip play!

Note

Did the audio not play? Try these steps:

  • Ensure you activated your changes to the Opportunity record page.
  • Ensure your opportunity record’s Stage was not already Closed Won. The component only plays audio when the field value changes to the configured value in the custom metadata record.
  • Ensure the file you uploaded as a static resource is an audio file with extension .mp3 or .wav.
  • Ensure your Trailshred Setting custom metadata record is configured correctly, such as the Audio Static Resource Path matches your static resource name exactly, which may not be the same name as the file you uploaded from your computer.
  • If you added the component to a tabbed section on the record page, ensure that tab is focused before editing the record. If the component is in an unfocused tab then the audio won’t play.

You Did It!

You just added some customized fun to your org, including:

  • An audio file
  • An installed package, which includes a Lightning Web Component
  • A custom metadata record
  • An updated opportunity page

Well done. Now go forth and rock it in Salesforce!

Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기