Oops.. I deleted documents from ProLaw

We've all done it at some point. Accidently deleted documents from ProLaw, only to discover there is no undo button! Not fun. Luckily the geeks from IT can help. Free code incoming! This code is over inclusive, it includes some additional columns that might be helpful for other audit trail searching too.

ProLaw document restores are really a two stop process:

1. IT will need to restore from backup the documents from backup. If you created the document the same day you deleted it, most backups won't have it. But if it's been over night, typically the deleted documents will be in a backup.

2. You have audit trails turned on from events (which you should).

What we have to do is restore the documents, and then we need to pull the event note information. When we restore from backup, it's only going to restore the documents themselves, not the associated ProLaw document information. SQL geek to the rescue!

Below is a sql script your IT person can run that will look at the prolaw audit log to retrieve the document event date and event notes. Update the highlighted portion below to the professional that did the deletion, the matter ids in question, and the event date. Try and make the event date as short of lookback as possible. The audit logs are big and slow by design.

If you have any questions about this, feel free to reach out, be happy to help.

SELECT Audit.Audit, Audit.AuditDate, Audit.SearchAuditDate, Audit.AuditType, Professionals.Initials, Professionals.ProfName, Audit.ColumnLabel, Audit.BeforeValue, Audit.AfterValue, CAST(Audit.BeforeValue AS Varchar(100)) AS Before, CAST(Audit.AfterValue AS Varchar(100)) AS After, Events.Notes, Audit.AuditEventDate, Audit.Matterid AS AuditMatterId, Audit.FullName as AuditFullName, Audit.CompSort as AuditCompSort, Audit.EventDesc AS AuditEventDesc, Events.EndDate, Events.DoneDate, Events.ShortNote, Matters.AreaOfLaw, Events.Place, Matters.ClientSort, Matters.ShortDesc, EventTypesDocket.Authority, Events.Location, Events.PleadingIndexNo, Events.PleadingIndexType, Events.PleadingFr, Events.PleadingStatus, Events.PleadingStatusDate, Events.PleadingTo, EventMatters.Matters, Events.EventsParent, Events.EventKind, Events.Events, COALESCE(CAST(Events.DMSDOCNo AS VARCHAR(36)), COALESCE(Audit.AuditRTF,Events.RTF)) AS RTF , COALESCE(Audit.DMS, CASE WHEN Events.DMSDOCNo IS NOT NULL THEN 'Y' WHEN Events.DMSDOCNo IS NULL AND Events.EventKind !='O' THEN '' ELSE 'N' END ) AS DMS, Events.Events AS Docket, Events.EventClass, Audit.AuditEventsNo, DockComment FROM Audit LEFT OUTER JOIN Professionals on Audit.Professionals = Professionals.Professionals LEFT OUTER JOIN Events ON Audit.Atom = Events.Events LEFT OUTER JOIN EventMatters ON Events.Events = EventMatters.Events LEFT OUTER JOIN Matters ON EventMatters.Matters = Matters.Matters LEFT OUTER JOIN EventTypes ON Events.EventTypes = EventTypes.EventTypes LEFT OUTER JOIN EventTypesDocket ON EventTypes.EventTypes = EventTypesDocket.EventTypes WHERE ((AUDIT.SEARCHAUDITDATE>{D '2020-07-01'} and matters.MatterID in ('9999-11111', '9999-222222') and initials = 'XXX' ) AND AUDIT.PROFESSIONALS=PROFESSIONALS.PROFESSIONALS) ORDER BY ColumnLabel

Featured Posts
Recent Posts