Check if feature is enabled
Features can be difficult to check if is enabled. Some have helper classes, some do not, some are even final and private, so how do you check if a feature is on. Just by coincidence we got a custom hotfix, only code, related to a performance issue with Retail. In that code we got a way to check features. private boolean shouldUseRetailPricingDataManagerV3() { RetailPricingSharedParameters parameters = RetailPricingSharedParameters::find(); FeatureManagementState state; FeatureManagementMetadata featureData; select firstonly IsEnabled, RecId from state join featureData where state.RecId == featureData.FeatureState && state.Name == 'Dynamics.AX.Application. Retail Discount PerformanceImprovementFeature '; return (state.RecId == 0 ||state.IsEnabled == NoYes::Yes) && !Global::isFlightEnabled(' RetailPricingStopFlattenDiscountFeatures ') && !pa