Loading
Safety Cloud
목차
필터 선택

          결과 없음
          결과 없음
          몇 가지 검색 팁

          키워드의 맞춤법을 확인하십시오.
          더 일반적인 검색 용어를 사용하십시오.
          필터 수를 줄여 검색 범위를 확장하십시오.

          전체 Salesforce 도움말 검색
          Configure Safety Cloud Triggers

          Configure Safety Cloud Triggers

          The Safety Cloud package comes with its own list of functionality managed by a trigger framework. You can extend the Safety Cloud triggers with additional functionality, as described here.

          Required Editions

          Available in: Enterprise and Unlimited Editions
          User Permissions Needed
          To modify trigger settings: Modify All Data

          Safety Cloud trigger functionality exists in a custom metadata type called Trigger Settings. These custom metadata records point to units of custom Apex logic.

          All Safety Cloud trigger settings are enabled by default except for the Send Marketing Cloud Emails setting. When you’re ready to send communications to event attendees, you can pair this setting with the Marketing Cloud Engagement email setup.

          We don’t advise turning off any of the other trigger settings unless there’s a specific reason.

          To access and modify Safety Cloud triggers, and to create your own triggers, complete these steps.

          1. Access and work with Safety Cloud triggers.
            1. From Setup, in the Quick Find box, enter Custom Metadata Types, and then select Trigger Setting.
            2. Next to the custom field that you want to edit and update, click Edit .
            3. Save your changes.
          2. Activate a Trigger Setting.
            1. Access the trigger setting that you want to activate.
            2. Set the Active checkbox to True.
            3. Save your changes.

            To block users from changing the status of a Health Verification record, you must activate the Block Status Change trigger.

            Note
            Note The Block Status Change is set to Active by default.
          3. Optional: Create your own Trigger Module Class.
            1. To create your own Trigger Module Class and deploy a new Trigger Setting, create a class that inherits the Safety Cloud TriggerModule interface.
            2. After you create the class, create a trigger setting record with the name of your class, and then set it to Active.
            3. You can use Table-Driven Trigger Management (TDTM) to create and deploy a new Trigger for Safety Cloud.

            For information about TDTM, see Table-Driven Trigger Management (TDTM) Overview.

            Implementation example for creating the class:

            
            public with sharing class MyTriggerClass implements safetycloud.TriggerModule {
              
             public void run(List<Health_Verification__c> healthVerifications, Map<Id, Health_Verification__c> oldHealthVerificationsById) {
                 if (Trigger.isBefore && Trigger.isUpdate) {
                     runCustomLogic(healthVerifications, oldHealthVerificationsById);
                 }
             }
             private void runCustomLogic(List<safetycloud__Health_Verification__c> healthVerifications, Map<Id, safetycloud__Health_Verification__c> oldHealthVerificationsById) {
                 //TODO: custom logic
             }
            }
            

            Accompanying Trigger Setting example:

            
            <?xml version="1.0" encoding="UTF-8"?>
            <CustomMetadata xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
              <label>My Custom Trigger</label>
              <protected>false</protected>
              <values>
                  <field>Active__c</field>
                  <value xsi:type="xsd:boolean">false</value>
              </values>
              <values>
                  <field>Class__c</field>
                  <value xsi:type="xsd:string">MyTriggerClass</value>
              </values>
              <values>
                  <field>Order__c</field>
                  <value xsi:type="xsd:double">1.0</value>
              </values>
            </CustomMetadata>
          Example
          Example

          Additional Key Trigger Settings

          Person Accounts: Each person account has its own external Id. All Health Verifications are linked to a person account.

          Set QR Code Logic:This setting sets the QR Code checkbox and date logic. You can disable this trigger setting and create your own QR code logic to suit your needs.

           
          로드 중
          Salesforce Help | Article