Can someone help me understand the diff b/w WRITE and REPLICATION-WRITE Trigger?

Team,
Can someone help me understand the diff between WRITE trigger and REPLICATION-WRITE Trigger? When i tried creating a record to REPLICATION table in WRITE trigger i was able to... If so what makes REPLICATION-WRITE trigger so special?

It might be a silly question though.

It would be great if you can provide your inputs. Thanks in advance..!
 

RealHeavyDude

Well-Known Member
You can put the same ABL code into either the WRITE or REPLICATION-WRITE trigger. From that point of view there is nothing special to either one.

IMHO the usage of database triggers for business logic is not good practice anyway. One valid use case I see would be assigning a technical key that gets only populated during creation of the record.

So if part of your business logic is in the WRITE trigger, then, IMHO replication should not be part of the standard business logic of any application - therefore I would not use the WRITE trigger to place replication logic into it. Maybe you are deploying the same application in different environments with different requirements when it comes to replication. If you replication logic is intermixed with other business logic you have a problem. If you have a dedicated piece of logic that does the replication it is much easier to adapt to changing requirements.

Heavy Regards, RealHeavyDude.
 
Top