Added capital works blank section. Synced calling screen.
[capital-apms-progress.git] / rplctn / creptrig.i
blobe83e193048051c50ccef4554e1c19d5bf5892a67
1 /*
2 System: Property Management and Finance System
3 Program: creptrig.i
4 Author: Donald Christie
5 Date: 26/08/97
6 Description: Generic include file to create replication entries in the
7 replication log table on modify
8 Goes on the Replication-Create trigger which
9 is fires immediately after the create command (ie no data)
10 I need this as the NEW function does not work in the
11 replication-write trigger.
12 Usage: Pass in the table name and action.
13 &rtable = <name of the table of this trigger>
15 Modification Notes
18 {inc\ofc-this.i}
20 /* check that replication is valid at this site...*/
23 FIND FIRST ReplTrigger WHERE ReplTrigger.TableToRepl = "{&rtable}"
24 NO-LOCK NO-ERROR.
26 IF AVAILABLE ReplTrigger
27 AND INDEX (ReplTrigger.Activity, "C") <> 0
28 THEN DO:
30 /* because the NEW function does not work create a
31 blank repl entry in the replication create trigger
32 if this is a new record...*/
34 CREATE ReplLog.
36 ASSIGN ReplLog.ReplID = NEXT-VALUE (Replid)
37 ReplLog.OfficeCode = Office.OfficeCode
38 ReplLog.TableToRepl = '{&rtable}'
39 ReplLog.TransactID = DBTASKID (LDBNAME (BUFFER {&rtable}))
40 ReplLog.ReplDate = TODAY
41 ReplLog.ReplTime = TIME
42 ReplLog.TableRowID = RECID ({&rtable})
43 ReplLog.ReplEvent = "C".
46 END. /* if available...*/