Flushing old Todos and their documents  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Flushing old Todos and their documents

Postby SBarnes » Tue Sep 28, 2021 6:59 pm

Are then any gotchas if we want to flush out to dos and any attached documents that are older than a given date
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Flushing old Todos and their documents  Topic is solved

Postby Mike.Sheen » Wed Sep 29, 2021 11:48 am

You'' need to be aware of the dependencies - the business logic won't let you delete a todo whilst another todo is dependent on it.

If you plan on deleting using SQL and not the business logic, there is a foreign key from some tables to the TD_Main record, and they don't have delete cascade, you'll need to delete those first - TD_Notes, TD_Documents, TD_Collaborations, TD_Dependencies.

Be aware also that the TD_Dependencies is a two-way relationship - so if deleting via SQL you'll need to delete from TD_Dependencies where TD_Main_RecID_Dependent or TD_Main_RecID_Dependency is equal to the RecID of the ToDo you want to delete.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 3 guests