SpeedyNtoNAssociatePlugin 1.0.1
dotnet add package SpeedyNtoNAssociatePlugin --version 1.0.1
NuGet\Install-Package SpeedyNtoNAssociatePlugin -Version 1.0.1
<PackageReference Include="SpeedyNtoNAssociatePlugin" Version="1.0.1" />
<PackageVersion Include="SpeedyNtoNAssociatePlugin" Version="1.0.1" />
<PackageReference Include="SpeedyNtoNAssociatePlugin" />
paket add SpeedyNtoNAssociatePlugin --version 1.0.1
#r "nuget: SpeedyNtoNAssociatePlugin, 1.0.1"
#:package SpeedyNtoNAssociatePlugin@1.0.1
#addin nuget:?package=SpeedyNtoNAssociatePlugin&version=1.0.1
#tool nuget:?package=SpeedyNtoNAssociatePlugin&version=1.0.1
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
- Build:
dotnet build --configuration Release - Deploy:
.\deploy.ps1 -Force
Usage
- Connect to your Dataverse environment in XrmToolBox
- Click Load Entities to populate entity dropdowns
- Select Entity 1 -- Entity 2 auto-filters to related entities
- Select the N:N relationship (auto-populated)
- 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"
- Configure settings (parallelism, retries, bypass plugins, logging)
- Click Associate
- 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
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- Microsoft.CrmSdk.CoreAssemblies (>= 9.0.2.59)
- Microsoft.CrmSdk.Deployment (>= 9.0.2.34)
- Microsoft.CrmSdk.XrmTooling.CoreAssembly (>= 9.1.1.65)
- Microsoft.Data.Sqlite (>= 9.0.4)
- MscrmTools.Xrm.Connection (>= 1.2025.7.63)
- System.Resources.Extensions (>= 4.7.1)
- XrmToolBoxPackage (>= 1.2025.7.71)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Extract parameter objects (AssociationRunOptions), error classifier, syntax highlighter, and shared result types for improved maintainability