Listing table triggers

Listing table triggers

It's not uncommon for Dynamics GP users and partners to "tweak" GP by adding SQL triggers or custom stored procedures. As with any modification to the standard GP behavior, it can have unanticipated consequences, especially when there are integrations to other components present.

Here's a script that lists all the triggers present in the selected database. Note that GP comes with its own triggers, so it can be tricky to determine what was added/modified versus what was part of the original installation. This script shows both the table's created date and the trigger's created date in order to help sort out the mystery.

  1. -- Get Triggers w/ Code
  2. SELECT Tables.Name TableName, Tables.crdate TableCreatedDate, Triggers.crdate TriggerCreatedDate,
  3. Triggers.name TriggerName, Triggers.[type],
  4. Comments.Text TriggerText
  5. FROM sysobjects Triggers
  6. Inner Join sysobjects Tables On Triggers.parent_obj = Tables.id
  7. Inner Join syscomments Comments On Triggers.id = Comments.id
  8. WHERE Triggers.xtype = 'TR'
  9. And Tables.xtype = 'U'
  10. ORDER BY Tables.Name, Triggers.name
    • Related Articles

    • Script to fix "Invalid column name" message in SOPicks table

      If the message from the host is: An error occurred while submitting transaction ID 82ea4208-1701-432a-87cb-02501cd90286. The eConnect Transaction was submitted successfully, but transaction VER000045 encountered a problem while adding a record to the ...
    • Script to fix "Invalid column name" message in SOPicks table

      Error Message If the message from the host is: An error occurred while submitting transaction ID 82ea4208-1701-432a-87cb-02501cd90286. The eConnect Transaction was submitted successfully, but transaction VER000045 encountered a problem while adding a ...
    • Binary Stream Tables Not Installed Completely

      Error Messages Old message: The setting EnableBSMEM is on, but the table B3900400 does not exist for this company which is required to run Binary Stream integration. Updated message: Unable to access the tables required for Binary Stream (e.g., ...
    • Gboard Virtual Keyboard Bug

      A known bug in Gboard on some Android mobile computers causes the virtual keyboard to remain visible even when configured to be hidden. Workaround Install Simple Keyboard (by Raimondas Rimkus) from the Google Play Store. This requires a Google ...
    • Panatrack Ship Pack tables

      The Panatracker solution includes tables that integrate with Starship to provide information about sales order shipments. Information for shipping containers is captured in one of two Panatracker transactions: Fulfill Order and Verify Order. Either ...