Loading
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Trigger Handlers for the SurveySubject - Visitor Objects

          Trigger Handlers for the SurveySubject - Visitor Objects

          Review the names, descriptions, and trigger conditions of the trigger handlers associated with the SurveySubject, Territory2, TerritoryAcctRcmdAction, TerritoryBusinessPlan, TerritoryContentTmplAsgnt, TerritoryUserDowntime, Visit, and Visitor objects.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise and Unlimited Editions with Life Sciences Cloud, Life Sciences Cloud for Customer Engagement Add-on license, and the Life Sciences Customer Engagement managed package.

          SurveySubject

          Review the names, descriptions, and trigger conditions of the trigger handlers associated with the SurveySubject object.

          Trigger Name Description Trigger condition
          SurveyInvitationSharingHandler

          Applies survey sharing logic on the Survey Subject object. When survey subject records are created or updated, this trigger handler automatically creates survey invitation share records based on one of three strategies:

          Account-Based Sharing: When a survey subject is linked to an account, the trigger handler automatically creates survey invitation share records for accounts listed in the related account’s account share records. This sharing logic doesn’t apply to records where the rowCause field is set to Owner.

          Life Sciences Marketable Product-Based Sharing: When you link a survey subject record to a Life Sciences marketable product, the corresponding survey invitation share records are created for either accounts or territories based on the product territory availability records. The availability of the product is determined by the product territory availability object, which includes an alignment type field with options such as territory subordinates, territory inclusion, or territory exclusion.

          Territory-Based Sharing: When a survey subject record is linked to a territory, survey invitation share records are created for that territory and its subordinates.

          beforeInsert, afterInsert, afterUpdate

          Territory2

          Review the names, descriptions, and trigger conditions of the trigger handlers associated with the Territory2 object.

          Trigger Name Description Trigger condition
          Territory2Handler Prevents the deletion of a Territory2 record when related records like ProviderAcctTerritoryInfo, Inquiry, ContactPointBestContactTime, TerritoryAcctRcmdAction, TerritoryAccountScore, TerritoryAcctProdMsgScore, TerritoryUserDowntime, or TerritoryBusinessPlan records reference it. beforeDelete

          TerritoryAcctRcmdAction

          Review the names, descriptions, and trigger conditions of the trigger handlers associated with the TerritoryAcctRcmdAction object.

          Trigger Name Description Trigger condition
          TerrAcctRcmdActionSharingHandler Shares the territory account recommended action records with the specified territory. afterInsert, afterUpdate
          TerrAccRcmActStatusUpdateHandler Updates the status of the territory account recommended action when a visit is created. afterInsert, afterUpdate

          TerritoryBusinessPlan

          Review the names, descriptions, and trigger conditions of the trigger handlers associated with the TerritoryBusinessPlan object.

          Trigger Name Description Trigger condition
          TerritoryBusinessPlanDeleteHandler Deletes Territory Business Plan records. beforeDelete
          TerritoryBusPlanChangeStatusHandler Updates the statuses of Territory Business Plan records. beforeInsert, beforeUpdate

          TerritoryContentTmplAsgnt

          Review the names, descriptions, and trigger conditions of the trigger handlers associated with the TerritoryContentTmplAsgnt object.

          Trigger Name Description Trigger condition
          EmailTemplateTerritorySharingHandler Updates territory sharing based on Territory Content Template Assignment records. afterInsert, afterUpdate, afterDelete

          TerritoryUserDowntime

          Review the names, descriptions, and trigger conditions of the trigger handlers associated with the TerritoryUserDowntime object.

          Trigger Name Description Trigger condition
          TUDUpdateHandler Updates the start time and end time of time off territory records based on the time slot interval configuration. beforeInsert, beforeUpdate
          UDBHValidationHandler Prevents the creation of time off territory records with start and end times outside of the org's business hours. beforeInsert, beforeUpdate
          TUDSharingHandler Shares a user's time off territory records with other users in the same territory, giving them read-only access. afterInsert
          TUDVisitValidationHandler Prevents the creation of time off territory during a visit. beforeInsert, beforeUpdate
          TUDHolidayValidationHandler Prevents the creation of time off territory records on holidays. beforeInsert, beforeUpdate
          TUDOverlapHandler Prevents the creation of overlapping time off territory records. beforeInsert, beforeUpdate
          TUDEventValidationHandler Prevents the creation of time off territory during a general event. beforeInsert, beforeUpdate

          Visit

          Review the names, descriptions, and trigger conditions of the trigger handlers associated with the Visit object.

          Trigger Name Description Trigger condition
          VisitLockHandler Prevents editing visit data based on the status and signature state to maintain data integrity. beforeInsert, beforeUpdate
          VisitTimeOffValidationHandler Prevents scheduling a visit that conflicts with a time-off territory to support scheduling efficiency and accurate visit reporting. beforeInsert, beforeUpdate
          VisitLifeScienceAccountListLinkHandler Clears the Life Science Account List field on the provider visit record if the Planned Start Time is changed on a visit created by applying a routine. beforeUpdate
          VisitHolidayValidationHandler Prevents scheduling a visit on holidays or outside of business hours to maintain compliance with company policies. beforeInsert, beforeUpdate
          VisitPopulateEndTimeHandler Calculates and sets the visit's Planned End Time by adding the default duration defined in the “Set blank date/time in Planned Start Time” Visit Administration setting in the Admin Console. beforeInsert, beforeUpdate
          FutureVisitLimitValidationHandler Prevents scheduling visits beyond the limit specified in the “Future Visit Limit in Days” setting in Visit Administration in the Admin Console. beforeInsert, beforeUpdate
          VisitUpdateChildFieldsHandler Maintains data consistency in group visits by synchronizing child visit records with their parent visits. Automatically updates key fields (Planned Visit Start Time, Planned Visit End Time, and Channel) when the parent visit is modified. afterUpdate
          VisitDelayReasonHandler Clears the previously entered reason for delay if a user changes the visit date and time and the date no longer exceeds the submission delay threshold. beforeUpdate
          VisitCascadeDeleteHandler Deletes attendee visits automatically when the parent group visit is deleted, maintaining data integrity. beforeDelete
          VisitSurveyInviteCascadeDeleteHandler Deletes survey invitations linked to a visit when a visit is deleted, and prevents deleting them if the visit is submitted to maintain data integrity. beforeDelete
          RemoteSessionInvitationVisitHandler Manages remote session invitations by creating video calls, email notifications, and session keys for visit records. afterUpdate, beforeDelete
          VisitMyBestTimeValidationHandler Prevents scheduling visits outside of best times defined for the account address and user's territory, improving scheduling efficiency and aligning with account availability. beforeInsert, beforeUpdate
          VisitChangePrimaryAccountHandler Performs validations, updates related records, and prepopulates fields in the visit to maintain data consistency when the primary account is changed. beforeInsert, beforeUpdate, afterUpdate

          Visitor

          Review the names, descriptions, and trigger conditions of the trigger handlers associated with the Visitor object.

          Trigger Name Description Trigger condition
          VisitorLockHandler Prevents insert/update/delete operation on Visitor if it is locked. beforeInsert, beforeUpdate, beforeDelete
          VisitorShareHandler Shares the Visit record with the Visitors (employees). afterInsert, afterUpdate, afterDelete
           
          Loading
          Salesforce Help | Article