59
When a new feature is added it can sometimes impact customizations in different ways. Sometimes partners and others have a need to check if the feature is enabled or not to be able to take the feature into consideration when creating code, but today there is no general way or a framework for this. The FeatureStateProvider class is marked internal, thus making it impossible for us to use. Sometimes there are public methods accessible for the feature, but as a general rule there is not.

Example:
Check if feature "Set project sales price for project purchase requisition from purchase price" is enabled from code.
The class ProjSetPurchReqProjSalesPriceFromPurchPrice that defines this feature is declared internal, so we can not use FeatureStateProvider::isFeatureEnabled(ProjSetPurchReqProjSalesPriceFromPurchPrice::instance()); as standard code does. FeatureStateProvider is marked with InternalUseOnlyAttribute

Some features has a "featureHelper" class (e.g. ProjMultipleContractLinesForProjectFeatureHelper ) which is public and can be used.
Only option is to create an extension request to Microsoft, but that is time-consuming and counter-productive both for Microsoft and us. Usually a couple of weeks with back and forth to explain the issue and then wait for fix if the request is approved.
Therefor we need a general “framework” to check if a feature is enabled or not. All existing and future features should be available to check. We do not need to be able to enable/disable features, just check if the feature is enabled.

See also: https://www.yammer.com/dynamicsaxfeedbackprograms/threads/717005066723328
Category: Development
STATUS DETAILS
Needs Votes

Comments

K

This is a simple code upgrade and should be developed. As more and more features are added we should be able to check them.

Category: Development