Skip to main content

Create a Custom Metadata Record

With Great Components Come Great Responsibility

In this step, you use custom metadata types, which allow you to use records in Salesforce to configure your app. The package you installed already has the custom metadata type set up in the component. All you have to do is configure it.

Now, this component allows you to add sounds to all kinds of actions in your Salesforce org. But beware! With great components come great responsibility. Don’t annoy your users (or their neighbors) by adding sound effects to every last thing they do.

Create the Configuration

Create a configuration to play your audio file when users update an opportunity stage to Closed Won.

  1. From Setup, enter metadata in the Quick Find box, then select Custom Metadata Types.
  2. Locate the type Trailshred Setting, then click Manage Records.
  3. Click New.
  4. Create the metadata record as follows:
    • Label: Audio When Oppty Closed Won
    • Trailshred Setting Name: Audio_When_Oppty_Closed_Won
    • Active: checked
    • Audio Static Resource Path: sound1 
    • Object Name: Opportunity
    • Field Name: Stage
    • Field Value: Closed Won
  5. Click Save.

Your custom metadata record should look like this:

Custom metadata record to play audio when Opportunity Stage equals Closed Won.

You did it! Up next, you finish up the project by updating the opportunity page and testing it out.

继续免费学习!
注册帐户以继续。
有什么适合您的内容?
  • 为您的职业目标获取个性化推荐
  • 通过实践挑战和测验练习您的技能
  • 跟踪并与雇主分享您的进度
  • 与人联系以获取指导和就业机会