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 Matters that reference Users
- -- into Matter Participating Users.
- INSERT INTO __M_Matters_Participating_Entities (
- Id,
- Final_Matter_Id,
- Final_Participant_Id,
- Final_Participant_Type,
- Final_Role
- )
- SELECT
- CONCAT('TRANSFORM --- ', V2.Id),
- V2.Final_Parent_Id,
- V2.Final_Value,
- V1.Final_Kind,
- V1.Final_Subject
- FROM
- __M_CustomField_Definitions V1,
- __M_CustomField_Values V2
- WHERE 1=1
- --Change this to '__M_Contacts' if you want to do this for contact custom fields
- AND V1.Final_Kind = '__M_Users'
- AND V1.Final_Parent_Type = '__M_Matters'
- AND V1.Id = V2.Final_CustomFieldDefinition_Id