Create a new Feature in Dynamics 365 F&O

Feature management is a Dynamics 365 Finance and Operations built in dashboard to help system administrators and IT professionals manage, schedule, and view all features available to them given the configurations keys that are enabled in the system.

Microsoft has a regular release cadence for Dynamics 365, with software updates released almost every month. With each new release, new features are added to Dynamics 365. One such new feature has to do with how to manage the other features in D365 — the Feature Management workspace.

There is detailed explanation available on Microsoft Docs. Here is the link.

This Topics describes how you can create a new feature in Microsoft Dynamics 365 F&O.

We need to define few attribute above the class declaration.

using System.ComponentModel.Composition;
using IFeatureLifecycle = Microsoft.Dynamics.ApplicationPlatform.FeatureExposure.IFeatureLifecycle;
using IFeatureMetadata = Microsoft.Dynamics.ApplicationPlatform.FeatureExposure.IFeatureMetadata;
using FeatureLifecycleStage = Microsoft.Dynamics.ApplicationPlatform.FeatureExposure.FeatureLifecycleStage;
using PlatformStateProvider = Microsoft.Dynamics.ApplicationPlatform.FeatureExposure.FeatureStateProvider;

Declare the class as internal

internal class DemoFeature implements IFeatureLifecycle, IFeatureMetadata

Now below code should be written inside the class.

private static DemoFeature instance = new DemoFeature();

public static DemoFeature instance()
    return instance;

Define the label for your Feature

    public LabelId label()
        return literalStr("Demo Feature);

Define the module

    public int module()
        return FeatureModuleV0::HRM;

Define the Description or Summary for your label

    public LabelId summary()
        return literalStr("This feature is created for Demo Purpose");

Display the URL for users/customer to navigate or you can make it empty.

    public WebSiteURL learnMoreUrl()
        return "";    

Enable the feature by default.

    public boolean isEnabledByDefault()
        return false;

Make feature disable by user/customer

    public boolean canDisable()
        return true;

Change Feature Stage to released.

public FeatureLifecycleStage FeatureStage()
        return FeatureLifecycleStage::Released;

Additionally, you can write more methods whether your feature is depends on other feature or all feature.

Once the class is build and compile then you can New feature is available under Feature Management.

If it is not enabled then click on get updates.

How to check whether the feature is enabled in code?

Use the isFeatureEnabled method on the FeatureStateProvider class, passing it an instance of the feature class. Example:

if (FeatureStateProvider::isFeatureEnabled(BatchContentionPreventionFeature::instance()))

In this way, We can control the functionality based on feature.

If you need source code then contact me.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at

Up ↑

%d bloggers like this: