Database Triggers

Database triggers are activated by successful table operations, such as saving a record, deleting a record or reading a record. Database triggers are the most reliable way of ensuring relational integrity between a third-party record and a related Microsoft Dynamics GP record, since a database trigger is activated only if the database operation was successful. The following table lists each type of database trigger:

[spacer]

Trigger type

Description

Add

Activated when Microsoft Dynamics GP successfully adds a new record.

Update

Activated when Microsoft Dynamics GP successfully updates an existing record.

Delete

Activated when Microsoft Dynamics GP successfully deletes an existing record.

Read

Activated when Microsoft Dynamics GP successfully reads an existing record without locking it.

Read lock

Activated when Microsoft Dynamics GP successfully reads an existing record and either passively or actively locks it.


For example, using a single trigger activated by the add operation, the sample integrating application automatically creates a new third-party contact history record when a new customer record is created in the accounting system. Likewise, using a single delete trigger, the sample application automatically deletes a third-party customer contacts record when the corresponding customer record is deleted. Information about database triggers is divided into the following sections:

 


Documentation Feedback