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 template as you see fit.
- --In our Source system, Matter's don't have an Opened date
- --But our client created a custom field named 'Opened'.
- --We are going to copy that value into the Matter's Final_Date_Opened
- UPDATE
- __M_Matters
- SET
- Final_Date_Opened = V2.Final_Value
- FROM
- __M_CustomField_Definitions V1,
- __M_CustomField_Values V2,
- __M_Matters V3
- WHERE 1=1
- AND V1.Final_Subject = 'Opened'
- AND V1.Final_Parent_Type = '__M_Matters'
- AND V2.Final_CustomFieldDefinition_Id = V1.Id
- AND V2.Final_Parent_Type = V1.Final_Parent_Type
- AND V3.Id = V2.Final_Parent_Id
Related Articles
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 ...
Custom Field Kinds
The following is a list of the valid Kinds of custom fields. Kind Notes TextLine TextArea HtmlArea Number Represents any kind of number. Integer Represents only whole numbers Money Date Time TimeSpan Represents durations. DateTime EmailAddress ...
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 ...
Create a "Legacy Client Number" Custom Field
Some firms rely heavily on Client Numbers to search for a specific client. 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 ...
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 ...