User Tools

Site Tools


Additional Settings

Include Child Records

The “Include Child Records” option provides a way to share out child records of a parent record. This is done by creating Apex triggers so as to capture events on those child tables, with filtering done so we only share out child records related to the parent record.

After selecting the parent table on a dynamic share form, the Include Child Records option will populate with child tables that support Apex triggers. Select those tables where you want to share child records from.

For example, if you select the Case table for the dynamic share and want to share out comments on Case records, select the “CaseComment” table in the “Include Child Records” option:

Like attachments, this option currently only supports sharing out all fields of the child tables.

As is the case with the Apex trigger created for the parent table specified in the share, any triggers created for the child tables will be set to blank when the dynamic share is set as inactive and/or the user removes a child table from the selected list (i.e. the user first selects the CaseComment table in the “Include Child Records” option and creates a trigger for it and then later decides to remove the CaseComment table from the selected list). This is done to be consistent with the approach of not deleting Apex Triggers since Apex triggers can only be created in sub-prod orgs and moved over to prod orgs. (i.e. once you delete an Apex trigger in production you can't recreate it without going through the process of doing it in a sub-prod).

Apex triggers on the child tables can be deleted but when the Apex trigger is deleted on the parent table, notably when the dynamic share itself is deleted.

salesforce_share_additional_settings.txt · Last modified: 2018/02/05 22:56 by paul