Deleted Records Change-tracker
Users can delete records in an Orixa App, provided that the record is not linked to any child-records.
Orixa Apps do not provide a full "undo" audit-trail for all records by default. This can be added as a special feature, but it is generally discouraged because it uses a lot of resources.
Sometimes users may want details of particular records that have been deleted. As Orixa Apps keep an Edit History Log of all users' actions in creating, editing and deleting records a basic audit-trail can be created.
Details of how to do this are shown below
Find the "Deleted Records Change Tracker" in the Resources Tree-view
Resources Tree-view Deleted Records Change-tracker |
In the "Resouces Tree-view":
|
Change-tracker: Enter details |
In the "Activate" screen
The database will be queried to find all the deleted records of the table-name you enter, in the period selected. It will then find all the change-records stored in the EditHistory log for these deleted records. |
Change-tracker Grid |
Deleted Records Grid Data is returned about the deleted records. The App cannot provide content of the deleted data. However, it can provide some useful information
|
I need to know more about a deleted record, what can I do?
For most Orixa Apps regular daily backups are made of the whole database. This means if a record was created on date A and deleted on date B then a backup should exist which was made when the record existed.
If this is the case, the database can be restored from this backup file and reviewed, but it will only show data about this record at the time of the backup.
However, if a record was created and deleted on the same date (without a backup being made in between) then there will not be any saved version of the data which includes this record.
Most Orixa Apps do not keep backups forever. Older backup files are often deleted or removed. In these cases it may also be impossible to get detailed data about a deleted record.
If it is essential that full "change-tracking" occurs for some of your data, so that all changes and deletions occur whilst keeping an audit trail that users can "undo" discuss this with your developer and these features can be added to your Orixa App, but note that this will result in slower performance and extra costs in terms of data use.
My Orixa App doesn't include a "Deleted Records Change-tracker" what can I do?
If your developer runs the following script, it will add the resource to your Orixa App.
Example Script
INSERT INTO Resources
("Name", LocationID, ComponentID,
SQLStr, LinkTable, TargetTable )
VALUES
('Deleted Records Change-tracker', TypeID('Entity'), TypeID('Grid'),
'SELECT
ID, LinkID,
S.Name as "Status",
LinkTable,
CAST(DateCreated as Date) as DateDone,
CAST(DateCreated as Time) as TimeDone,
ChangeType,
P.FullName as Author
FROM EditHistory EH
LEFT JOIN "Status" S ON S.ID = EH.StatusID
LEFT JOIN People P ON P.ID = EH.AuthorID
WHERE LinkID IN (SELECT LinkID FROM EditHistory
WHERE ChangeType = ''Del''
AND LinkTable = ''[STR LinkTable]''
AND DateCreated BETWEEN CAST([MinDate] as DATE)
AND CAST([MaxDate] as DATE)
)
ORDER BY LinkID, DateDone, TimeDone',
'EditHistory', 'EditHistory' )