Create Contact Categories from Matter Participants
- --The following script will create Contact Categories from the roles
 - --that Contacts are linked to on Matters and then assign the contacts to those categories.
 - GO
 
- INSERT INTO __M_Contacts_Categories (
 - 	Id, 
 - 	Final_Subject
 - )
 - SELECT DISTINCT
 - 	CONCAT('SYNTHESIZED --- ', Final_Participant_Role),
 - 	Final_Participant_Role
 - FROM
 - 	__M_Matters_Participating_Entities
 - WHERE 1=1
 - 	AND Final_Participant_Type = '__M_Contacts'
 
- INSERT INTO __M_Contacts_Categories_Participating_Entities(
 - 	Id,
 - 	Final_ContactCategory_Id, 
 - 	Final_Participant_Id, 
 - 	Final_Participant_Type
 - )
 - SELECT DISTINCT
 - 	CONCAT('SYNTHESIZED --- ', Final_Participant_Role, ' --- ', Final_Participant_Id),
 - 	CONCAT('SYNTHESIZED --- ', Final_Participant_Role),
 - 	Final_Participant_Id,
 - 	Final_Participant_Type
 - FROM
 - 	__M_Matters_Participating_Entities
 - WHERE 1=1
 - 	AND Final_Participant_Type = '__M_Contacts'
 
- GO
 
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 ...
 
Convert User-Select/Contact-Select Custom Fields => Participants
Some systems do not support User-Select or Contact Select custom fields. The following query will transform User-Select fields into Matter Participants. This script can easily be adapted for Contact-Select fields. -- Transform Custom Fields on ...
 
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 ...
 
Synthesize: Missing Document Categories for Documents
The following script will synthesize document categories for invalid Final_DocumentCategory_Id values on documents. -- Some documents are linked to categories that no longer exist. -- Create dummy document categories based on these values. INSERT ...
 
Create an "Employer" Contact from a Custom Field.
In some systems, contacts do not have an Employer relation and only have a text field that represents the employer. This script will help when moving firms into platforms that allow an actual contact to be specified for the employer. --Create Company ...