Audit deleted records

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
User avatar
vaalonv
Posts: 8
Joined: 2016-01-28 10:22

Audit deleted records

Post by vaalonv » 2018-01-18 15:37

Hi there,

I have developed an Appgini web application and is functioning very well but my concern is that Client wants to allow some users to delete records in Application level but not in Database Level if this is possible please help me.

Otherwise, if not possible is there a way we can audit or create logs that lets us understand who deleted the records for exmaple:

1. user logins with username password
2. goes to table X and deletes a record

I want the system too:

1. Create a log where all the deleted records are logged with information from which particular user was the action performed and the date when it occurs.

Any help would be highly appreciated

R Tammam
Veteran Member
Posts: 113
Joined: 2017-08-26 15:35

Re: Audit deleted records

Post by R Tammam » 2018-01-24 11:02

Hello Vaalonv,

i would like to help you in your questions

first for auditing you can do it by making a log table in you project , call it log table and you can insert in this table through after delete hook functioin
you can read more about delete hook function though this link
http://bigprof.com/appgini/help/advance ... ter_delete

and for the second question (deleting client side only )
you can add an extra column in the table call it flag this column values will be 0 or 1
and then in before delete hook function update the deleted record field (the flag you made) the deleted record will take value 1
and return false in before delete to prevent the actual delete from database
then force a filter on this table though init function to show only records in this table that have flag value 0 (non deleted ones)

those are my two ideas for your questions
you can read more about before delete function and init function from the following links
before delete
http://bigprof.com/appgini/help/advance ... ore_delete
init function
http://bigprof.com/appgini/help/advance ... ename_init

Post Reply