Creating Custom Delete Triggers
The following procedure describes how to create a custom delete trigger. For more information about custom delete triggers, see About Creating Custom Delete Triggers.
To create a custom delete trigger
Determine which Siebel domain is associated with the record to be deleted, and use the following table to determine the corresponding SEBL_DOMAIN_IDEN value to use in a later step.
Siebel Domain Name SEBL_DOMAIN_IDEN Value Siebel Business Contact
PIMSI Intermediate Business Contact
Siebel Calendar
PIMSI Intermediate Calendar
Siebel Task
PIMSI Intermediate Task
Locate the script that creates the database triggers that are supplied along with SSSE for your database environment.
The following table lists the script names for each database environment. These scripts are typically located in the
siebsrvr/BIN
directory on your Siebel Server.Database Script Name DB2
ssse_triggers_db2.sql
DB2 390
ssse_triggers_db2_390.sql
Microsoft SQL Server
ssse_triggers_mssql.sql
Oracle
ssse_triggers_ora9.sql
In the appropriate script file for your database environment, review existing delete triggers to see examples of the specific language required for each domain and operation.
The following table lists some existing trigger names and the contexts in which they direct SSSE to delete specified PIM records.
Delete Trigger Name Trigger Requests Deletion of PIM Record if: SSSE_ACT_EMP_PIM3
A user changes the owner of an activity record (calendar or task)
SSSE_CONT_INFO_T1
A user removes a business contact record from his or her Sync List
SSSE_EVT_ACT_PIM1
A user converts a calendar record to a task record, or a task record to a calendar record
Write the new delete trigger you require, using an appropriate existing trigger as a model.
For an example of one existing trigger, see Sample Delete Trigger.
Use a tool such as SQL Query Analyzer to apply the new trigger to the database.
Test the trigger by completing the following substeps:
Create a Siebel record of the type that your new trigger is designed to monitor, such as a business contact record.
If necessary, add the record to your Sync List, and verify that SSSE creates a corresponding PIM record.
Perform the operation that your new trigger is designed to detect, such as deleting or updating the business contact record, or removing it from your Sync List.
Verify that the expected result occurs—one or more delete trigger records are added to the S_SD_SYNC_INFO table, and SSSEdeletes or updates the corresponding PIM record, as specified in your trigger.