If a task is related to an archived matter, mark it as complete
The following will mark all tasks that are related to a closed/archived matter as Complete.
- --The client has a bunch of tasks related to archived matters.
- --These tasks are NOT follow-ups and they NEVER intend on completing them.
- --The client would like us to close them out.
- UPDATE
- __M_Tasks
- SET
- Final_Stage = 'Complete'
- FROM
- __M_Tasks V1,
- __M_Tasks_Related_Entities V2,
- __M_Matters V3
- WHERE 1=1
- AND V1.Id = V2.Final_TaskEntry_Id
- AND V2.Final_RelatedTo_Id = V3.Id
- AND V2.Final_RelatedTo_Type = '__M_Matters'
- AND V3.Final_Status = 'Archived'
Related Articles
Matter Participants: Data Cleanup
Table Overview Matter Participants are contacts that are related to Matters. They exist in the table: __M_Matters_Participating_Entities They have three primary fields: Field Description Final_Matter_Id The Id of the Matter. Final_Participant_Type ...
Flatten Custom Object fields into Contact/Matter Fields
WARNING: Many systems that support custom objects allow multiple rows in custom objects. Many systems that allow custom fields only allow one single value for each field. When you use this script, if a matter has two values set for the same custom ...
Create Notes from Matter Descriptions
Some platforms do not support matter descriptions. The following will transform a matter description into a matter note. --Transform Matter Descriptions to Matter Notes INSERT INTO __M_Common_Notes (Id, Final_Parent_Id, Final_Parent_Type, ...
Create a "Legacy Matter Number" Custom Field
Some firms rely heavily on Matter Numbers to search for a specific matter. Sometimes when they migrate to a new system it can't replicate the automatic numbering system from their old system so they want to renumber all their matters to a new scheme ...
Matters: Trimming Client Numbers from Matter Numbers
The following script will peel off client numbers from matter numbers. For example, if a matter has a ReferenceCode like: ABC-0001 After the script runs, it will have a reference code of: 0001 Scenario 1: There are Client Reference Codes In some ...