I tried to make a history log , the workflow is I have a main table, then if a user inserted, updated or deleted a record upon it, it will copy the values to a back up table along with the user id of the one who made the action.
I've been smooth sailing until I there was a sudden iceberg.
I have a trigger that activates upon insert, update and delete which is what i used to transfer the records to the back up table. The problem is, when I delete something, the trigger was unable to detect the user id of the user who made the action. It just directly transfer the record to the backup table. therefore, the user id of the transferred record is the user id of the last user who updated the record. not the one who deleted the record.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
NiceDuck
Hello,
I tried to make a history log , the workflow is I have a main table, then if a user inserted, updated or deleted a record upon it, it will copy the values to a back up table along with the user id of the one who made the action.
I've been smooth sailing until I there was a sudden iceberg.
I have a trigger that activates upon insert, update and delete which is what i used to transfer the records to the back up table. The problem is, when I delete something, the trigger was unable to detect the user id of the user who made the action. It just directly transfer the record to the backup table. therefore, the user id of the transferred record is the user id of the last user who updated the record. not the one who deleted the record.
any ideas?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.