Create a custom feature in D365 for finance and operations – D365 FnO

Custom feature is a new addition in dynamics 365 for finance and operation. Microsoft is releasing continuously new features for the users and you can find those in the feature management workspace. Some features are enabled by default and some left for the users either they want to enable or not. If you are using the same functionality then you can enable to use the enhancement released in the feature else leave those as disable.

If you want to create a new custom feature use the below code,

Copy the code in new class (rename labels and links), build the code

Open d365 Feature management workspace and click on check for updates

using System.ComponentModel.Composition;
using Microsoft.Dynamics.ApplicationPlatform.FeatureExposure;

/// <summary>
/// Custom feature development
/// </summary>
[ExportAttribute(identifierStr(Microsoft.Dynamics.ApplicationPlatform.FeatureExposure.IFeatureMetadata))]
internal final class CustomFeature implements IFeatureMetadata
{
    private static CustomFeature instance = new CustomFeature();

    private void new()
    {
    }

    [Hookable(false)]
    public static CustomFeature instance()
    {
        return CustomFeature::instance;
    }

    [Hookable(false)]
    public FeatureLabelId label()
    {
        return literalStr('Custom Feature');//("@Label:CustomFeature");
    }

    [Hookable(false)]
    public int module()
    {
        return FeatureModuleV0::SubscriptionBilling;
    }

    [Hookable(false)]
    public FeatureLabelId summary()
    {
        return strFmt('Customer Feature summary');//("@Label:CustomFeatureSummary");
    }

    [Hookable(false)]
    public WebSiteURL learnMoreUrl()
    {
        return "https://www.usdynamics365.com";
    }

    [Hookable(false)]
    public boolean isEnabledByDefault()
    {
        return false;
    }

    [Hookable(false)]
    public boolean canDisable()
    {
        return true;
    }

}

Leave a Reply

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.