Moving Documents into Matters that are Nested under Invoices

Moving Documents into Matters that are Nested under Invoices



  1.  --The following script moves documents that are nested under Invoices to be nested under Matters instead.
  2. UPDATE
  3. __M_Documents_Digital_Files
  4. SET 
  5. Final_Folder_RelativePath = '\Invoices\',
  6. Final_Parent_Type = Relationships.Final_RelatedTo_Type,
  7. Final_Parent_Id = Relationships.Final_RelatedTo_Id
  8. FROM
  9. __M_Documents_Digital_Files Documents,
  10. __M_Financial_AR_Invoices Parents,
  11. __M_Financial_AR_Invoices_Related_Entities Relationships
  12. WHERE 1=1
  13. AND Documents.Final_Parent_Type = '__M_Financial_AR_Invoices'
  14. AND Documents.Final_Parent_Id = Parents.Id
  15. AND Parents.Id = Relationships.Final_ArInvoice_Id
  16. AND Relationships.Final_RelatedTo_Type = '__M_Matters'

    • Related Articles

    • Moving Documents into Matters that are Nested under Other Entries

      Some systems allow documents to be nested under virtually any other kind of record. This can be challenging when moving documents into systems that have a limited number of parent types. --The following script creates a "MISC DOCUMENTS" matter --And ...
    • Moving Documents into Matters that are Nested under Calendar Entries

      --The following script moves documents that are nested under Calendar Entries to be nested under Matters instead. UPDATE __M_Documents_Digital_Files SET Final_Folder_RelativePath = '\Calendar Attachments\', Final_Parent_Type = ...
    • Moving Documents into Matters that are Nested under Communications

      --The following script moves documents that are nested under Communications to be nested under Matters instead. UPDATE __M_Documents_Digital_Files SET Final_Folder_RelativePath = '\Emails\', Final_Parent_Type = Relationships.Final_RelatedTo_Type, ...
    • Moving Documents into Matters that are Nested under Tasks

      --The following script moves documents that are nested under Tasks to be nested under Matters instead. UPDATE __M_Documents_Digital_Files SET Final_Folder_RelativePath = '\Task Attachments\', Final_Parent_Type = Relationships.Final_RelatedTo_Type, ...
    • Synthesize Missing Matters for Documents

      Some systems only allow documents to be linked to matters. These scripts will allow you to restore data into these systems. When Matters No Longer Exist The following script with synthesize matters for document related to matters that no longer ...