Your Knowledge Base has moved to the new Help Center.  Check out the release notes for details. And don't forget to update your bookmarks and in-house documentation before May 28.

Database Triggers

 

The following list of database triggers are running on every MinistryPlatform system. Custom triggers may exist on specific systems.

Add Registrants to Groups 
This trigger fires if a new Invoice Detail record is added that is associated with a Product Option Price that has an "Add to Group" value. It's purpose is to enroll the registrant in the appropriate group based on the selection made on the registration form.

Add Responding Participant to Event or Group
When a row is updated on the Responses table and the value for "Response Result" is set to "Placed", this trigger adds the participant making the response to the group or event listed on the Opportunity record to which the response was made.

Canceling an Event
When a user with Edit rights to Events modifies a record and sets the value of "Cancelled" to "Yes", a trigger fires to prepend the word "***Cancelled***" to the event title; delete any existing rooms, equipment, or service records assigned to that event; turn off registrations when appropriate; and remove it from Check-In Suite, if applicable. If the Event is un-cancelled, it automatically un-cancels any services, rooms, and equipment attached to the Event. If the Event, Services, Rooms, Equipment record has "Approved" already set to "Yes", then those will not be re-submitted for Approval. If "Approved" is null, then those will be submitted for Approval. If your goal is to have those be re-submitted for Approval, then the trigger can be changed on your system to update the read-only field "Approved" by Professional Services or someone on staff with access to SQL can update the field. Changes to the Event Title and Registration Active fields for the Event and Cancelled fields for supporting items (Room, Equipment, Services) are audit logged.

Canceling a Room Reservation
When a user edits a Room Reservation record and sets "Cancelled" to "Yes" a trigger will fire to prepend the word "***Cancelled***" to the notes for that item. The item will no longer appear on double booked views and reports. The item may be eligible to appear in "Available Room" views and reports in that time slot of no other event has it tied up during that time.

Canceling an Equipment Reservation
When a user edits an Equipment Reservation record and sets "Cancelled" to "Yes" a trigger will fire to prepend the word "***Cancelled***" to the notes for that item. The item will no longer appear on double booked views and reports. The item may be eligible to appear in "Available Room" views and reports in that time slot of no other event has it tied up during that time.

Canceling a Service Request
When a user edits a Room Reservation record and sets "Cancelled" to "Yes" a trigger will fire to prepend the word "***Cancelled***" to the notes for that item.

Email Proxy From
A trigger exists on dp_Communication_Messages (All Recipients) which replaces the From email address on emails sent from MinistryPlatform when that email address is not part of the church domain. This is necessary to avoid spam filters in cases when volunteers are allowed to send emails from the Platform and their personal email is used. See "Configure A Proxy Email" in the article Avoiding Spam Filters.

End Date Group Participants
When a row is updated on the Groups table and the Groups.End_Date value is added for the first time, this trigger updates the Group_Participants.End_Date value for every participant still actively involved in that group. Note: This trigger only works the first time an End Date is added. Subsequent changes to the End Date do not trigger this action, and new participants added to the group after it has been end dated are not affected. The End Date for Participants is only changed if the Group End Date was not previously set, the Participant is in the Group at the time of end dating, and the Participant has no current or future End Date.

Insert Reciprocal Relationship
When a row is inserted into the Contact Relationships table, this trigger inserts a second row that creates the reciprocal relationship for the related contact. For example, if record is added listing one record as the child of another record, then a row is inserted listing the second record as the parent of the first record

Room Reservation, Equipment Reservation & Service Request Auto Approve
When an event record is inserted or updated, this trigger will fire to ensure that the following fields are synchronized with Events.__Approved for any reservation where the item in question is set to be "Auto Approved." Note: This is dependent on the setup of your Room Approval Process.

  • Event_Rooms.__Approved
  • Event_Equipment.__Approved
  • Event_Services.__Approved

Synchronize Donor Record
When a row is inserted or updated on the Donors table this trigger updates the Contacts.Donor_Record field on the Contacts page.

Synchronize Participant Record
When a row is inserted or updated on the Participants table this trigger updates the Contacts.Participant_Record field on the Contacts page.

Synchronize User Record
When a row is inserted or updated on the Users table this trigger updates the Contacts.User_Account field on the Contacts page.

Update Reciprocal Relationship
When a row is updated on the Contact Relationships table, this trigger updates the reciprocal relationship. For example, if a contact is listed as married to another contact and the row is updated to reflect a divorce, the reciprocal record is updated by this trigger.