Logging deleted instances

Contains tips for configurators working with Aware IM
Post Reply
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Logging deleted instances

Post by tford »

In all of my apps I maintain log files of additions / changes / deletions. I have a rule which will capture additions & changes as follows:

If Customer WAS CHANGED Then CREATE CustomerLog WITH CustomerLog.City=Customer.City,CustomerLog.FirstName=Customer.FirstName,CustomerLog.CustomerID=Customer.ID,CustomerLog.LastName=Customer.LastName

If there any other way to capture the deleted Customer info to CustomerLog BO than creating a special delete Process which created CustomerLog from Customer, then deletes Customer?

Thanks!
Tom

PS -- in AwareIM documentation, I think you should add a brief addition which explains that WAS CHANGED is triggered by additions / changes to a BO, but NOT deletions.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

The solution was simple. I had not remembered reading that there are seperate rules section that triggers rules when a BO is deleted. So, I simply added the following to that rule section fo the Customer BO:

CREATE CustomerLog WITH CustomerLog.City=Customer.City,CustomerLog.FirstName=Customer.FirstName,CustomerLog.CustomerID=Customer.ID,CustomerLog.LastName=Customer.LastName

Tom
Post Reply