I am testing with the AfterDelete event. Here is a picture of the issue using a sample from my AuditLog.
I can record the RecordID for Insert and Update, but I can not get the recordID for DELETEs.
If you look at recordId 1, you can see the recordID (ProjID) for for Create and UPDATE, but there is no RECORDID for the DELETE. The value does show up in the ProjID field in log record 699. I'm trying to capture the value to record it under RecordID? I have tried ProjID and Old.ProjID but nothing has worked.
As I have said, I'm new to this so may be missing something basic.
Thanks for responding.
Code:
AuditID |
RecordID |
TableName |
FieldName |
ActionCode |
NewValue |
OldValue |
ChangedBy |
ChangedDate |
697 |
3 |
tblProjDemo |
ProjActualHrs |
CREATE |
|
|
mellon |
14-May-2017 10:59:50 PM |
698 |
3 |
tblProjDemo |
ProjDesc |
UPDATE |
Office equipment and furniture |
Ofice equip and furniture |
mellon |
14-May-2017 11:00:22 PM |
699 |
|
tblProjDemo |
projID |
DELETE |
|
1 |
mellon |
14-May-2017 11:00:26 PM |