Repository navigation
17 Migration from Daxif
This guide moves a Daxif project to Flowline. Flowline covers the same core operations (plugin registration, web resource sync, solution pack/import, early-bound types) as a CLI, with no F# scripts.
| Daxif | Flowline |
|---|---|
Plugin.Sync(env, dll, "", solution) |
flowline push plugins |
WebResource.Sync(env, folder, solution) |
flowline push webresources |
| Plugin + web resource sync | flowline push |
Solution.Export(env, solution, outDir) |
flowline pull |
Solution.Import(env, zipPath) |
flowline deploy test / flowline deploy prod
|
Solution.UpdateVersionNumber(...) |
Built into flowline pull --bump
|
Solution.Extract(...) |
Built into flowline clone / flowline pull
|
Solution.Pack(...) |
Built into flowline deploy
|
Solution.GenerateCSharpContext(...) |
flowline generate --generator xrmcontext3 |
Info.RetrieveVersion(env) |
flowline status |
_Config.fsx environment definitions |
.flowline config file |
| Windows Credential Manager / OAuth config | pac auth create |
ExtendedSolution (pre/post import) |
Pre-import orphan cleanup built into flowline deploy (automatic). See Extended Solution
|
- Install PAC CLI:
dotnet tool install --global Microsoft.PowerApps.CLI.Tool - Install Flowline:
dotnet tool install --global Flowline - Authenticate:
pac auth create --environment https://your-org.crm4.dynamics.com - Verify:
flowline status
You can do it in one pass, but two phases change one thing at a time.
Phase 1, standalone (no project restructuring required)
Replace Daxif 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.comRun with --dry-run first to check the plan matches what Daxif 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, with no wrapper folder). --env is required on this first run. After that, flowline push needs no flags.
Use clone, not init: your solution already exists in Dataverse.
This is the biggest task. Daxif declares steps in the constructor of its Plugin base class. Flowline
uses attributes on any class that implements IPlugin, directly or through your own base class.
// Daxif — Plugin base class + fluent API in constructor
public class MyAccountPlugin : Plugin
{
public MyAccountPlugin()
{
RegisterPluginStep<Account>(EventOperation.Update, ExecutionStage.PostOperation, Execute)
.SetExecutionMode(ExecutionMode.Asynchronous)
.AddFilteredAttributes(x => x.Address1_City, x => x.Address1_Country)
.AddImage(ImageType.PreImage, x => x.Address1_Country);
}
private void Execute(LocalPluginContext ctx) { ... }
}
// Flowline — attributes on any class that implements IPlugin (directly or via a base class)
[Step("account")]
[Filter("address1_city", "address1_country")]
[PreImage("address1_country")]
public class AccountPostUpdateAsyncPlugin : IPlugin
{
public void Execute(IServiceProvider sp) { ... }
}| Daxif fluent API | Flowline equivalent |
|---|---|
RegisterPluginStep<Account>(...) |
[Step("account")] |
EventOperation.Update |
Class name: ...Update...
|
ExecutionStage.PreValidation |
Class name: ...Validation...
|
ExecutionStage.PreOperation |
Class name: ...Pre...
|
ExecutionStage.PostOperation |
Class name: ...Post...
|
SetExecutionMode(Asynchronous) |
Class name: ...Async... suffix |
AddFilteredAttributes(x => x.Field) |
[Filter("field")] |
AddImage(ImageType.PreImage, x => x.Field) |
[PreImage("field")] |
AddImage(ImageType.PostImage, x => x.Field) |
[PostImage("field")] |
SetExecutionOrder(1) |
[Step(..., Order = 1)] |
SetImpersonatingUser(guid) |
[Step(..., RunAs = "guid")] |
SetDeployment(ServerOnly) |
Not needed. Flowline targets online only |
SetDescription(...) |
Not mapped |
Stage and message come from the class name. See 05-Push-Plugins-and-Custom-APIs for the full naming reference.
| Daxif stage + message | Flowline class name |
|---|---|
PostOperation + Update + async |
AccountPostUpdateAsyncPlugin |
PreOperation + Update
|
AccountPreUpdatePlugin |
PostOperation + Create
|
AccountPostCreatePlugin |
PreValidation + Delete
|
ContactValidationDeletePlugin |
Can't rename the class? Use [Handles] to declare stage and message explicitly. The class name is then irrelevant:
[Step("account")]
[Handles(Message.Update, Stage.PreOperation)]
public class AccountPlugin : IPlugin { ... }Daxif's fluent API lets one constructor register multiple steps from one class:
// Daxif — two registrations from one class
public class AccountPlugin : Plugin
{
public AccountPlugin()
{
RegisterPluginStep<Account>(EventOperation.Create, ExecutionStage.Post, Execute);
RegisterPluginStep<Account>(EventOperation.Update, ExecutionStage.Post, Execute)
.AddFilteredAttributes(x => x.Name, x => x.CreditLimit);
}
private void Execute(LocalPluginContext ctx) { ... }
}Flowline's convention requires one class per step. During migration, stack [Handles] to register multiple steps without restructuring:
// Flowline — temporary multi-step form using stacked [Handles]
[Step("account")]
[Filter("name", "creditlimit")]
[Handles(Message.Create, Stage.PostOperation)]
[Handles(Message.Update, Stage.PostOperation)]
public class AccountPlugin : IPlugin { ... }Flowline emits a warning (once per class) on every push nudging you to split into named subclasses. The long-term form:
[Step("account")]
public class AccountPostCreatePlugin : IPlugin { ... }
[Step("account")]
[Filter("name", "creditlimit")]
public class AccountPostUpdatePlugin : IPlugin { ... }Splitting warning: splitting the class renames the Dataverse steps. The next flowline push deletes the old steps and creates new ones. Plan the split for a maintenance window to avoid step downtime.
Daxif uses a CustomAPI base class. Flowline uses attributes:
// Daxif
public class GetAccountRiskApi : CustomAPI
{
public GetAccountRiskApi()
: base(typeof(GetAccountRiskApi))
{
RegisterCustomAPI("GetAccountRiskApi", CalculateRisk)
.EnableCustomization()
.AddRequestParameter(new CustomAPIConfig.CustomAPIRequestParameter(
"accountId", RequestParameterType.EntityReference, "account"))
.AddResponseProperty(new CustomAPIConfig.CustomAPIResponseProperty(
"riskScore", RequestParameterType.Integer));
}
protected void CalculateRisk(LocalPluginContext localContext)
{
var pluginContext = localContext.PluginExecutionContext;
var accountRef = (EntityReference)pluginContext.InputParameters["accountId"];
// ... calculate risk ...
pluginContext.OutputParameters["riskScore"] = 42;
}
}
// Flowline
[CustomApi]
[Input("accountId", FieldType.EntityReference, Table = "account")]
[Output("riskScore", FieldType.Integer)]
public class GetAccountRiskApi : IPlugin
{
public void Execute(IServiceProvider sp) { ... }
}If a Custom API is already live under a name that doesn't match what Flowline's class-name convention would derive, use UniqueName to pin the exact same value, and the existing record is updated in place:
// Live Custom API is "dev1_ApproveOrder", but the class doesn't derive to that name
[CustomApi(UniqueName = "dev1_ApproveOrder")]
public class LegacyOrderApprovalPlugin : IPlugin { ... }See 05-Push-Plugins-and-Custom-APIs#custom-apis for the full attribute reference.
Add to your Plugins project:
<PackageReference Include="Flowline.Attributes" Version="1.0.0" PrivateAssets="all" />Remove the Daxif NuGet package from your project once all registrations are converted.
Daxif ignores IPlugin classes that don't inherit from its Plugin base class. Flowline picks them up.
Check the first flowline push --dry-run for registrations you didn't expect.
The naming convention is the same in both tools:
{publisher_prefix}_{solution_name}/{relative_path}
Example: dg_MySolution/js/utils.js
The difference is where files live on disk. Daxif scans a folder that already contains the full
prefixed path. Flowline scans WebResources/dist/ and prepends the prefix and solution name:
Daxif: webResources/dg_MySolution/js/utils.js → dg_MySolution/js/utils.js
Flowline: WebResources/dist/js/utils.js → dg_mysolution/js/utils.js
Move your web resource files from the Daxif folder into WebResources/dist/, dropping the
{prefix}_{solution}/ prefix from the path:
Before: webResources/dg_MySolution/js/utils.js
After: WebResources/dist/js/utils.js
Flowline derives the Dataverse name automatically from .flowline. Run flowline push webresources --dry-run
to confirm the names match before going live.
Note on case: Daxif preserves the exact folder name as the unique name prefix. Flowline lowercases the solution name. If your existing Dataverse records use mixed case (e.g.
dg_MySolution/...) and Flowline generatesdg_mysolution/..., treat this as a rename: the old records keep their old names and no longer match anything indist/. See 06-Push-WebResources#push for how push syncsdist/to Dataverse.
See 10-WebResources-Project for a full guide to the TypeScript setup, Rollup build pipeline, and folder structure.
Daxif uses XrmContext for C# generation:
// Daxif — F# script
Solution.GenerateCSharpContext(Env.dev, pathToXrmContext, outputDir,
solutions = ["MySolution"],
entities = ["account"; "contact"])Flowline:
flowline generate --namespace MySolution.Models --extra-tables account,contactGenerated types land in Plugins/Models/. The namespace and extra tables are saved to .flowline.
To keep XrmContext's output style, use --generator xrmcontext3 (or xrmcontext).
// Daxif — export + unpack
Solution.UpdateVersionNumber(Env.dev, solution, VersionIncrement.Revision)
Solution.Export(Env.dev, solution, outputDir, managed = false)
Solution.Extract(Path.Daxif.unmanagedSolution, customizationsFolder, xmlMappingFile, projFile)
// Flowline — one command
flowline pull --bump patch// Daxif
Solution.Pack(outputPath, customizationsFolder, xmlMappingFile, managed = false)
Solution.Import(Env.test, pathToSolutionZip, activatePluginSteps = true, publishAfterImport = true)
// Flowline
flowline deploy test
flowline deploy prodDaxif stores credentials in a local .daxif file or Windows Credential Manager and requires F# config:
// Daxif — _Config.fsx
let creds = Credentials.FromKey("UserCreds")
let dev = Environment.Create(
name = "Development",
url = "https://mydev.crm4.dynamics.com/XRMServices/2011/Organization.svc",
ap = AuthenticationProviderType.OnlineFederation,
creds = creds,
method = ConnectionType.OAuth)Flowline reuses the PAC CLI token cache:
# Interactive / MFA
pac auth create --environment https://mydev.crm4.dynamics.com
# CI/CD — service principal
pac auth create --kind ServicePrincipal --applicationId $CLIENT_ID --clientSecret $CLIENT_SECRET --tenant $TENANT_IDRun flowline status to verify the active auth profile.
Daxif operations are invoked by executing .fsx scripts:
fsi.exe PluginSyncDev.fsx
fsi.exe WebResourceSyncDev.fsx
fsi.exe SolutionExportDev.fsxReplace with Flowline CLI calls:
| Daxif script | Flowline command |
|---|---|
PluginSyncDev.fsx |
flowline push plugins |
WorkflowSyncDev.fsx |
flowline push plugins (workflow activities in same assembly) |
WebResourceSyncDev.fsx |
flowline push webresources |
SolutionExportDev.fsx |
flowline pull |
SolutionImportArg.fsx |
flowline deploy <target> |
SolutionExtract.fsx |
flowline clone (first time) / flowline pull
|
SolutionPack.fsx |
Built into flowline deploy
|
GenerateCSharpContext.fsx |
flowline generate |
SolutionCreateDev.fsx |
flowline init |
Daxif's Extended Solution wraps solution import in pre-import orphan cleanup, the import, and post-import state restoration.
| Extended Solution phase | Flowline equivalent |
|---|---|
| PreImport, deleting plugin steps, assemblies and web resources removed from source | Built into flowline deploy. Web resources need --force delete-orphans. Pass --no-delete to only report. See 08-Deploy#orphan-cleanup. |
PostImport, restoring workflow statecode/statuscode
|
flowline settings apply <target> after deploy. See 09-Settings
|
| PostImport, reassigning workflow owners across environments | Not planned |
Daxif has a full data migration module (Data.Export, Data.Import) with GUID remapping, owner
reassignment, delta export, and N:N association import. Flowline has no equivalent. Use the Configuration Migration Tool or dataverse-utils for data migration.
Daxif supports enabling or disabling individual plugin steps without a full sync:
Plugin.EnableSolutionPluginSteps(env, solution, enable = false)Use flowline settings toggle, or list the step in the settings file's PluginSteps section so every
settings apply applies it. See 09-Settings.
flowline settings toggle test "Contoso.Plugins.OnCreate: Create of account" --offflowline generate produces C# only. Keep using XrmDefinitelyTyped for TypeScript.