Loading
 Experience Cloud – Feature Degradation on Lightning Web Runtime SitesRead More
The Trailblazer Community is now read-only Read More
Education Cloud
Create a Flow to Delete Person Examination Records

Create a Flow to Delete Person Examination Records

Automatically delete child records when you delete a parent Person Examination record.

Editions Needed
Available in: Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions with Education Cloud

Education Cloud represents standardized tests data that an applicant submits as records on the Person Examination object. Some standardized tests have a two-deep hierarchy of records, including a parent Person Examination record and child Person Examination records. For example, the ACT has a composite score and individual scores for areas such as Science and Math. We recommend that you create a flow that deletes the child records when you delete a parent Person Examination record.

Diagram showing the flow to delete person examination records.

Flow Element Details

This table describes what each element does in the flow.

Flow Element What Does It Do?
Start Deletion of a person examination record triggers the flow.
Get Child Person Examination Records Finds the child person examination records where the ParentPersonExaminationId lookup field is equal to the Id of the deleted person examination record.
Child Records Count Assigns the count of the query result from the previous step to a variable called ChildRecordSize. This variable determines whether to run the delete step.
Check Record Count If the value in ChildRecordSize is zero, the default outcome is followed, and the flow ends. If the value is greater than zero, the Delete Child Person Examination Records element runs next.
Delete Child Person Examination Records Deletes the person examination records in the collection queried by the Get Child Person Examination Records element. Then the flow ends.

See Also:

 
Loading
Salesforce Help | Article