Understanding Triggers

Follow
Some of the functionality described in this article is available as part of our Pinot Meunier release and will not be available if your Practifi instance is not upgraded to this release. 

Please note: This content is intended for Practifi System Administrators and is technical in nature. The steps described in this article may not be completed without System Administrator permissions.

Overview

Triggers in Practifi enable the system to perform custom actions before or after changes to records, such as insertions, updates, or deletions, keeping your data consistent without requiring manual intervention. For example, triggers run in the background to update the Client Stage on the Entity object whenever a user promotes a prospect to a client.

Triggers are enabled in the Custom Settings area in Salesforce Setup. This article describes the available triggers in Practifi.


View Practifi Trigger Settings

To access Practifi triggers, do the following:

  1. Navigate to Salesforce Setup by clicking the gear icon in the upper right-hand corner of the screen and selecting Setup.


     
  2. Use the Quick Find search to search for and select Custom Settings.


     
  3. On the Custom Settings page, scroll down and click Practifi Trigger Settings.


     
  4. The Practifi Trigger Settings page displays a list of triggers.


Trigger Actions

Triggers in Practifi perform custom actions before or after record changes. Practifi triggers are based on the following operations:

  • Before Insert
  • After Insert
  • After Update
  • After Delete
  • After Undelete

For more information on how triggers work, please see this Salesforce Help documentation.


Set As Created Date/Created By Trigger Setting

As of the Pinot Meunier release, we added the Set As Created By field to the following objects:

  • Entity
  • Contact
  • Deal
  • Service
  • Asset/Liability

The Set As Created Date and Set as Created By fields are intended to support data migration and delta load scenarios, providing administrators with a reliable way to preserve the original record provenance when loading historical data. They allow users to identify the original creator of a record. These fields are updated by API calls from sources such as Data Loader, Salesforce Inspector, and integrations.

During Insert operations, the value from the Set As Created By field is copied into the system field CreatedById if permitted by trigger settings. During Update operations, only the custom field is updated, while CreatedById remains unchanged. This behavior is enabled when the Set Created Date & Created By Via API setting is enabled in Practifi Trigger Settings, or when no Practifi Trigger Setting record exists.

Insert/Update/Upsert operations vary by object type, as detailed in the table below:

Object Insert Behavior Update Behavior Upsert Behavior
Service Copies both custom fields to system fields Only custom fields are updated
  • New: both copied to system fields
  • Existing: only custom fields are updated
Asset/Liability N/A
Entity N/A
  • New: both copied to system fields
  • Existing: only custom fields are updated
Deal N/A
Contact Only custom fields are updated N/A


Enabling the Set Created Date and Created By Via API Setting

To enable the Set As Created Date and Set As Created By fields to be updated via API calls:

  1. Navigate to Salesforce Setup by clicking the gear icon in the upper right-hand corner of the screen and selecting Setup.


     
  2. Use the Quick Find search to search for and select Custom Settings.


     
  3. On the Custom Settings page, click the Manage link next to Practifi Trigger Settings.


     
  4. On the Practifi Trigger Settings page, click the Edit button at the top of the screen.


     
  5. On the edit screen, scroll down and check the Set Created Date & Created By Via API box.


     
  6. Scroll up and click the Save button at the top of the screen.


     

Practifi Trigger Explainers

Below is an alphabetical list of Practifi triggers. Click the headings to view detailed information about each trigger.

Account

  1. If Account (Account__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Update Dates for each client Stage
        • Stores the dates when the Client Stages are updated. Updates the Became 'Stage field with the current date.
      • Auto-populate the fields on the Entity
        • Populates the account fields like Primary Entity field from the Parent Id, ranges of days since last contact, and date of first contact
        • Also populates the fields related to person account, like State of Residence, Preferred Phone, and Related Division
      • Update the Record Type based on the stage
        • If the stage is changed, update the record type of the record based on the stage selected.
        • For advisor, if current entity's Client_Stage__c or Type__c is changed, then get record type basis on Client_Stage__c & Type__c
        • For retirement user, if current entity's Member_Stage__c or Employer_Stage__c or Type__c is changed, then get record type based on Member_Stage__c & Type__c or Employer_Stage__c & Type__c.
      • Update the Email and Phone based on the Preferred Email and Preferred Phone.
        • If an account is a person account, i.e., individual accounts/individual members update the phone/email of the individual based on the individual's preferred fields.
        • If an account is a Member of a household/organization and one of the three phone fields is updated, update the primary entity's phone/email based on its preferred fields
        • If an account is a business account, then update the Phone/email on the account if the preferred fields are set to primary contact values
      • Update the Related Division on the Entity (Account)
        • If the Owner has a Primary Division under Division Member, then tag that division on the Entity record.
        • For Person Accounts, override the primary division with the Group account's primary division.
        • For client entities, override primary division with the parent client's primary division.
      • Check Missing Information
        • Get the field names (API Name) that need to be checked for the missing information from the Entity Missing Information Settings custom setting.
        • Check if the current account record has these fields populated or not. If these fields are not populated, then add these fields to the missing information field on the Entity.
      • Set Mailing Label Display fields
        • Set default values on Mailing Label Display fields. Populate the Mailing Label based on flags and combinations.
      • Calculate Acquisition Stage Age
        • If practifi__Acquisition_Stage__c is Due Diligence on entity then populate the practifi__Days_in_Due_Diligence_Range__c.
        • Populate practifi__Days_in_Due_Diligence_Range__c between 1-10 days, 10-30 days, 30-60 days, 60-90 days, or 91+ days.
        • If practifi__Days_in_Due_Diligence_Range__c is Onboarding then practifi__Days_in_Onboarding_Range__c is populated.
        • Populate practifi__Days_in_Onboarding_Range__c between 1-30 days, 30-90 days, 90-120 days, 120-180 days, or 180+ days.
      • Calculate Number of Employees Range
        • Calculates the number of employees range on the Entity. Updates the number of employees range between 1-10, 10-25, 25-50, 50-100, 100-250, 250-500, or 500+.
      • Calculate AUM Range
        • Calculates the AUM range for the Entity
      • Update Definitions field
        • Updates the Definitions__c field on account with the following information, if it is available, in a comma-separated list: [Client Segment] [Client Stage] [Influencer Segment] Influencer [Member Role] ([Member of.ID] - ['Member of' definitions]).
    • Before Update
      • Update Definitions field
        • Updates the Definitions__c field on account with the following information, if it is available, in a comma-separated list: [Client Segment] [Client Stage] [Influencer Segment] Influencer [Member Role] ([Member of.ID] - ['Member of' definitions]).
      • Update Dates for each client Stage
        • Stores the dates when the Client Stages are updated. Updates the Became 'Stage field with the current date.
      • Auto-populate the fields on the Entity
        • Populates the account fields like Primary Entity field from the Parent Id, ranges of days since last contact, and date of first contact.
        • Also populates the fields related to person account, like State of Residence, Preferred Phone, and Related Division.
      • Update the Record Type based on the stage
        • If the stage is changed, update the record type of the record based on the stage selected.
        • For advisor, if current entity's Client_Stage__c or Type__c is changed, then get record type basis on Client_Stage__c & Type__c
        • For retirement user, if current entity's Member_Stage__c or Employer_Stage__c or Type__c is changed, then get record type based on Member_Stage__c & Type__c or Employer_Stage__c & Type__c.
      • Update the Email and Phone based on the Preferred Email and Preferred Phone.
        • If an account is a person account, i.e., individual accounts/individual members update the phone/email of the individual based on the individual's preferred fields.
        • If an account is a Member of a household/organization and one of the three phone fields is updated, update the primary entity's phone/email based on its preferred fields.
        • If an account is a business account, then update the Phone/email on the account if the preferred fields are set to primary contact values.
      • Update the Related Division on the Entity (Account)
        • If the Owner has a Primary Division under Division Member, then tag that division on the Entity record.
        • For Person Accounts, override the primary division with the Group account's primary division.
        • For client entities, override the primary division with the parent client's primary division.
      • Check Missing Information
        • Get the field names (API Name) that need to be checked for the missing information from the Entity Missing Information Settings custom setting.
        • Check if the current account record has these fields populated or not. If these fields are not populated, then add these fields to the missing information field on the Entity.
      • Sync Account Address
        • If Sync is enabled for a Primary Entity's address field, all members who haven't been excluded from the Sync will have that Entity's address value.
      • Set Mailing Label Display fields
        • Set default values on Mailing Label Display fields. Populate the Mailing Label based on flags and combinations.
      • Calculate Acquisition Stage Age
        • If practifi__Acquisition_Stage__c is Due Diligence on entity then populate the practifi__Days_in_Due_Diligence_Range__c.
        • Populate practifi__Days_in_Due_Diligence_Range__c between 1-10 days, 10-30 days, 30-60 days, 60-90 days, or 91+ days.
        • If practifi__Days_in_Due_Diligence_Range__c is Onboarding then practifi__Days_in_Onboarding_Range__c is populated.
        • Populate practifi__Days_in_Onboarding_Range__c between 1-30 days, 30-90 days, 90-120 days, 120-180 days, or 180+ days.
      • Calculate Number of Employees Range
        • Calculates the number of employees range on the Entity. Updates the number of employees range between 1-10, 10-25, 25-50, 50-100, 100-250, 250-500, or 500+.
      • Calculate AUM Range
        • Calculates the AUM range for the Entity.
    • After Insert
      • Log Stage History
        • Creates the Stage History record with the details like Entry date, Exit date, Previous Stage, and Stage Category, when the Stages on Entity are updated.
      • Update Primary Member Lookup On Individuals
        • Checks the Account Type is Individual, and its PersonContactId is not null, and then updates the Primary Member lookup field with the respective individual's contact.
    • After Update
      • Update Sharing Scope field
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
      • Update the Definitions__c field on member account
        • When the Entity name is modified, the member definition should update the name of the Primary Entity.
      • Subscribe to Emoney
        • If Emoney_Integration_Setting__c is enabled then sync record with Emoney.
      • Sync with Xplan
        • If the Sync__c is enabled and if the records are updated in Salesforce then sync the updates with Xplan.
      • Sync updates with Constant Contact
        • When contact is updated or deleted, the same changes are synced/updated at the CTCT side to reflect these changes.
      • Update Contact Point Address
        • If the Email, Phone, or address is updated on the record, then update the same details in the ContactPointEmail, ContactPointPhone, and ContactPointAddress objects, respectively.
      • Update Relationship Names
        • If the First name, Last name, or Defer Automation field on the entity is changed, this method updates the From Name and To Name on the relationships.
      • Log Stage History
        • Creates the Stage History record with the details like Entry date, Exit date, Previous Stage, and Stage Category, when the Stages on Entity are updated.
      • Post to Noticeboard
        • If the Individual is a member of the household and is deceased (that is, Date of Death is populated on the member), then display a noticeboard post with the alert level set to Important. The post is never archived.
    • After Delete
      • Delete Stage History
        • If the Entity (Account) record is deleted then delete the corresponding Stage History (Stage_History__c) records.
  2. If Orion_Account__c is enabled in Practifi Trigger Settings then
    • Before Insert
      • Update type and stage for Orion entity
        • If OASP__Orion_id__c is not null then update the practifi__Client_Stage__c as Client and practifi__Type__c as Household.
    • Before Update
      • Update type and stage for Orion entity
        • If OASP__Orion_id__c is not null then update the practifi__Client_Stage__c as Client and practifi__Type__c as Household.
  3. If Account_Rollups__c is enabled in trigger settings then
    • Perform the roll-up summary using the LREngine library and based on the lookups described in RollupSummary.
  4. Before Insert
    • Set Created Date on before insert
      • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.
  5. Implications of Deactivating the Trigger
    • If the practifi__Defer_Automation__c field of Record is set to true, then the trigger logic will not execute. No method will be executed once practifi__Defer_Automation__c is set to true.
  6. Defer Automation Logic
    • The following actions will fire when the Defer Automation flag is updated from True to False:
      • Update Relationship Names
      • Update the Email and Phone based on the Preferred Email and Preferred Phone
      • Update Contact Point Address
      • Updates the Definitions__c field on member account
      • Update Definitions field
    • The following actions will NOT fire when the Defer Automation flag is updated from True to False:
      • Sync Account Address
      • Update the Related Division on the Entity (Account)
      • Update Dates for each client Stage
      • Log Stage History
      • Update the Record Type based on the stage
      • Set Mailing Label Display fields
      • Calculate Acquisition Stage Age
      • Calculate Number of Employees Range
      • Calculate AUM Range
  7. If Account (Account__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Account (Account__c) is enabled in Practifi Trigger Settings then) will not get fired. Other methods will be fired based on the Orion_Account__c and Account_Rollups__c values in the trigger settings.
  8. If Orion Account (Orion_Account__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 2 (If Orion_Account__c is enabled in Practifi Trigger Settings then) will not get fired. Other methods will be fired based on the Account__c and Account_Rollups__c values in the trigger settings.

Account Team Member

  1. If Account Team Member (Account_Team_Member__c) is enabled in Practifi Trigger Settings then
    • After Insert
      • Set Service Team on Account
        • Get all the account team members and then update the Servicing_Team__c field on account with an alphabetical comma-separated list of Account Team Members assigned to the account.
      • Sync AccountTeamMember To TeamMember
        • If the Sync_AccountTeamMember_To_TeamMember__c setting is enabled in the Practifi Trigger settings then create/update the Account Team Member in the Team Member custom object with the details like start date, and related account team member.
    • After Update
      • Set Service Team on Account
        • Get all the account team members and then update the Servicing_Team__c field on account with an alphabetical comma-separated list of Account Team Members assigned to the account.
      • Sync AccountTeamMember To TeamMember
        • If the Sync_AccountTeamMember_To_TeamMember__c setting is enabled in the Practifi Trigger settings then create/update the Account Team Member in the Team Member custom object with the details like start date, and related account team member.
    • After Delete
      • Set Service Team on Account
        • Get all the account team members and then update the Servicing_Team__c field on account with an alphabetical comma-separated list of Account Team Members assigned to the account.
      • Sync Account Team Member Deletion
        • If Sync_AccountTeamMember_To_TeamMember__c is enabled in trigger settings then update the End Date (End_Date__c) on team member with the current date.
  2. If Account Team Member (Account_Team_Member__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Account Team Member (Account_Team_Member__c) is enabled in Practifi Trigger Settings then) will not get fired.

Addepar Portfolio

  1.  
    1. If Addepar Portfolio (Addepar_portfolio__c) is enabled in Practifi Trigger Settings then
      • Before Update
        • Clear the Revenue on Portfolio without the client
          • If the portfolio is not associated with any Client (Account/Entity) then set the Revenue (Revenue__c) field to null.
      • After Update
        • Update Client Portfolio
          • If Addepar_Integration_Settings__c is enabled, the records with added/new client run a batch job to get/update their assets and holdings.
    2. If Addepar_Portfolio_Rollups__c is enabled in Practifi Trigger Settings
      • Then perform the roll-up summary using the LREngine library and based on the lookups described in RollupSummary.
    3. If Addepar Portfolio (Addepar_portfolio__c) is not enabled in Practifi Trigger Settings
      • Then methods mentioned under Point 1 (If Addepar Portfolio (Addepar_portfolio__c) is enabled in Practifi Trigger Settings then) will not get fired.

AgiLink Client

  1. If AgilLink Client (AgilLink_Client__c) Trigger is enabled in Practifi Trigger Settings.
    • Before Insert
      • If AgilLink Integration is enabled (Enabled__c) from AgilLink Integration Settings. Populate the standard Name field on AgilLink Client.
        • If the standard Name field value is blank on AgilLink Client, and if AgilLink Client Name is available on AgilLink Client, then populate the first 80 characters of AgilLink Client Name in the standard Name field.
    • Before Update
      • If AgilLink Integration is enabled (Enabled__c) from AgilLink Integration Settings. Populate the standard Name field on AgilLink Client.
        • If the standard Name field value is blank on AgilLink Client, and if AgilLink Client Name is available on AgilLink Client, then populate the first 80 characters of AgilLink Client Name in the standard Name field.
    • After Update
      • If AgilLink Integration is enabled (Enabled__c) from AgilLink Integration Settings. Initiate the sync process with AgilLink.
        • If the Client (Entity Lookup) field value is not blank on AgilLink Client, and if Client (Entity Lookup) is updated on AgilLink Client, then initiate the sync process with AgilLink.

Asset/Liability

  1.  
    1. If Asset Liability (Asset_Liability__c) is enabled in Practifi Trigger Settings then
      • Before Insert
        • Set Value Field
          • For assets: copy the Asset_Value__c field onto Value__c.
          • For liabilities: multiply Liability_Value__c by -1 and copy to Value__c.
        • Populate the Related Division
          • Populate the related division on asset/liability from service if it's not blank, else populate from its related client.
        • Set Related Service
          • If Asset_Liability does not have a service, assign a related service to it only if the Asset_Liability is Under Advice and not Disposed.
          • If multiple services exist, tag the newest one.
          • If the service doesn't exist for the client with that asset, then create a new Asset-Based service and add it to the Client.
        • Update Financial Product
          • Populates Parent Financial Product based on the parent financial product on the financial product object.
      • Before Update
        • Set Value Field
          • For assets: copy the Asset_Value__c field onto Value__c.
          • For liabilities: multiply Liability_Value__c by -1 and copy to Value__c.
        • Populate the Related Division
          • Populate the related division on asset/liability from service if it's not blank, else populate from its related client.
        • Set Related Service
          • If Asset_Liability does not have a service, assign a related service to it only if the Asset_Liability is Under Advice and not Disposed.
          • If multiple services exist, tag the newest one.
          • If the service doesn't exist for the client with that asset, then create a new Asset-Based service and add it to the Client.
        • Update Financial Product
          • Populates Parent Financial Product based on the parent financial product on the financial product object.
      • Before Delete
        • Collect Roles to delete
          • Get the Asset Liability role to delete.
      • After Insert
        • Create Asset Liability Role
          • Create an asset Role with Name as follows: 65 characters from the Client (Account) Name + 14 characters from the Asset/Liability record name.
          • If Client type is Household and has Primary_Contact__c then populate the Entity on role with Primary_Contact__c of the Client.
          • If the Client is Individual or Organization then populate the entity field on the role with practifi__Client__c field.
        • Sync with Xplan
          • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
        • Update Primary Asset
          • Update the primary Asset on the Accounts object.
      • After Update
        • Update Sharing Scope field
          • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
          • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
        • Sync with Xplan
          • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
        • Update Primary Asset
          • Update the primary Asset on the Accounts object.
      • After Delete
        • Delete Asset Liability Role
          • Delete the child asset/liability roles when the parent asset/liability record is deleted. There is no master-detail relationship between the Asset/Liability and Asset/Liability Role objects, so role records are not deleted automatically.
    2. If Asset/Liability Rollup (Asset_Liability_Rollups__c) is Enabled in Practifi Trigger Settings
      • Perform the roll-up summary using the LREngine library and based on the lookups described in RollupSummary.
    3. Before Insert
      • Set Created Date on before insert
        • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.
    4. Implications of Deactivating the Trigger
      • If the practifi__Defer_Automation__c field of Record is set to true, then the trigger logic will not execute. No method will be executed once practifi__Defer_Automation__c is set to true.
    5. Defer Automation Logic
      • No actions from AssetLiabilityTrigger will fire when the Defer Automation flag is updated.
    6. If Asset Liability (Asset_Liability__c) is not enabled in Practifi Trigger Settings
      • Then methods mentioned under Point 1 (If Asset Liability (Asset_Liability__c) is enabled in Practifi Trigger Settings then) will not get fired. Other methods will be fired based on the Asset_Liability_Rollups__c value in the trigger settings.

Campaign Member

  1. If Account (Campaign_Member__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Check Campaign Member is a Prospect Or a Client
        • If the related entity of the campaign member is promoted to Prospect during the campaign then update Was_Promoted_to_Prospect_During_Campaign__c to true. If the campaign member's related entity is promoted to Client during the campaign, then update Was_Promoted_to_Client_During_Campaign__c to true.
    • After Insert
      • Create Attributed Revenue
        • If the add-on feature Practifi Promote is enabled, create an Attributed Revenue/Attributed Campaign record for the Account/Contact record that has been added as a campaign member only when its Campaign has a Service Type value. It has one or more closed associated deals.
  2. If Campaign_Member_Rollups__c is enabled in the trigger settings
    • Then perform the roll-up summary using the LREngine library and based on the lookups described in RollupSummary.

Contact

  1. If Contact (Contact__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Update Email and Phone on the Contact
        • Update the contact's Phone based on its preferred phone value.
        • Update the contact's Primary Entity's Phone/Email value if its selected preferred phone/email is set to primary contact values.
      • Populate the Related Division on the Record
        • Populate the related Division on the record.
      • Mailing Label Defaults
        • Set default values on Mailing Label Display fields. Populate the Mailing Label based on flags and combinations.
    • Before Update
      • Update Email and Phone on the Contact
        • Update the contact's Phone based on its preferred phone value.
        • Update the contact's Primary Entity's Phone/Email value if its selected preferred phone/email is set to primary contact values.
      • Populate the Related Division on the Record
        • Populate the related Division on the record.
      • Sync Account Address
        • If Exclude Location Address from Primary Entity Sync is unchecked, then this record's Location Address is inherited from its Primary Entity.
        • If Exclude Postal Address from Primary Entity Sync is unchecked, then this record's Postal Address is inherited from its Primary Entity.
        • As long as Sync is enabled for a Primary Entity's address field, all members who haven't been excluded from the Sync will have that Entity's address value.
      • Mailing Label Defaults
        • Set default values on Mailing Label Display fields. Populate the Mailing Label based on flags and combinations.
    • Before Delete
      • Sync updates with Constant Contact
        • When contact is updated or deleted, the same changes are synced/updated at the CTCT side to reflect these changes.
    • After Update
      • Update Sharing Scope field
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
      • Sync updates with Constant Contact
        • When contact is updated or deleted, the same changes are synced/updated at the CTCT side to reflect these changes.
      • Sync with Xplan
        • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
      • Update Relationship Name
        • If the First name, Last name, or Defer Automation field on the contact is changed, this method updates the From Name and To Name on the relationships.
  2. Before Insert and Before Update
    • Update Sharing Scope field
      • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
      • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
  3. Before Insert
    • Set Created Date on before insert
      • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.
  4. Implications of Deactivating the Trigger
    • If the practifi__Defer_Automation__c field of Record is set to true, then the trigger logic will not execute. No method will be executed once practifi__Defer_Automation__c is set to true.
  5. Defer Automation Logic
    • The following actions will fire when the Defer Automation flag is updated from True to False:
      • Update Relationship Name
      • Update Email and Phone on the Contact
      • Update Contact Point Email, Phone, and Address
    • The following actions will NOT fire when the Defer Automation flag is updated from True to False:
      • Sync Account Address
      • Mailing Label Defaults
      • Populate the Related Division on the Record
  6. If Contact (Contact__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Contact (Contact__c) is enabled in Practifi Trigger Settings then) will not get fired.

Contact Point Address

  1. If Contact Point Address (Contact_Point_Address__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Update Parent (ParentId) on ContactPointAddress (CPA) record
        • Get the details of the contact record associated with the CPA record and populate the ParentID field on CPA with the Account (Entity) available on Contact.
      • Sync Account Address
        • If Exclude Location Address from Primary Entity Sync is unchecked, then this record's Location Address is inherited from its Primary Entity.
        • If Exclude Postal Address from Primary Entity Sync is unchecked, then this record's Postal Address is inherited from its Primary Entity.
        • As long as Sync is enabled for a Primary Entity's address field, all members who haven't been excluded from the Sync will have that Entity's address value.
    • Before Update
      • Sync Account Address
        • If Exclude Location Address from Primary Entity Sync is unchecked, then this record's Location Address is inherited from its Primary Entity.
        • If Exclude Postal Address from Primary Entity Sync is unchecked, then this record's Postal Address is inherited from its Primary Entity.
        • As long as Sync is enabled for a Primary Entity's address field, all members who haven't been excluded from the Sync will have that Entity's address value.
    • After Insert
      • Populate address on Parent record
        • If ParentId (Entity) is available on CPA record and Map_to_Record__c is Mailing and if the address is available on CPA then populate the address from CPA to the Mailing Address field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPA record and Map_to_Record__c is Other and if the address is available on CPA then populate the address from CPA to the Other Address field on the Entity tagged in ParentId field.
        • If Contact is available on CPA record and Map_to_Record__c is Mailing and if the address is available on CPA then populate the address from CPA to the Mailing Address field on the Contact tagged in Contact field.
        • If Contact is available on CPA record and Map_to_Record__c is Other and if the address is available on CPA then populate the address from CPA to the Other Address field on the Contact tagged in Contact field.
      • Sync with Xplan
        • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
    • After Update
      • Populate address on Parent record
        • If ParentId (Entity) is available on CPA record and Map_to_Record__c is Mailing and if the address is available on CPA then populate the address from CPA to the Mailing Address field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPA record and Map_to_Record__c is Other and if the address is available on CPA then populate the address from CPA to the Other Address field on the Entity tagged in ParentId field.
        • If Contact is available on CPA record and Map_to_Record__c is Mailing and if the address is available on CPA then populate the address from CPA to the Mailing Address field on the Contact tagged in Contact field.
        • If Contact is available on CPA record and Map_to_Record__c is Other and if the address is available on CPA then populate the address from CPA to the Other Address field on the Contact tagged in Contact field.
      • Sync with Xplan
        • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
    • After Delete
      • Populate address on Parent record
        • If ParentId (Entity) is available on CPA record and Map_to_Record__c is Mailing and if the address is available on CPA then populate the address from CPA to the Mailing Address field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPA record and Map_to_Record__c is Other and if the address is available on CPA then populate the address from CPA to the Other Address field on the Entity tagged in ParentId field.
        • If Contact is available on CPA record and Map_to_Record__c is Mailing and if the address is available on CPA then populate the address from CPA to the Mailing Address field on the Contact tagged in Contact field.
        • If Contact is available on CPA record and Map_to_Record__c is Other and if the address is available on CPA then populate the address from CPA to the Other Address field on the Contact tagged in Contact field.
    • After Undelete
      • Populate address on Parent record
        • If ParentId (Entity) is available on CPA record and Map_to_Record__c is Mailing and if the address is available on CPA then populate the address from CPA to the Mailing Address field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPA record and Map_to_Record__c is Other and if the address is available on CPA then populate the address from CPA to the Other Address field on the Entity tagged in ParentId field.
        • If Contact is available on CPA record and Map_to_Record__c is Mailing and if the address is available on CPA then populate the address from CPA to the Mailing Address field on the Contact tagged in Contact field.
        • If Contact is available on CPA record and Map_to_Record__c is Other and if the address is available on CPA then populate the address from CPA to the Other Address field on the Contact tagged in Contact field.
  2. If Contact Point Address (Contact_Point_Address__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Contact Point Address (Contact_Point_Address__c) is enabled in Practifi Trigger Settings then) will not get fired.

Contact Point Email

  1. If Contact Point Email (Contact_Point_Email__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Update Parent (ParentId) and Contact on ContactPointEmail (CPE) record
        • Get the details of the contact record associated with the CPE record and populate the ParentID field on CPE with the Account (Entity) available on Contact. For individual members, retrieve the details of the parent record associated with the CPE record, and populate the Contact__c field on the CPE record with the PersonContact (Contact) available on the PersonAccount.
    • After Insert
      • Populate Email on Parent record
        • If ParentId (Entity) is available on CPE record and Map_to_Record__c is Email and if the email is available on CPE then populate the email from CPE to the Email field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPE record and Map_to_Record__c is Alternate Email and if the email is available on CPE then populate the email from CPE to the Alternate Email field on the Entity tagged in ParentId field.
        • If Contact is available on CPE record and Map_to_Record__c is Email and if the email is available on CPE then populate the email from CPE to the Email field on the Contact tagged in Contact field.
        • If Contact is available on CPE record and Map_to_Record__c is Alternate Email and if the email is available on CPE then populate the email from CPE to the Alternate Email field on the Contact tagged in Contact field.
      • Sync with Xplan
        • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
    • After Update
      • Populate Email on Parent record
        • If ParentId (Entity) is available on CPE record and Map_to_Record__c is Email and if the email is available on CPE then populate the email from CPE to the Email field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPE record and Map_to_Record__c is Alternate Email and if the email is available on CPE then populate the email from CPE to the Alternate Email field on the Entity tagged in ParentId field.
        • If Contact is available on CPE record and Map_to_Record__c is Email and if the email is available on CPE then populate the email from CPE to the Email field on the Contact tagged in Contact field.
        • If Contact is available on CPE record and Map_to_Record__c is Alternate Email and if the email is available on CPE then populate the email from CPE to the Alternate Email field on the Contact tagged in Contact field.
      • Sync with Xplan
        • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
    • After Delete
      • Populate Email on Parent record
        • If ParentId (Entity) is available on CPE record and Map_to_Record__c is Email and if the email is available on CPE then populate the email from CPE to the Email field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPE record and Map_to_Record__c is Alternate Email and if the email is available on CPE then populate the email from CPE to the Alternate Email field on the Entity tagged in ParentId field.
        • If Contact is available on CPE record and Map_to_Record__c is Email and if the email is available on CPE then populate the email from CPE to the Email field on the Contact tagged in Contact field.
        • If Contact is available on CPE record and Map_to_Record__c is Alternate Email and if the email is available on CPE then populate the email from CPE to the Alternate Email field on the Contact tagged in Contact field.
    • After Undelete
      • Populate Email on Parent record
        • If ParentId (Entity) is available on CPE record and Map_to_Record__c is Email and if the email is available on CPE then populate the email from CPE to the Email field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPE record and Map_to_Record__c is Alternate Email and if the email is available on CPE then populate the email from CPE to the Alternate Email field on the Entity tagged in ParentId field.
        • If Contact is available on CPE record and Map_to_Record__c is Email and if the email is available on CPE then populate the email from CPE to the Email field on the Contact tagged in Contact field.
        • If Contact is available on CPE record and Map_to_Record__c is Alternate Email and if the email is available on CPE then populate the email from CPE to the Alternate Email field on the Contact tagged in Contact field.
  2. If Contact Point Email (Contact_Point_Email__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Contact Point Email (Contact_Point_Email__c) is enabled in Practifi Trigger Settings then) will not get fired.

Contact Point Phone

  1. If Contact Point Phone (Contact_Point_Phone__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Update Parent (ParentId) on ContactPointPhone (CPP) record
        • Get the details of the contact record associated with the Contact Point Phone record and populate the ParentID field on CPP with the Account (Entity) available on Contact.
    • After Insert
      • Populate Phone on Parent record
        • If ParentId (Entity) is available on CPP record and Map_to_Record__c is Home and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the HomePhone field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPP record and Map_to_Record__c is Mobile and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the MobilePhone field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPP record and Map_to_Record__c is Other and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the OtherPhone field on the Entity tagged in ParentId field.
        • If Contact is available on CPP record and Map_to_Record__c is Home and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the Phone field on the Contact tagged in Contact field.
        • If Contact is available on CPP record and Map_to_Record__c is Mobile and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the Phone field on the Contact tagged in Contact field.
        • If Contact is available on CPP record and Map_to_Record__c is Other and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the Phone field on the Contact tagged in Contact field.
      • Sync with Xplan
        • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
    • After Update
      • Populate Phone on Parent record
        • If ParentId (Entity) is available on CPP record and Map_to_Record__c is Home and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the HomePhone field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPP record and Map_to_Record__c is Mobile and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the MobilePhone field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPP record and Map_to_Record__c is Other and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the OtherPhone field on the Entity tagged in ParentId field.
        • If Contact is available on CPP record and Map_to_Record__c is Home and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the Phone field on the Contact tagged in Contact field.
        • If Contact is available on CPP record and Map_to_Record__c is Mobile and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the Phone field on the Contact tagged in Contact field.
        • If Contact is available on CPP record and Map_to_Record__c is Other and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the Phone field on the Contact tagged in Contact field.
      • Sync with Xplan
        • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
    • After Delete
      • Populate Phone on Parent record
        • If ParentId (Entity) is available on CPP record and Map_to_Record__c is Home and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the HomePhone field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPP record and Map_to_Record__c is Mobile and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the MobilePhone field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPP record and Map_to_Record__c is Other and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the OtherPhone field on the Entity tagged in ParentId field.
        • If Contact is available on CPP record and Map_to_Record__c is Home and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the Phone field on the Contact tagged in Contact field.
        • If Contact is available on CPP record and Map_to_Record__c is Mobile and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the Phone field on the Contact tagged in Contact field.
        • If Contact is available on CPP record and Map_to_Record__c is Other and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the Phone field on the Contact tagged in Contact field.
    • After Undelete
      • Populate Phone on Parent record
        • If ParentId (Entity) is available on CPP record and Map_to_Record__c is Home and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the HomePhone field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPP record and Map_to_Record__c is Mobile and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the MobilePhone field on the Entity tagged in ParentId field.
        • If ParentId (Entity) is available on CPP record and Map_to_Record__c is Other and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the OtherPhone field on the Entity tagged in ParentId field.
        • If Contact is available on CPP record and Map_to_Record__c is Home and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the Phone field on the Contact tagged in Contact field.
        • If Contact is available on CPP record and Map_to_Record__c is Mobile and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the Phone field on the Contact tagged in Contact field.
        • If Contact is available on CPP record and Map_to_Record__c is Other and if the phone (TelephoneNumber) is available on CPP then populate the phone number from CPP to the Phone field on the Contact tagged in Contact field.
  2. If Contact Point Phone (Contact_Point_Phone__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Contact Point Phone (Contact_Point_Phone__c) is enabled in Practifi Trigger Settings then) will not get fired.

Content Document

  1. If Content Document (Content_Document__c) is enabled in Practifi Trigger Settings then
    • Before Update
      • Lock Edit For Synced To Xplan
        • If XPlanUtils.settings.Enabled__c and XPlanUtils.settings.If Lock_Notes_and_Posts_for_synced_clients__c is enabled, and the record's LatestPublishedVersionId is not null and External_Id__c contains Xplan_CD, those records cannot be edited in Practifi, as they have been sent to Xplan as File Notes.
    • Before Delete
      • Update Has Notes on the Event
        • On the deletion of a content document, check if the content note was linked to an event. If it is, check if the event has any other notes associated with it. If there are no more associated notes, set Has_Notes__c to false.
    • After Insert
      • Sync with Xplan
        • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
    • After Update
      • Sync with Xplan
        • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
  2. If Content Document (Content_Document__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Content Document (Content_Document__c) is enabled in Practifi Trigger Settings then) will not get fired.

Deal

  1. If Deal (Deal__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Update Related Entity
        • Update related entity from Primary_Entity__c of deal, if available.
        • If Primary_Entity__c is not available then update the Entity from the deal to the Related Entity field.
      • Update Deal Stage Entry Date
        • When a deal is created or updated, set the Stage_Entry_Date__c to the current date.
      • Stage Days in Range
        • Calculates the range of days the deal was in the same stage. The range is between 1-10 days, 10-30 days, 30-60 days, 60-90 days, or 90+ days.
      • Update Status Entry Date
        • If Deal status is changed, update the practifi__Stage_Entry_Date__c with today's date.
      • Populate the Related Division on the Record
        • Populate the related Division on the record.
    • Before Update
      • Update Related Entity
        • Update the related entity from Primary_Entity__c on the deal, if available.

          If Primary_Entity__c is not available then update the Entity from the deal to the Related Entity field.

      • Update Deal Stage Entry Date
        • When a deal is created or updated, set the Stage_Entry_Date__c to the current date.
      • Stage Days in Range
        • Calculates the range of days the deal was in the same stage. The range is between 1-10 days, 10-30 days, 30-60 days, 60-90 days, or 90+ days.
      • Update Status Entry Date
        • If Deal status is changed, update the practifi__Stage_Entry_Date__c with today's date.
      • Populate the Related Division on the Record
        • Populate the related Division on the record.
    • After Insert
      • Log Stage History
        • If Deal_Stage_History__c is enabled in trigger settings,
        • If the deal is created, populate Entry Date, Stage, and Stage Category on the stage history.
        • If the deal is updated, populate Entry Date, Previous Stage, Stage, and Stage Category on Stage History.
      • Create Attributed Campaign
        • If the Campaign feature is enabled, it creates revenue for members as per their share.
    • After Update
      • Update Sharing Scope field
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
      • Log Stage History
        • If Deal_Stage_History__c is enabled in trigger settings,
        • If the deal is created, populate Entry Date, Stage, and Stage Category on the stage history.
        • If the deal is updated, populate Entry Date, Previous Stage, Stage, and Stage Category on Stage History.
  2. If Deal_Rollups__c is enabled in trigger settings then
    • Perform the roll-up summary using the LREngine library and based on the lookups described in RollupSummary.
  3. Before Insert
    • Set Created Date on before insert
      • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.
  4. Implications of Deactivating the Trigger
    • If the practifi__Defer_Automation__c field of Record is set to true, then the trigger logic will not execute. No method will be executed once practifi__Defer_Automation__c is set to true.
  5. If Deal (Deal__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Deal (Deal__c) is enabled in Practifi Trigger Settings then) will not get fired. Other methods will be fired based on the Deal_Rollups__c value in the trigger settings.

Deliverable

  1. If Deliverable (Deliverable__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Populate Related Entity
        • If the Entity is available on the deliverable, check if the Primary Entity is available on the Entity.
        • If the Primary Entity is available on the Entity, populate the Related Entity on the deliverable with the Primary Entity.
        • If the Primary Entity is not available on the Entity, populate the Related Entity on the deliverable with the Entity ID.
      • Populate Related Division
        • If the deliverable has a related service, populate the Related Division from the Related Division of the associated Service.
    • Before Update
      • Populate Related Entity
        • If the Entity is available on the deliverable, check if the Primary Entity is available on the Entity.
        • If the Primary Entity is available on the Entity, populate the Related Entity on the deliverable with the Primary Entity.
        • If the Primary Entity is not available on the Entity, populate the Related Entity on the deliverable with the Entity ID.
      • Populate Related Division
        • If the deliverable has a related service, populate the Related Division from the Related Division of the associated Service.
    • After Update
      • Populate Related Entity
        • Populate the Next Due Date (Next_Due_Date__c) on the deliverable based on Recalculation Date and Last Fulfillment Date.
        • Also, create Deliverable Fulfillment (Deliverable_Fulfillment__c) records with the details like Deliverable__c, Fulfillment_Date__c, Due_Date__c, Fulfilled_By__c, Related_Activity_Id__c, and Related_Activity_Name__c.
      • Update Sharing Scope field
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
  2. If Deliverable_Rollups__c is enabled in Practifi Trigger Settings
    • Then perform the roll-up summary using the LREngine library and based on the lookups described in RollupSummary.
  3. If Deliverable (Deliverable__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Deliverable__c (Deliverable__c) is enabled in Practifi Trigger Settings then) will not get fired.

Division

  1. If Division (Division__c) is enabled in Practifi Trigger Settings then
    • After Update
      • Update Sharing Scope field
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
      • Update Division Name on User
        • Update the primary Division info on User. Get all the users associated with the division and update the Division_Name__c with the current division record name.
  2. Before Insert
    • Set Created Date on before insert
      • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.
  3. If Division (Division__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Division (Division__c) is enabled in Practifi Trigger Settings then) will not get fired.

Division Member

  1. If Division Member (Division_Member__c) is enabled in Practifi Trigger Settings then
    • After Insert
      • Update Division (Division_Id__c) and Division Name (Division_Name__c) on User
        • Get all the users associated with the division member and update the Division_Id__c with the Division Id and Division_Name__c with the division record name.
    • After Update
      • Update Division (Division_Id__c) and Division Name (Division_Name__c) on User
        • Get all the users associated with the division member and update the Division_Id__c with the Division Id and Division_Name__c with the division record name.
    • After Delete
      • Update Division (Division_Id__c) and Division Name (Division_Name__c) on User
        • Get all the users associated with the division member and update the Division_Id__c with the Division Id and Division_Name__c with the division record name.
    • After Undelete
      • Update Division (Division_Id__c) and Division Name (Division_Name__c) on User
        • Get all the users associated with the division member and update the Division_Id__c with the Division Id and Division_Name__c with the division record name.
  2. Before Insert
    • Set Created Date on before insert
      • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.
  3. If Division Member (Division_Member__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Division Member (Division_Member__c) is enabled in Practifi Trigger Settings then) will not get fired.

Email Message

  1. If Email Message (Email_Message__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Populate RelatedTo Id with entity Id
        • Based on the ToAddress, CCAddress, and BCCAddress, get the Entity ID and populate that entity ID in the RelatedTo field.
  2. Before Insert
    • Set Created Date on before insert
      • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.
  3. Implications of Deactivating the Trigger
    • practifi__Defer_Automation__c is not implemented for the Email Message trigger.
  4. If Email Message (Email_Message__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Email Message (Email_Message__c) is enabled in Practifi Trigger Settings then) will not get fired.

Event

  1. If Event (Event__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Populate WhatId and related fields
        • If the Event is related to account then populate the Related_Entity__c as the Account Id.
        • If the Event is related to Service then populate the Related_Service__c as the Service Id and WhatId with the account of the Service.
        • If the Event is related to Asset/Liability then populate the Related_Asset_Liability__c as the Asset/Liability Id and WhatId with the account of the Asset/Liability and Related_Service__c with service Id on Asset/Liability record, and Related_Financial_Product__c with the Financial Product on the Asset/Liability record.
        • If the Event is related to Deal then populate the Related_Deal__c as the Deal Id and WhatId with the account of the Deal and Related_Service__c with service Id on Deal record, and Related_Financial_Product__c with the Financial Product on the Deal record.
        • If the Event is related to Financial Product (Financial_Product__c) then populate Related_Financial_Product__c with the Financial Product Id.
        • If the Event is related to Policy Coverage (Policy_Coverage__c) then populate Related_Policy_Coverage__c with the Policy Coverage Id. Also, populate the Policy Id in Related_Policy__c.
        • If the Event is related to Policy (Policy__c) then populate the Policy Id in Related_Policy__c.
        • If the Event is related to Goal (Goal__c) then populate the goal Id in Related_Goal__c. Also, populate Service Id in Related_Service__c and Entity Id in WhatId.
        • If the Event is related to Income & Expense (Income_Expense__c) then populate the income & expense record Id in Related_Income_Expense__c. Also, populate Asset & Liability record Id in Related_Asset_Liability__c and Entity Id in WhatId.
        • If the Event is related to Deliverable (Deliverable__c) then populate the deliverable Id in Related_Deliverable__c. Also, populate the Entity ID in the WhatId field.
        • If the Event is related to Objective (Objective__c) then populate the objective Id in Related_Objective__c. Also, populate the Entity ID in the WhatId field.
        • If the Event is related to Retirement Income (Retirement_Income__c) then populate the Retirement Id in Related_Retirement_Income__c. Also, populate the Entity ID in the WhatId field.
      • Populate Time Logged
        • Populate the Time_Logged__c in days based on the event start and end time.
      • Update the Related Division on the Entity (Account)
        • If the Related_Activity_Id__c field is populated with an Email Message then copy the RelatedToId down to the WhatId field on Event.
      • Populate the Related Division on the Record
        • Populate the related Division on the record.
    • Before Update
      • Populate WhatId and related fields
        • If the Event is related to account then populate the Related_Entity__c as the Account Id.
        • If the Event is related to Service then populate the Related_Service__c as the Service Id and WhatId with the account of the Service.
        • If the Event is related to Asset/Liability then populate the Related_Asset_Liability__c as the Asset/Liability Id and WhatId with the account of the Asset/Liability and Related_Service__c with service Id on Asset/Liability record, and Related_Financial_Product__c with the Financial Product on the Asset/Liability record.
        • If the Event is related to Deal then populate the Related_Deal__c as the Deal Id and WhatId with the account of the Deal and Related_Service__c with service Id on Deal record, and Related_Financial_Product__c with the Financial Product on the Deal record.
        • If the Event is related to Financial Product (Financial_Product__c) then populate Related_Financial_Product__c with the Financial Product Id.
        • If the Event is related to Policy Coverage (Policy_Coverage__c) then populate Related_Policy_Coverage__c with the Policy Coverage Id. Also, populate the Policy Id in Related_Policy__c.
        • If the Event is related to Policy (Policy__c) then populate the Policy Id in Related_Policy__c.
        • If the Event is related to Goal (Goal__c) then populate the goal Id in Related_Goal__c. Also, populate Service Id in Related_Service__c and Entity Id in WhatId.
        • If the Event is related to Income & Expense (Income_Expense__c) then populate the income & expense record Id in Related_Income_Expense__c. Also, populate Asset & Liability record Id in Related_Asset_Liability__c and Entity Id in WhatId.
        • If the Event is related to Deliverable (Deliverable__c) then populate the deliverable Id in Related_Deliverable__c. Also, populate the Entity ID in the WhatId field.
        • If the Event is related to Objective (Objective__c) then populate the objective Id in Related_Objective__c. Also, populate the Entity ID in the WhatId field.
        • If the Event is related to Retirement Income (Retirement_Income__c) then populate the Retirement Id in Related_Retirement_Income__c. Also, populate the Entity ID in the WhatId field.
      • Populate Time Logged
        • Populate the Time_Logged__c in days based on the event start and end time.
      • Populate the Related Division on the Record
        • Populate the related Division on the record.
    • After Insert
      • Sync with Xplan
        • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
    • After Update
      • Sync with Xplan
        • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
  2. If Event Rollup (Event_Rollups__c) is Enabled in Practifi Trigger Settings
    • Perform the roll-up summary using the LREngine library and based on the lookups described in RollupSummary.
  3. Before Insert
    • Set Created Date on before insert
      • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.
  4. If the trigger is an after trigger and Event Sync Feature (practifi__Microsoft365EventSyncAddOnEnabled) is enabled
    • Then Sync Events with MS
      • Add the event to the job, which syncs the Events with Microsoft Outlook.
  5. Implications of Deactivating the Trigger
    • practifi__Defer_Automation__c is not implemented for the Event trigger.
  6. If Event (Event__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Event (Event__c) is enabled in Practifi Trigger Settings then) will not get fired. Other methods will be fired based on the Event_Rollups__c value in the trigger settings.

Financial Product

  1. If Financial Product (Financial_Product__c) Trigger is enabled in Practifi Trigger Settings.
    • Before Insert
      • Populate Related Division
        • Populate primary division from Owner's Primary Division.
      • Notify Sharing Scope copy observer
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
    • Before Update
      • Populate Related Division
        • Populate primary division from Owner's Primary Division.
    • After Update
      • Notify Sharing Scope sync observer
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
  2. If Financial Product Rollup (Financial_Product_Rollups__c) is Enabled in Practifi Trigger Settings
    • Apex Trigger helper automatically resolves child records to process via LREngine and lookups described in RollupSummary. Also determines if rollup processing needs to occur based on the old trigger records.
  3. Set Created Date on before insert
    • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.

Holding

  1. If Holding (Holding__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Populate the Related Division
        • Update the related division from the Asset record onto the holding record.
    • Before Update
      • Populate the Related Division
        • Update the related division from the Asset record onto the holding record.
    • After Update
      • Update Sharing Scope field
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
  2. If Holding Rollup (Holding_Rollups__c) is Enabled in Practifi Trigger Settings
    • Perform the roll-up summary using the LREngine library and based on the lookups described in RollupSummary.
  3. Before Insert
    • Set Created Date on before insert
      • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.
  4. Implications of Deactivating the Trigger
    • If the practifi__Defer_Automation__c field of Record is set to true, then the trigger logic will not execute. No method will be executed once practifi__Defer_Automation__c is set to true.
  5. Defer Automation Logic
    • No actions will fire from HoldingTrigger when the Defer Automation flag is updated.
  6. If Holding (Holding__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Holding (Holding__c) is enabled in Practifi Trigger Settings then) will not get fired. Other methods will be fired based on the Holding_Rollups__c value in the trigger settings.

Installment

  1. If Installment Product (Installment__c) Trigger is enabled in Practifi Trigger Settings
    • Before Insert
      • Populate Entity
        • If the Installment record has the Service associated with it, and if the Service field value is changed on the Installment, and if the related Service has the Client field value populated on it, then populate as per the Service's Client value.
        • If the Installment record has the Asset associated with it, and if the Asset field value is changed on the Installment, and if the related Asset has the Client field value populated on it, then populate as per the Asset's Client value.
      • Populate Related Entity
        • If the Installment record has an Entity associated with it and the Primary Entity is available on the associated Entity, then populate the same value. If the Primary Entity is not available on the associated Entity, then populate it as the associated Entity's value.
      • Populate Related Service
        • If Installment record has Asset associated with it and Service is available on the associated Asset, then populate the same value.
      • Populate Related Division
        • If Service is associated with an Installment, populate as per the Service's Related Division. Else if the Asset is associated with an Installment, populate it as per the Asset's Related Division. Else if Entity is associated with Installment, populate as per Entity's Related Division.
      • Notify Sharing Scope copy observer
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom settings.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
    • Before Update
      • Populate Entity
        • If the Installment record has the Service associated with it, and if the Service field value is changed on the Installment, and if the related Service has the Client field value populated on it, then populate as per the Service's Client value.
        • If the Installment record has the Asset associated with it, and if the Asset field value is changed on the Installment, and if the related Asset has the Client field value populated on it, then populate as per the Asset's Client value.
      • Populate Related Entity
        • If the Installment record has an Entity associated with it and the Primary Entity is available on the associated Entity, then populate the same value. If the Primary Entity is not available on the associated Entity, then populate it as the associated Entity's value.
      • Populate Related Service
        • If Installment record has Asset associated with it and Service is available on the associated Asset, then populate the same value.
      • Populate Related Division
        • If Service is associated with an Installment, populate as per the Service's Related Division. Else if the Asset is associated with an Installment, populate it as per the Asset's Related Division. Else if Entity is associated with Installment, populate as per Entity's Related Division.
    • After Insert
      • Rollup to Annual Revenue on associated Asset
        • If Annual Revenue Calculation Basis on Practifi Feature Settings is set to Asset based on Last Installment & Multiplier, Service based on Asset rollup, then if Final Amount on Installment is available, roll up the same to the associated Asset record based on configuration maintained in Practifi Feature Settings.
    • After Update
      • Rollup to Annual Revenue on associated Asset
        • If Annual Revenue Calculation Basis on Practifi Feature Settings is set to Asset based on Last Installment & Multiplier, Service based on Asset rollup, then if Final Amount on Installment is available, roll up the same to the associated Asset record based on configuration maintained in Practifi Feature Settings.
      • Notify Sharing Scope sync observer
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.

          If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.

    • After Delete
      • Rollup to Annual Revenue on associated Asset
        • If Annual Revenue Calculation Basis on Practifi Feature Settings is set to Asset based on Last Installment & Multiplier, Service based on Asset rollup, then if Final Amount on Installment is available, roll up the same to the associated Asset record based on configuration maintained in Practifi Feature Settings.
    • After Undelete
      • Rollup to Annual Revenue on associated Asset
        • If Annual Revenue Calculation Basis on Practifi Feature Settings is set to Asset based on Last Installment & Multiplier, Service based on Asset rollup, then if Final Amount on Installment is available, roll up the same to the associated Asset record based on configuration maintained in Practifi Feature Settings.
  2. If Installment Rollup (Installment_Rollups__c) is Enabled in Practifi Trigger Settings
    • Apex Trigger helper automatically resolves child records to process via LREngine and lookups described in RollupSummary. Also determines if rollup processing needs to occur based on the old trigger records.
  3. Set Created Date on before insert
    • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.

Objective

  1. If Objective (Objective__c) Trigger is enabled in Practifi Trigger Settings
    • Before Insert
      • Populate Dependent Fields
        • Populate Name
          • Populate Name based on the objective record's owner type.
        • Populate Related Entity
          • If Person (Contact) is associated with Objective, and Primary Entity is available on the associated Person (Contact), then populate the same value. If the Primary Entity is not available on the associated Person (Contact), then populate as per the associated Person (Contact)'s Entity value.
        • Populate Related Division
          • If the Entity is associated with the Objective, then populate as per the Related Division from the associated Entity.
          • Else if Person (Contact) is associated with Objective, and Primary Entity is available on the associated Person (Contact), then populate as per the Related Division from Primary Entity. Else if the Primary Entity is not available on the associated Person (Contact), then populate it from the Related Division of the associated Person (Contact)'s Entity.
      • Notify Sharing Scope copy observer
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom settings.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
    • Before Update
      • Populate Dependent Fields
        • Populate Name
          • Populate Name based on the objective record's owner type.
        • Populate Related Entity
          • If Person (Contact) is associated with Objective, and Primary Entity is available on the associated Person (Contact), then populate the same value. If the Primary Entity is not available on the associated Person (Contact), then populate as per the associated Person (Contact)'s Entity value.
        • Populate Related Division
          • If the Entity is associated with the Objective, then populate as per the Related Division from the associated Entity.
          • Else if Person (Contact) is associated with Objective, and Primary Entity is available on the associated Person (Contact), then populate as per the Related Division from Primary Entity. Else if the Primary Entity is not available on the associated Person (Contact), then populate it from the Related Division of the associated Person (Contact)'s Entity.
    • After Insert
      • Subscribe to Xplan
    • After Update
      • Notify Sharing Scope sync observer
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom settings.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
      • Subscribe to Xplan
  2. If Objective Rollup (Objective_Rollups__c) is Enabled in Practifi Trigger Settings
    • Apex Trigger helper automatically resolves child records to process via LREngine and lookups described in RollupSummary. Also determines if rollup processing needs to occur based on the old trigger records.

Process

  1. If Process (Process__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Get Stage Group Map
        • Create the Map of Process ID and Process group.
      • Update Process Completed Date and Completed Datetime on the process
        • If Process Stage History is enabled in Trigger Settings, update the Stage Entry Date with the current date when the process stage is updated.
        • If the process stage is Not Started, In Progress, or Canceled, then set the Completed Date to blank.
        • If the process stage is Completed then set the Completed_Date__c to today's date and Completed_Datetime__c with the current date and time.
      • Update Related Client Field
        • Update the related client field with either the entity or the entity's primary entity field.
      • Update Age Days
        • If the Started Date is blank or the stage is set to Completed or Canceled, set the age to blank.
        • Calculate the difference between the Start Date and today's date and populate the age on the Process. The age is between 0-30, 31-45, or >45.
      • Populate the Related Division on the Record
        • Populate the related Division on the record.
    • Before Update
      • Get Stage Group Map
        • Create the Map of Process ID and Process group.
      • Update Process Completed Date and Completed Datetime on the process
        • If Process Stage History is enabled in Trigger Settings, update the Stage Entry Date with the current date when the process stage is updated.
        • If the process stage is Not Started, In Progress, or Canceled, then set the Completed Date to blank.
        • If the process stage is Completed then set the Completed_Date__c to today's date and Completed_Datetime__c with the current date and time.
      • Update Related Client Field
        • Update the related client field with either the entity or the entity's primary entity field.
      • Update Age Days
        • If the Started Date is blank or the stage is set to Completed or Canceled, set the age to blank.
        • Calculate the difference between the Start Date and today's date and populate the age on the Process. The age is between 0-30, 31-45, or >45.
      • Populate the Related Division on the Record
        • Populate the related Division on the record.
    • After Insert
      • Get Stage Group Map
        • Create the Map of Process ID and Process group.
      • Log Stage History
        • If the Process_Stage_History__c is enabled in the Practifi Trigger Settings then create an entry in the Stage_History__c object for the current stage and update the Exit Date (Exit_Date__c) on the history record of the earlier stage.
    • After Update
      • Get Stage Group Map
        • Create the Map of Process ID and Process group.
      • Manage Task on Closed Process
        • If the Stage is marked as Completed but there are open tasks, display an error to the user: "The process cannot be completed because underlying tasks are not complete."
        • If the Stage is marked as Canceled, then update all related open tasks with Deferred status.
      • Update Sharing Scope field
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom settings.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
      • Log Stage History
        • If the Process_Stage_History__c is enabled in the Practifi Trigger Settings then create an entry in the Stage_History__c object for the current stage and update the Exit Date (Exit_Date__c) on the history record of the earlier stage.
  2. If Process Rollup (Process_Rollups__c) is Enabled in Practifi Trigger Settings
    • Perform the roll-up summary using the LREngine library and based on the lookups described in RollupSummary.
  3. Before Insert
    • Set Created Date on before insert
      • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.
  4. Implications of Deactivating the Trigger
    • If the practifi__Defer_Automation__c field of Record is set to true, then the trigger logic will not execute. No method will be executed once practifi__Defer_Automation__c is set to true.
  5. Defer Automation Logic
    • No actions will fire from ProcessTrigger when the Defer Automation flag is updated.
  6. If Process (Process__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Process (Process__c) is enabled in Practifi Trigger Settings then) will not get fired. Other methods will be fired based on the Process_Rollups__c value in the trigger settings.

Question Set

  1. If the Question Set trigger is enabled in Practifi Trigger Settings then
    • trigger QuestionSetTrigger on Question_Set__c (before insert, before update, before delete, after insert, after update, after delete, after undelete) {
      PractiFI_Trigger_Setting__c triggerSettings = PractiFI_Trigger_Setting__c.getInstance();
      if(!triggerSettings.Question_Set__c)
      return;
      new TriggerHandlerQuestionSet().run();
      }

Relationship

  1. If Relationship (Relationship__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Populate Related Division
        • Populate the related Division on the record.
      • Update Relationship Names
        • If any of the following fields is not null or changed — From_Entity__c, To_Entity__c, From_Contact__c, or To_Contact__c — populate the From_Name__c and To_Name__c fields with the corresponding Entity name.
    • Before Update
      • Populate Related Division
        • Populate the related Division on the record.
      • Update Relationship Names
        • If any of the following fields is not null or changed — From_Entity__c, To_Entity__c, From_Contact__c, or To_Contact__c — populate the From_Name__c and To_Name__c fields with the corresponding Entity name.
    • Before Undelete
      • Sync updates with Constant Contact
        • When contact is updated or deleted, the same changes are synced/updated at the CTCT side to reflect these changes.
    • After Insert
      • Populate the Primary Contact, Primary Member, Spouse, and Partner on Account
        • Based on the relationship type, populate Primary Contact from the From Contact field and From Entity field.
        • Populate Primary Member (Primary_Member__c) based on the Account using the entity's Contact (From_Entity__r.Personcontactid).
        • Also, based on the relationship type (RTPARTNER) and if it is related to Account, populate the Spouse and Partner (Partner__c).
      • Update the Member Names on Account
        • Based on the relationship type field (where Action Type = Member), populate the name of the members on the Account under Member_Names__c field as a comma-separated list.
      • Update Influencer Segment
        • Assign the Standard Influencer Segment to an Entity when it's added as a Referrer via Relationships.
      • Populate Referrer on an Entity
        • Populate the Referrer on a To Entity with the From Entity when it's added as a Referrer via Relationships.
    • After Update
      • Populate the Primary Contact, Primary Member, Spouse, and Partner on Account
        • Based on the relationship type, populate Primary Contact from the From Contact field and From Entity field.
        • Populate Primary Member (Primary_Member__c) based on the Account using the entity's Contact (From_Entity__r.Personcontactid).
        • Also, based on the relationship type (RTPARTNER) and if it is related to Account, populate the Spouse and Partner (Partner__c).
      • Update the Member Names on Account
        • Based on the relationship type field (where Action Type = Member), populate the name of the members on the Account under Member_Names__c field as a comma-separated list.
      • Update Influencer Segment
        • Assign the Standard Influencer Segment to an Entity when it's added as a Referrer via Relationships.
      • Update Sharing Scope field
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
    • After Delete
      • Populate the Primary Contact, Primary Member, Spouse, and Partner on Account
        • Based on the relationship type, populate Primary Contact from the From Contact field and From Entity field.
        • Populate Primary Member (Primary_Member__c) based on the Account using the entity's Contact (From_Entity__r.Personcontactid).
        • Also, based on the relationship type (RTPARTNER) and if it is related to Account, populate the Spouse and Partner (Partner__c).
      • Update the Member Names on Account
        • Based on the relationship type field (where Action Type = Member), populate the name of the members on the Account under Member_Names__c field as a comma-separated list.
      • Update Influencer Segment
        • Assign the Standard Influencer Segment to an Entity when it's added as a Referrer via Relationships.
    • After Undelete
      • Populate the Primary Contact, Primary Member, Spouse, and Partner on Account
        • Based on the relationship type, populate Primary Contact from the From Contact field and From Entity field.
        • Populate Primary Member (Primary_Member__c) based on the Account using the entity's Contact (From_Entity__r.Personcontactid).
        • Also, based on the relationship type (RTPARTNER) and if it is related to Account, populate the Spouse and Partner (Partner__c).
      • Update Influencer Segment
        • Assign the Standard Influencer Segment to an Entity when it's added as a Referrer via Relationships.
  2. If Relationship Rollup (Relationship_Rollups__c) is Enabled in Practifi Trigger Settings
    • Perform the roll-up summary using the LREngine library and based on the lookups described in RollupSummary.
  3. Before Insert
    • Set Created Date on before insert
      • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.
  4. Implications of Deactivating the Trigger
    • If the practifi__Defer_Automation__c field of Record is set to true, then the trigger logic will not execute. No method will be executed once practifi__Defer_Automation__c is set to true.
  5. Defer Automation Logic
    • No actions will fire from RelationshipTrigger when the Defer Automation flag is updated.
  6. If Relationship (Relationship__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Relationship (Relationship__c) is enabled in Practifi Trigger Settings then) will not get fired. Other methods will be fired based on the Relationship_Rollups__c value in the trigger settings.

Retirement Income

  1. If Retirement Income (Retirement_Income__c) Trigger is enabled in Practifi Trigger Settings
    • Before Insert
      • Populate Related Division
        • Populate Name
          • If Entity is associated with Retirement Income, populate Name based on the objective record's associated Entity and Type.
        • Populate Related Division
          • If the Entity is associated with Retirement Income, populate the Related Division from the associated Entity record on the Related Division field.
      • Notify Sharing Scope copy observer
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
    • Before Update
      • Populate Related Division
        • Populate Name
          • If Entity is associated with Retirement Income, populate Name based on the objective record's associated Entity and Type.
        • Populate Related Division
          • If the Entity is associated with Retirement Income, populate the Related Division from the associated Entity record on the Related Division field.
    • After Insert
      • Subscribe to Xplan
    • After Update
      • Notify Sharing Scope sync observer
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
      • Subscribe to Xplan
  2. If Retirement Income Rollup (Retirement_Income_Rollups__c) is Enabled in Practifi Trigger Settings
    • Apex Trigger helper automatically resolves child records to process via LREngine and lookups described in RollupSummary. Also determines if rollup processing needs to occur based on the old trigger records.

Service

  1. If Service (Service__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Update Related Entity
        • If the Person (Contact) is available, then populate the contact's Primary Entity on the Related Entity field on the service.
        • If the client is available, then populate the Client value into the Related Entity.
      • Update Service History
        • If Service Stage History is enabled in trigger settings, populate the Stage Entry Date with the current date.
      • Populate the Related Division on the Record
        • Get the related division from the related (parent) entity and populate it on the service record.
    • Before Update
      • Update Related Entity
        • If the Person (Contact) is available, then populate the contact's Primary Entity on the Related Entity field on the service.
        • If the client is available, then populate the Client value into the Related Entity.
      • Update Service History
        • If Service Stage History is enabled in trigger settings, populate the Stage Entry Date with the current date.
      • Update Termination Date
        • Updates the practifi__Termination_Date__c field. When the Stage of the service record is changed to Terminated, the Termination Date is updated with today's date.
      • Populate the Related Division on the Record
        • Get the related division from the related (parent) entity and populate it on the service record.
    • After Insert
      • Create Deliverables
        • If the Deliverable__c is enabled in the Practifi Trigger Settings, then create a deliverable based on the Service Type (Service_Type__c) field from service.
        • Get the Deliverable_Type__c records for the Service_Type__c available on the Service record.
        • Create the deliverable record with the details from Deliverable_Type__c such as Name, Type, Frequency__c, and also relate it to the service.
      • Log Stage History
        • Create a record in stage history (Stage_History__c) based on the stage changes.
        • Also, update the Exit_Date__c on the old stage history record.
    • After Update
      • Update Sharing Scope field
        • Check if the Copy Entity Sharing Scope or Copy Division Sharing Scope is checked in the Practifi Trigger custom setting.
        • If one of these checkboxes is checked, then update the sharing scope field on the record from the parent's sharing scope, the primary entity's sharing scope, or the related division's sharing scope.
      • Log Stage History
        • Create a record in stage history (Stage_History__c) based on the stage changes.
        • Also, update the Exit_Date__c on the old stage history record.
  2. If Service Rollup (Service_Rollups__c) is Enabled in Practifi Trigger Settings
    • Perform the roll-up summary using the LREngine library and based on the lookups described in RollupSummary.
  3. Before Insert
    • Set Created Date on before insert
      • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.
  4. Implications of Deactivating the Trigger
    • If the practifi__Defer_Automation__c field of Record is set to true, then the trigger logic will not execute. No method will be executed once practifi__Defer_Automation__c is set to true.
  5. Defer Automation Logic
    • No actions will fire from ServiceTrigger when the Defer Automation flag is updated.
  6. If Service (Service__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Service (Service__c) is enabled in Practifi Trigger Settings then) will not get fired. Other methods will be fired based on the Service_Rollups__c value in the trigger settings.

Task

  1. If Task (Task__c) is enabled in Practifi Trigger Settings then
    • Before Insert
      • Populate Task Fields
        • Populate the fields on the task like Start Date, Completed Date, Time Logged, and Stage Entry Date.
      • Populate WhatId and related fields
        • If the task is related to account (WhatId = Account Id) then populate the Related_Entity__c as the Account Id. If the task is related to an individual member, populate the WhoId with the member's ID.
        • If the task is related to Service then populate the Related_Service__c as the Service Id and WhatId with the account of the Service.
        • If the task is related to Asset/Liability then populate the Related_Asset_Liability__c as the Asset/Liability Id and WhatId with the account of the Asset/Liability and Related_Service__c with service Id on Asset/Liability record, and Related_Financial_Product__c with the Financial Product on the Asset/Liability record.
        • If the task is related to Deal then populate the Related_Deal__c as the Deal Id and WhatId with the account of the Deal and Related_Service__c with service Id on Deal record, and Related_Financial_Product__c with the Financial Product on the Deal record.
        • If the task is related to Financial Product (Financial_Product__c) then populate Related_Financial_Product__c with the Financial Product Id.
        • If the task is related to Policy Coverage (Policy_Coverage__c) then populate Related_Policy_Coverage__c with the Policy Coverage Id. Also, populate the Policy Id in Related_Policy__c.
        • If the task is related to Policy (Policy__c) then populate the Policy Id in Related_Policy__c. Populate the WhatId with the account of the Policy. Also, populate the Related Service with the Service on the Policy.
        • If the task is related to Goal (Goal__c) then populate the goal Id in Related_Goal__c. Also, populate Service Id in Related_Service__c and Entity Id in WhatId.
        • If the task is related to Income & Expense (Income_Expense__c) then populate the income & expense record Id in Related_Income_Expense__c. Also, populate Asset & Liability record Id in Related_Asset_Liability__c and Entity Id in WhatId.
        • If the task is related to Deliverable (Deliverable__c) then populate the deliverable Id in Related_Deliverable__c. Also, populate the Entity ID in the WhatId field.
        • If the task is related to Objective (Objective__c) then populate the objective Id in Related_Objective__c. Also, populate the Entity ID in the WhatId field.
        • If the task is related to Retirement Income (Retirement_Income__c) then populate the Retirement Id in Related_Retirement_Income__c. Also, populate the Entity ID in the WhatId field.
        • If the task is related to Account then populate the Account Id in Related_Entity__c.
      • Create Activity Configurations
        • If the process has Process_Task__c, then create the Activity Configuration and populate its Id on Activity_Configuration__c on task.
      • Populate Division
        • Populate primary division from Owner's Primary Division.
    • Before Update
      • Populate Task Fields
        • Populate the fields on the task like Start Date, Completed Date, Time Logged, and Stage Entry Date.
      • Populate WhatId and related fields
        • If the task is related to account (WhatId = Account Id) then populate the Related_Entity__c as the Account Id. If the task is related to an individual member, populate the WhoId with the member's ID.
        • If the task is related to Service then populate the Related_Service__c as the Service Id and WhatId with the account of the Service.
        • If the task is related to Asset/Liability then populate the Related_Asset_Liability__c as the Asset/Liability Id and WhatId with the account of the Asset/Liability and Related_Service__c with service Id on Asset/Liability record, and Related_Financial_Product__c with the Financial Product on the Asset/Liability record.
        • If the task is related to Deal then populate the Related_Deal__c as the Deal Id and WhatId with the account of the Deal and Related_Service__c with service Id on Deal record, and Related_Financial_Product__c with the Financial Product on the Deal record.
        • If the task is related to Financial Product (Financial_Product__c) then populate Related_Financial_Product__c with the Financial Product Id.
        • If the task is related to Policy Coverage (Policy_Coverage__c) then populate Related_Policy_Coverage__c with the Policy Coverage Id. Also, populate the Policy Id in Related_Policy__c.
        • If the task is related to Policy (Policy__c) then populate the Policy Id in Related_Policy__c. Populate the WhatId with the account of the Policy. Also, populate the Related Service with the Service on the Policy.
        • If the task is related to Goal (Goal__c) then populate the goal Id in Related_Goal__c. Also, populate Service Id in Related_Service__c and Entity Id in WhatId.
        • If the task is related to Income & Expense (Income_Expense__c) then populate the income & expense record Id in Related_Income_Expense__c. Also, populate Asset & Liability record Id in Related_Asset_Liability__c and Entity Id in WhatId.
        • If the task is related to Deliverable (Deliverable__c) then populate the deliverable Id in Related_Deliverable__c. Also, populate the Entity ID in the WhatId field.
        • If the task is related to Objective (Objective__c) then populate the objective Id in Related_Objective__c. Also, populate the Entity ID in the WhatId field.
        • If the task is related to Retirement Income (Retirement_Income__c) then populate the Retirement Id in Related_Retirement_Income__c. Also, populate the Entity ID in the WhatId field.
        • If the task is related to Account then populate the Account Id in Related_Entity__c.
      • Populate Division
        • Populate primary division from Owner's Primary Division.
    • Before Delete
      • Delete Activity Configurations
        • While deleting the task, if the task has related Activity Configurations, then delete those related Activity Configurations.
    • After Insert
      • Log Stage History
        • If Task Stage History is enabled in Trigger Settings, then:
        • When the task is created, create the Stage History record and set the Entry Date to the current date.
        • If the task status is blank, set the Stage on the Stage History record as No Stage. If the task status is closed, then set the Stage Category to Completed. If the task status is Not Started, set the Stage Category to Not Started.
      • Process Completed Tasks
        • Check if Enable_Workflow__c is enabled in the trigger setting. If it is enabled, then process the completed tasks.
        • When the tasks are completed, get all relevant predecessor actions/steps for all possible new steps being created.
        • Based on the action types, perform the functionality like Set Process Stage for this Process, Set Service Stage for Related Service, Set Client Stage for Related Client, Create New Task in this Process, Start a New Process, Create a New Service, or Create a New Service and a New Process.
      • Execute After Logic
        • Update the Activity Subtype field from the TaskSubtype field. Fire bell notification for task assignment to another user only if Salesforce doesn't create one.
      • Roll up Time Logged to Process
        • Roll up the time logged in hours to the related process.
      • Sync with Xplan
        • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
    • After Update
      • Log Stage History
        • If Task Stage History is enabled in Trigger Settings, then:
        • When the task is created, create the Stage History record and set the Entry Date to the current date.
        • If the task status is blank, set the Stage on the Stage History record as No Stage. If the task status is closed, then set the Stage Category to Completed. If the task status is Not Started, set the Stage Category to Not Started.
      • Process Completed Tasks
        • Check if Enable_Workflow__c is enabled in the trigger settings. If it is enabled, then process the completed tasks.
        • When the tasks are completed, get all relevant predecessor actions/steps for all possible new steps being created.
        • Based on the action types, perform the functionality like Set Process Stage for this Process, Set Service Stage for Related Service, Set Client Stage for Related Client, Create New Task in this Process, Start a New Process, Create a New Service, or Create a New Service and a New Process.
      • Roll up Time Logged to Process
        • Roll up the time logged in hours to the related process.
      • Sync with Xplan
        • If the Sync__c is enabled and the records are updated in Salesforce then sync the updates with Xplan.
    • After Delete
      • Roll up Time Logged to Process
        • Roll up the time logged in hours to the related process.
    • After Undelete
      • Roll up Time Logged to Process
        • Roll up the time logged in hours to the related process.
  2. If Task Rollup (Task_Rollups__c) is Enabled in Practifi Trigger Settings
    • Perform the roll-up summary using the LREngine library and based on the lookups described in RollupSummary.
  3. Before Insert
    • Set Created Date on before insert
      • If the Set_Created_Date_With_Bulk_API__c is checked in Practifi Trigger Settings then set the created date value from the Set_As_Created_Date__c field.
  4. Implications of Deactivating the Trigger
    • If the practifi__Defer_Automation__c field of Record is set to true, then the trigger logic will not execute. No method will be executed once practifi__Defer_Automation__c is set to true.
  5. Defer Automation Logic
    • No actions will fire from TaskTrigger when the Defer Automation flag is updated.
  6. If Task (Task__c) is not enabled in Practifi Trigger Settings
    • Then methods mentioned under Point 1 (If Task (Task__c) is enabled from Practifi Trigger Settings then) will not get fired. Other methods will be fired based on the Task_Rollups__c value in the trigger settings.
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.