FAC_UpsertResource_TDTM
Facility trigger handler/TDTM
Custom Permission | REDU - Admin |
Event | AfterInsert, AfterUpdate |
Object | Facility |
Related RIO Education Settings | None |
Description
When a new Facility is inserted or when an existing Facility is updated, this class checks if it has a related Resource of Resource Type Location. If it does, then this class updates the Resource Name and Active fields to match the Facility Name and Active fields on the Facility.
If there is no existing Location Resource, then this class will create one, link it to the triggering Facility record using the Facility field, and set the Resource Name and Active fields to match the corresponding Facility fields.
Use case
To create/update Resource record that linked to Facility.