Copy User and Contact Picklists from __M_CustomField_Definitions to __M_Matters_Participating_Entities
Some systems do not support custom fields that are User/Contact Picklist but they do support participants.
Use this script to copy custom field values/definitions into the Matter Participants table.
- --We need to copy some records from custom fields into matter participants.
- INSERT INTO __M_Matters_Participating_Entities (
- Id,
- Final_Matter_Id,
- Final_Participant_Type,
- Final_Participant_Id,
- Final_Role
- )
- SELECT
- CONCAT(V1.Id, V2.Id),
- V2.Final_Parent_Id,
- V1.Final_Kind,
- V2.Final_Value,
- V1.Final_Subject
- FROM
- __M_CustomField_Definitions V1,
- __M_CustomField_Values V2
- WHERE 1=1
- --Do the conversion for custom fields that are Contact or User picklists
- --If you only want Users, then adjust the following.
- AND V1.Final_Kind IN ('__M_Contacts', '__M_Users')
- --And extend the Matters table.
- AND V1.Final_Parent_Type IN ('__M_Matters')
- AND V2.Final_CustomFieldDefinition_Id = V1.Id
Related Articles
Create a "Legacy Originating Attorney" field (from __M_Matters_Participating_Entities)
Most destination systems will only let you set the Originating Attorney and Responsible Attorney to an active user. This is why user mapping is used to map inactive users from the legacy system to an active user in the new system. But the firm may ...
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 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 ...
Copy a Custom Field into a Core Field
Some systems don't have certain core fields and clients often create a custom field that they use instead. The following script will let you copy values from a custom field named 'Opened' into __M_Matters.Final_Date_Opened . You can adjust this ...
Copy Calendar Entry Dates into Custom Field Values
Some systems let you create custom fields that reference a Calendar Entry. When moving custom fields into a system that does not support this, an easy workaround would be to turn these custom fields into DateTime custom fields by copying in the start ...