Skip to main content

Easily activate features for model-driven apps with the new Settings solution component (Public preview)

Headshot of article author Anees Ansari

We are excited to announce public preview of a new solution component named Settings. Using settings, application authors can, with just a few clicks, activate or configure features for a model-driven app. This allows them to easily and quickly provide a customized experience for end-users. These settings can be created by application authors, administrators, or partners.

For example, you can now activate the Async on load handler and Async save handler features for model-driven apps with just a few clicks using settings that were created by the Power Apps team.

Enabling features using settings in app designer

Enabling features using settings in app designer

Challenges

In the past, it was not possible for application authors to enable or disable features for a single model-driven app, limiting customizability.

Similarly, new or preview features for model-driven apps, could only be enabled for the entire environment and applied to all apps in that environment. This forced customers to create and maintain dedicated preview environments to limit impact.

The feature previews were also opt-in only with no easy way to disable or opt-out.

Settings to the rescue!

Using the settings solution component, application authors can now, with just a few clicks, enable or disable or configure features for a single model-driven app. This enables them to deliver a customized experience with each app by enabling only the features needed by the app while disabling others.

Customers also no longer need to create and maintain dedicated preview environments. They can safely try new or preview features with a single model-driven app in an environment without any impact to other apps.

And finally, using settings customers can themselves enable or disable a feature at any time.

How settings work

Settings are made up of three sub-components

    1. Setting definition – Application authors, administrators, or partners can create a setting definition that includes properties such as name, description, data type and default value. They can then, via code, use the setting’s value to enable or disable or configure a feature they are delivering. They can include the setting definition in the same solution that is used to deliver the feature to their customers.
    2. Setting environment value – Customers using the feature can import a solution, that includes the feature and the corresponding setting definition, to their environment. Environment administrators in a customer’s organization can add a setting environment value for an environment they manage. The setting environment value will override the default value and will apply to all apps in the environment.
    3. Setting app value – Application authors in a customer’s organization can add a setting app value for an app they are authoring. The setting app value will override the default value and the setting environment value (if one exists). The setting app value will apply to only that specific app.

How the Dynamics 365 Sales team uses settings

The Dynamics 365 Sales team uses settings to empower their customers to easily enable a preview of the new  Deal manager  feature.

Dynamics 365 Sales - Deal Manager Workspace

Dynamics 365 Sales – Deal Manager Workspace

For their feature, they added a new sitemap subarea named Deal manager (preview) in the Sales Hub app. They next created a new setting definition and used its value to show or hide this sitemap subarea via code. They set the default value of the setting to hide the subarea, and therefore the feature, by default.

The Dynamics 365 Sales team also created a custom user interface for their customers to enable or disable the Deal manager (preview) with just one click. Under the hood, this interface calls APIs to add or update a setting app value that overrides the setting’s default value and causes the sitemap subarea, and therefore the feature, to be displayed or hidden.

Enabling and disabling Deal manager (preview) using settings

Enabling and disabling Deal manager (preview) using settings

Using settings, the Dynamics 365 Sales team was able to provide an easy, self-serve way for their customers to enable or disable the Deal manager (preview).

Settings enabled our team to rollout Deal manager preview features to all organizations seamlessly and offers a configurable, ALM-aware way to opt-in for the preview.“, said Ahmed Zakaria, Principal Group Engineering Manager – Dynamics 365 Sales.

Getting started

Creating a setting

If you wish to deliver add-on features built on the platform to others and have those be enabled or configured via settings, start by creating a setting definition using the solution explorer.

  1. Sign in to Power Apps.
  2. In the navigation pane, select Solutions.
  3. From the list of solutions, open the solution you want to add the setting to.
  4. In the command bar, select New > More > Setting > Setting definition.
  5. In the New setting dialog, provide values for each of the properties based on your requirements. For detailed information on setting definition properties please refer to: Setting definition
  6. When you are done providing values for the properties, select Save.

Creating a setting definition using the solution explorer

Creating a setting definition using the solution explorer

Additionally, you can also consider creating a custom user interface to add or update a setting value like the Dynamics 365 Sales team did. Consumers of your feature can use it to add or update a setting app value or a setting environment value to enable or disable or configure your feature.

Remember to include your setting definition and any custom user interface in the solution that has the feature that you provide to your customers.

Adding a setting environment value

As a consumer of a feature that is controlled by a setting, an environment administrator can use the solution explorer to add a setting environment value.

  1. Sign in to Power Apps.
  2. In the navigation pane, select Solutions.
  3. From the list of solutions, open the solution you want to add the setting environment value to.
  4. If the setting definition is available in the solution:
    1. Select the setting definition.
    2. In the Edit setting value dialog, in the Setting environment value section, select New value.
    3. Provide the value, and then select Save.
  5. If the setting definition is not available in the solution:
    1. On the command bar, select New > More > Setting > Setting environment value.
    2. Select the setting you want to add the setting environment value for, and then select Add.
    3. In the New setting environment value dialog, in the Setting environment value section, select New value.
    4. Provide the value, and then select Save.

Adding a setting environment value using the solution explorer

Adding a setting environment value using the solution explorer

Adding a setting app value

As a consumer of a feature that is controlled by a setting, an application author can add a setting app value using one of the following ways.

Adding or updating a setting app value using the app designer

For now, only settings created by Power Apps are made available in the app designer.

  1. Open the app you want to add the setting app value for in the app designer.
  2. On the command bar, select Settings.
  3. In the Settings dialog, select the Features or Upcoming tab.
  4. The Features tab displays all settings that have release level set to Generally available. The Upcoming tab displays all settings that have release level set to Preview.
  5. Add or update an app value for the setting you want.
  6. Save and publish the app.

Adding a setting app value using the app designer

Adding a setting app value using the app designer

Adding or updating a setting app value using the solution explorer

  1. Sign in to Power Apps.
  2. In the navigation pane, select Solutions.
  3. From the list of solutions, open the solution you want to add the setting app value to.
  4. If the setting definition or setting environment value is not available in the solution, add one of them. See Adding an existing setting definition or Adding an existing setting environment value.
  5. Select the setting definition or setting environment value.
  6. In the Edit setting value dialog, in the Setting app values section, find the app that you want to add the setting app value for. Note that using the solution explorer you can only add setting app values for apps that are in the current solution.
  7. Provide the value and select Save.
  8. For the setting app value to take effect you will have to re-publish the app using the app designer or solution explorer.

Adding a setting app value using the solution explorer

Adding a setting app value using the solution explorer

Adding or updating a setting app value using custom user interface

If the creator of the setting has provided a custom user interface, like the Dynamics 365 Sales team did for the Deal manager (preview) feature. You can use it to add or update the setting app value.

Try settings today

We hope you are as excited as we are about the new settings solution component. For additional information please refer to our documentation here: Use settings to provide customized app experiences.

Try settings today and let us know your feedback in the community: Settings solution component (Public preview) feedback.

Please note: The feature has started rolling out, but it may take until the end of next week for it to be available in some regions.