SpeedyNtoNAssociatePlugin 1.0.1

dotnet add package SpeedyNtoNAssociatePlugin --version 1.0.1
                    
NuGet\Install-Package SpeedyNtoNAssociatePlugin -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SpeedyNtoNAssociatePlugin" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SpeedyNtoNAssociatePlugin" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="SpeedyNtoNAssociatePlugin" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SpeedyNtoNAssociatePlugin --version 1.0.1
                    
#r "nuget: SpeedyNtoNAssociatePlugin, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SpeedyNtoNAssociatePlugin@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SpeedyNtoNAssociatePlugin&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=SpeedyNtoNAssociatePlugin&version=1.0.1
                    
Install as a Cake Tool

Speedy N:N Associate

An XrmToolBox plugin for bulk associating records via N:N (many-to-many) relationships in Dynamics 365 / Dataverse.

Features

  • Generic N:N support - Works with any N:N relationship, auto-discovered from metadata
  • Smart entity filtering - Selecting one entity auto-filters the other to only show entities with matching N:N relationships
  • CSV import - Load record pairs from a two-column CSV file (GUID1, GUID2)
  • FetchXML pairs - Write a single FetchXML query that returns two ID columns; each row becomes one pair
  • SQL query - Execute SQL SELECT via the Dataverse TDS endpoint; auto-detects GUID columns from the result set
  • Entity-aware filtering - FetchXML results are filtered to only include GUIDs matching the selected entities, ignoring unrelated columns (e.g., ownerid)
  • Syntax highlighting - Color-coded editors for both FetchXML (XML) and SQL with auto-formatting on paste
  • Parallel processing - Pooled connections with configurable parallelism
  • Tenacious retry - Up to 50 configurable retries with exponential backoff and shared throttle detection
  • Auto-reconnect - Broken connections are automatically replaced with fresh clones
  • Resume support - Tracks completed pairs so interrupted runs can resume
  • Duplicate handling - Gracefully skips already-associated pairs
  • Performance optimized - Bypass plugins/workflows option, connection pooling, thread pool tuning

Installation

From XrmToolBox Tool Store

Search for "Speedy N:N Associate" in the XrmToolBox Tool Store.

Manual Installation

  1. Build: dotnet build --configuration Release
  2. Deploy: .\deploy.ps1 -Force

Usage

  1. Connect to your Dataverse environment in XrmToolBox
  2. Click Load Entities to populate entity dropdowns
  3. Select Entity 1 -- Entity 2 auto-filters to related entities
  4. Select the N:N relationship (auto-populated)
  5. Load your data:
    • CSV tab: Click "Browse & Load CSV" to select a file with two GUID columns
    • FetchXML tab: Write a query returning two IDs (e.g., via <link-entity>), click "Preview Pairs"
    • SQL tab: Write a SQL SELECT returning two GUID columns, click "Preview Pairs"
  6. Configure settings (parallelism, retries, bypass plugins, logging)
  7. Click Associate
  8. If resuming a previous run, choose to continue or start fresh

Settings

Setting Default Description
Batch Size 1 Records per ExecuteMultiple request (1 = individual requests)
Degree of Parallelism Auto-detected Number of concurrent requests
Max Retries 10 Retry attempts per pair on transient errors (max 50)
Bypass plugins/workflows Checked Skip custom plugins for faster processing
Log every pair Checked Verbose logging; uncheck for errors-only
Skip per-item responses Checked Fire-and-forget batch mode -- skips per-item response tracking for faster server processing

CSV Format

Simple two-column CSV with optional header:

Guid1,Guid2
a1b2c3d4-...,e5f6a7b8-...

Supports both quoted and unquoted GUIDs.

FetchXML Format

Write a single query that returns rows with two GUID attributes. When a relationship is selected, the plugin uses entity-aware filtering to match GUIDs to the correct entities -- extra columns (e.g., ownerid) are safely ignored.

<fetch>
  <entity name="account">
    <attribute name="accountid" />
    <link-entity name="contact" from="parentcustomerid" to="accountid">
      <attribute name="contactid" alias="targetid" />
    </link-entity>
  </entity>
</fetch>

Click Preview Pairs to execute the query and see a resizable preview grid of extracted pairs.

SQL Format

Write a SQL SELECT that returns at least two GUID columns. The TDS endpoint must be enabled in your environment (Power Platform Admin Center > Settings > Features).

SELECT a.accountid, c.contactid
FROM account a
CROSS JOIN contact c
WHERE a.statecode = 0

The plugin auto-detects which columns contain GUIDs and uses the first two as the pair. No additional authentication is needed -- reuses the existing XrmToolBox connection.

Test Data

Run the test data generator to create two custom entities with an N:N relationship, populate them with test records, and export GUID pairs + sample queries for plugin testing.

# Basic usage (creates spdy_testwidget and spdy_testgadget)
.\test\create-test-data.ps1 -EnvironmentUrl "https://your-org.crm.dynamics.com"

# Custom entity names
.\test\create-test-data.ps1 -EnvironmentUrl "https://your-org.crm.dynamics.com" `
    -Entity1Name "project" -Entity2Name "resource" `
    -Entity1DisplayName "Project" -Entity2DisplayName "Resource"

# Custom prefix and record count
.\test\create-test-data.ps1 -EnvironmentUrl "https://your-org.crm.dynamics.com" `
    -PublisherPrefix "dev" -RecordsPerEntity 50
Parameter Default Description
-EnvironmentUrl (prompted) Dataverse environment URL
-RecordsPerEntity 20 Number of test records per entity
-PublisherPrefix spdy Publisher/entity prefix
-Entity1Name testwidget Logical name suffix for entity 1
-Entity2Name testgadget Logical name suffix for entity 2
-Entity1DisplayName Test Widget Display name for entity 1
-Entity2DisplayName Test Gadget Display name for entity 2

The script is idempotent — it skips entities and relationships that already exist. Output files (CSV pairs, FetchXML queries, SQL query) are saved to your Downloads folder.

To generate a standalone CSV with random GUID pairs (no Dataverse connection needed):

.\test\generate-csv.ps1 -Count 50000

License

MIT

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 294 4/9/2026
1.0.0 110 4/9/2026

Extract parameter objects (AssociationRunOptions), error classifier, syntax highlighter, and shared result types for improved maintainability