Skip to content

19 Migration from PACX

RemyDuijkeren edited this page Nov 1, 2026 · 5 revisions

Migration from PACX (Greg.Xrm.Command)

This guide covers only where PACX and Flowline overlap: plugin push, web resource push, auth, and project setup. Keep using PACX for the rest.


What maps to what

PACX command Flowline equivalent
pacx auth create / pacx auth select pac auth create / pac auth select
pacx plugin push --path MyPlugin.dll flowline push plugins
pacx plugin step register ... (per step, manual) Automatic from [Step] attributes
pacx plugin step enable / disable flowline settings toggle <target> <step> --on / --off
pacx workflow activate / deactivate flowline settings toggle <target> <flow> --on / --off
pacx webresources push / pacx wr push flowline push webresources / flowline push wr
pacx webresources push --no-action flowline push --dry-run
pacx webresources init flowline clone / flowline init
pacx publish all Built into flowline push
pacx project init (.pacxproj) .flowline config file

Two-phase migration strategy

You can do it in one pass, but two phases change one thing at a time.

Phase 1, standalone (no project restructuring required)

Replace PACX for plugin registration, web resource sync, and type generation using standalone mode, with no .flowline and no restructuring. Run these from a folder that is not under a .flowline file.

# Plugins only
flowline push plugins --path ./bin/Release/MyPlugins.dll --solution-name MySolution --env https://your-org.crm4.dynamics.com

# Web resources only
flowline push webresources --path ./WebResources/dist --solution-name MySolution --env https://your-org.crm4.dynamics.com

# Type generation
flowline generate --solution-name MySolution --namespace MyNamespace --output ./Models --env https://your-org.crm4.dynamics.com

Run with --dry-run first to check the plan matches what PACX registered.

Phase 2, project structure (when you're ready)

Run flowline clone <solution-name> --env <url> to create the .flowline config and adopt the Flowline folder convention (Plugins/, WebResources/ at the project root). --env is required on this first run. After that, flowline push needs no flags.

Use clone, not init: your solution already exists in Dataverse.


Step 1: switch to PAC CLI auth

Flowline uses PAC CLI auth profiles instead of PACX's own.

# PACX — opens browser, stores encrypted connection string
pacx auth create --name prod --url https://contoso.crm4.dynamics.com
pacx auth select --index 1

# Flowline — same browser OAuth, handled by PAC CLI
pac auth create --environment https://contoso.crm4.dynamics.com

Run flowline status to confirm Flowline can reach the environment. For CI/CD:

# PACX (ClientSecret in connection string)
pacx auth create --name ci --url "AuthType=ClientSecret;Url=...;ClientId=...;ClientSecret=..."

# Flowline — via PAC CLI
pac auth create --kind ServicePrincipal --applicationId $CLIENT_ID --clientSecret $CLIENT_SECRET --tenant $TENANT_ID

Step 2: replace plugin push

Assembly push

# PACX — push DLL, then register each step manually
pacx plugin push --path ./bin/Release/MyPlugins.dll --solution MySolution
pacx plugin step register --class "MyPlugin.AccountPreUpdatePlugin" --message Update --table account --stage PreOperation --filteringAttributes "name,creditlimit"
pacx plugin step register --class "MyPlugin.AccountPostCreatePlugin" --message Create --table account --stage PostOperation

# Flowline — push DLL and auto-register all steps from attributes
flowline push plugins

The key difference: automatic vs manual step registration

Flowline registers steps from attributes instead of one plugin step register call per step. Add Flowline.Attributes to your Plugins project:

<PackageReference Include="Flowline.Attributes" Version="1.0.0" PrivateAssets="all" />

Then decorate your plugin classes:

// Before: no attributes, steps registered manually via pacx plugin step register

// After: Flowline reads these and registers in Dataverse automatically
[Step("account")]
[Filter("name", "creditlimit")]
[PreImage("name", "creditlimit")]
public class AccountPreUpdatePlugin : IPlugin
{
    public void Execute(IServiceProvider sp) { ... }
}

The class name encodes stage and message, so AccountPreUpdatePlugin maps to PreOperation + Update on account. See 05-Push-Plugins-and-Custom-APIs for the full naming reference and all supported attributes including [CustomApi], [Input], and [Output].

Standalone push (without a Flowline project)

Without a Flowline project, flowline push plugins --path runs standalone:

flowline push plugins --path ./bin/Release/MyPlugins.dll --solution-name MySolution --env https://contoso-dev.crm4.dynamics.com

Step 3: replace web resource push

# PACX
pacx webresources push --solution MySolution

# Flowline
flowline push webresources

Key differences

PACX Flowline
Orphan cleanup Additive only, so files removed locally stay in Dataverse Deletes orphans by default; --no-delete to suppress
Dry-run --no-action --dry-run
Single-file push --path scripts/myfile.js No equivalent, full dist/ folder only
External references .wr.pacx file with ExternalReferences // flowline:depends, see below
Folder scaffolding pacx webresources init flowline clone / flowline init

Folder convention

PACX expects a {publisherprefix}_/ folder at the root of your web resource project and uses that path directly as the Dataverse unique name. Flowline syncs WebResources/dist/ and by default prefixes the Dataverse name with {prefix}_{solutionname}/.

If a path inside dist/ already starts with {publisherprefix}_/, Flowline uses it as-is, so PACX's names carry over:

PACX:     new_/scripts/utils.js               →  new_/scripts/utils.js
Flowline: WebResources/dist/new_/scripts/utils.js  →  new_/scripts/utils.js  (no auto-prefix)
Flowline: WebResources/dist/scripts/utils.js       →  new_mysolution/scripts/utils.js  (auto-prefixed)

To keep existing Dataverse names unchanged during migration, mirror the PACX folder structure inside dist/: move files from new_/scripts/utils.js to WebResources/dist/new_/scripts/utils.js. Run flowline push --dry-run to confirm the names match before going live.

External references (.wr.pacx)

A file another solution owns isn't pushed from your solution. Declare it with // flowline:depends and keep it out of dist/. See 06-Push-WebResources#referencing-a-resource-another-solution-owns.

See 10-WebResources-Project for a full guide to the TypeScript setup, Rollup build pipeline, and folder structure.


Step 4: replace project setup

PACX uses .pacxproj to store per-project auth profile and default solution:

{
  "Version": "1.0",
  "AuthProfileName": "prod",
  "SolutionName": "MyCustomSolution"
}

Flowline uses .flowline to store environment URLs and solution config. Initialize it with:

# Existing solution: register PROD, then DEV
flowline clone MySolution --env https://contoso.crm4.dynamics.com
flowline clone MySolution --env https://contoso-dev.crm4.dynamics.com

# New solution — creates the publisher and solution in DEV, then scaffolds
flowline init MySolution --env https://contoso-dev.crm4.dynamics.com --publisher-prefix cs

This creates .flowline, the solution folder, and the Plugins and WebResources projects.


What PACX does that Flowline doesn't

These commands have no Flowline equivalent, so keep using PACX for them:

PACX command What it does
pacx webresources applyIcons Auto-assign SVG icons to custom tables
pacx table, pacx column, pacx rel Schema management
pacx view, pacx forms UI component management
pacx solution component Solution component management
pacx script Generate PowerShell metadata scripts

Clone this wiki locally