Manage NN relationships

This XrmToolBox tool allows you to export/import data into a Relationship (or Intersect) table of the many-to-many (N:N) relationships and even lets you delete the N:N data (developed by Tanguy Touzard).

With an out-of-the-box data import wizard, the data can only be imported into the standard table and it is not possible to import the data into the intersect table of the many-to-many relationship.
To associate the multiple records for a specific many-to-many relationship in bulk, you can use this tool to import a two-column CSV data file and specify the mapping.
  • Tool Information
  • Documentation
  • Blog mentions 1Blog mentions 2
  • Video Tutorial (from 47:37)
  • Functionalities
    • Import the data into N:N intersect table from the CSV file (Fig. 1, Pt. 2)
      • Load the table metadata (Fig. 1, Pt. 1)
      • Select the first table from the N:N relationship (Fig. 1, Pt. 9)
      • Specify the name of the column to be used as a mapping from the first table (Fig. 1, Pt. 10).
        • During the import, the values from the first column of the CSV file will be used to find the matching data in this mapping column to identify the record to be associated. Just like resolving the lookup column values in the Data Import Wizard, it is important to use the column with unique values as the mapping column to avoid multiple record errors.
      • Select the N:N relationship to be imported (Fig. 1, Pt. 11). The second table will be automatically populated based on the selected N:N relationship (Fig. 1, Pt. 12)
      • Specify the name of the column to be used as a mapping from the second table (Fig. 1, Pt. 10).
        • Same as above, the values from the second column of the CSV file will be used to find the matching data from the second table by searching in this mapping column to identify the record to be associated.
      • Specify the CSV file (Fig. 1, Pt. 14)
        • Select the separator in the CSV file if  it is not Comma (,) (Fig. 1, Pt. 5)
        • Here is the screenshot of the sample CSV file opened in Excel and a plain text editor (Fig. 2)
    • Export the data from N:N intersect table into the CSV file (Fig. 1, Pt. 3)
      • Same steps as the above import process except the last one for which the location of the exported CSV file needs to be specified in the prompt dialogue window.
      • The values in the specified mapping columns will be exported into the CSV file.
    • Delete the data into N:N intersect table based on the data specified in the CSV file (Fig. 1, Pt. 4)
      • Same steps as the above import process. The CSV file needs to be specified to identify the records to be bulk disassociate.
      • The values in the CSV file will be used to identify the records based on the mapping columns and disassociate the N:N relationship between two matching records.
    • Additionally, this tool can
      • Show the result logs of the import/export/delete processes (Fig. 1, Pt. 18)
        • Filter to show the errors only or hide the existing record errors (Fig. 1, Pt. 17)
        • Log more debugging information (Fig. 1, Pt. 6)
        • Export the logs as a CSV file (Fig. 1, Pt. 7)
        • Clear the logs (Fig. 1, Pt. 8)
      • Cache the rows for the selected first and second tables for a faster process (Fig. 1, Pt. 15)
      • Process the records in batch (Fig. 1, Pt. 16)

Fig. 1 - Manage NN relationships

Fig. 2 - Sample CSV File

This is part of the #TooLDR series where I test and review the tools for Power Platform. You can check out the information for the other tools on this page.

Comments

Popular Posts