Skip to content

09 Settings

RemyDuijkeren edited this page Oct 31, 2026 · 2 revisions

Settings

flowline settings sets what a solution import doesn't carry: environment variable values, connection reference bindings, and whether flows, workflows, business rules, business process flows, actions, plugin steps, main forms and public views are on or off. Run it after a deploy to finish the job.

flowline settings capture test          # write the settings file from an environment
flowline settings apply test            # apply it

The target is prod, uat, test, dev, or a full URL, and it comes first. Every operation takes -n|--solution-name and --dry-run. Exit codes are in 04-Command-Reference#settings.

The settings file

Flowline uses Solution/deploymentSettings.<role>.json next to your .cdsproj, and falls back to Solution/deploymentSettings.json when there's no file for that role. Commit it.

It's the file pac solution create-settings produces, plus sections for component state. Those are plain name-to-true/false maps:

{
  "EnvironmentVariables": [
    { "SchemaName": "cr123_ApiUrl", "Value": "https://api.contoso.com" }
  ],
  "ConnectionReferences": [
    { "LogicalName": "cr123_dataverse", "ConnectionId": "shared-commondataser-863397d0" }
  ],
  "CloudFlows": {
    "Nightly reconciliation": false
  },
  "PluginSteps": {
    "Contoso.Plugins.OnCreate: Create of account": false
  }
}

The state sections are CloudFlows, Workflows, BusinessRules, BusinessProcessFlows, Actions, PluginSteps, Forms and Views. Only what the file names is touched; everything else keeps its current state. An empty Value or ConnectionId is skipped.

Warning

Keep connection ids and environment-specific values out of the shared deploymentSettings.json. Every environment reads it, so one environment's values end up in another.

Applying the file

flowline settings apply test
flowline settings apply prod --dry-run

--settings-file <path> applies another file instead of the role-named one.

Running it twice changes nothing the second time, so it's safe in every pipeline run.

Writing the file

settings capture writes the file from an environment. Use it to create the first file and to pick up new components.

flowline settings capture test
flowline settings capture
Option Description
--from <zip-or-folder> Read the solution's components from this zip or unpacked folder
--settings-file <path> Write this file instead of the role-named one

It merges into the existing file: your values stay, new components are added, and removed ones are reported but kept. Only components that are currently off are written, since a deploy turns the rest on anyway. Forms and views are never captured; add them with toggle.

Omit the target to capture several environments at once, one file each. At a terminal it then offers to fill in missing variable values and connection bindings.

Warning

Secrets are never read. A secret environment variable gets <set-this-secret> in the file. Fill it in yourself, and don't commit it. Key Vault references are captured as-is.

Changing one component

Turn a flow on at go-live or off during an incident without editing the file:

flowline settings toggle prod "Nightly reconciliation" --off
flowline settings toggle test "Nightly reconciliation"        # read the state
flowline settings set test cr123_dataverse --value shared-commondataser-863397d0
Option Description
--type <type> Narrow to one kind. toggle: flow, workflow, rule, bpf, action, plugin, form, view. set: envvar, connref
--on / --off On toggle. Give one
--value <value> On set. The value, or the connection id to bind

Leave out --on/--off or --value and it shows the current state, then asks what it should be. Leave out the name too and you pick from a list; type off, rule or part of a name to filter it. On a connection reference you pick from the environment's connections. In a non-interactive run a read only prints, and a write without a name stops with exit 15 and prints your command with <name> to fill in.

The list leaves out forms and views unless you pass --type form or --type view.

This changes the environment, not the file, so the next settings apply would undo it. At a terminal the run offers to update the file to match.

Forms and views

Use these to switch a release on: deploy the new form or view inactive, then turn it on and the old one off when you go live. Address them as table.name:

flowline settings toggle prod "account.Account v2" --on
flowline settings toggle prod "account.Account" --off
  • Main forms only.
  • A table needs at least one active main form, so turn the new one on before the old one off.
  • A default view can't be turned off. Make another view the default first.
  • After a form change Flowline publishes the table, which also publishes any other pending changes on it.

Naming components

Component Name to use
Environment variable Schema name
Connection reference Logical name
Business process flow Display name
Business rule, form, view table.name
Everything else The name settings capture writes

When a name matches more than one component, the run stops and lists them. Pass --type, or rename one.

Standalone

Outside a Flowline project, use a URL and pass --solution-name. With --from, the solution name comes from the zip or folder.

flowline settings apply https://contoso-test.crm4.dynamics.com/ --solution-name ContosoCustomizations
flowline settings capture https://contoso-test.crm4.dynamics.com/ --from ContosoCustomizations.zip

Clone this wiki locally