Hot answers tagged

6

Feature Parameters are defined as XML in your source of truth. They will exist in your scratch org if you push them in as metadata. They can be tested, though the actual feature parameter value is not transmitted to the LMO in the test. We built a simple framework for these that we can use for testing though. We only develop in scratch orgs and only push up ...


5

In salesforce, access is controlled through Permission sets. LMO org can assign how many feature-specific licenses are assigned using an FMA Integer parameter, Currently there is no standard way to limit license specific permission set assignments here is the approach I would take to breeze this gap Create an Integer FMA parameter and permission ...


5

To develop and test Feature Parameters with Managed 2GP (Second-Generation Managed Packages), you must work directly with the Feature Parameter metadata. FeatureParameterBoolean FeatureParameterDate FeatureParameterInteger With that in mind, here are the answers to your specific questions. How do I test FMA parameters? This depends on whether you’re ...


4

You've got your boolean operations incorrect. You only need OR (|), AND (&), BINARY NOT (~), XOR (^), and BITSHIFT (<<) to make this happen. Here's a example class for you. public class Features { public enum FEATURE { OPTION1, OPTION2, OPTION3 } public static Integer flags = FeatureManagement.checkPackageIntegerValue('Flags__c'); ...


3

1.Max. 25 Parameter / package: What if I have close to 100 features i want to activate more fine grained? You can leverage integer type feature flag to get around the limits easily. for examplesay, 000 - feature x, 001 - feature y, 010 - feature z and so on. With integer type there is really no limit. 2.When do I use FMA Parameters and when Custom ...


2

The Winter 19 - Namespace restrictions for FeatureManagement Apex methods known issue, talks about a past issue with accessing feature parameters with/without specific namespace and the issue has been solved since then. So it seems that you should be able to access the package namespace in the parameter name. System.FeatureManagement....


1

I think the issue here boils down to inconsistent handling of arguments. In bitmask(), you're subtracting 1 from the passed featureIndex. You're also subtracting 1 from featureIndex in isEnabled() (when you call bitmask()). So when isEnabled() is called with a featureIndex of 3, things proceed as follows isEnabled(5, 3) bitmask(2) Math.pow(2, 2-1) bitmask ...


1

To get this out of the way, this question is very broad, and it's unlikely I or anyone else can fully address it in the scope of a single answer. Further, the "right" solution is most certainly product-specific, and many different choices in product architecture may influence the final design decisions. With that said, here are my thoughts. ...


1

To add to this, I would also suggest just creating the Feature Parameter definition in the packaging org as you want it to be included in package, and then keeping them out of the code in the namespace folder, and instead store them with the unpackaged code that gets pushed to scratch org. That way, you can set the feature param for that scratch org in the ...


1

I'd like to know how to do this too - see How to use the Feature Management App (FMA) to grant access for a defined number of users? What I plan to do if nothing better comes up, is have a protected list custom setting holding the User Id as a text string plus the feature name as a text string. The presence of a record means access is granted and the lack ...


1

In Apex code, you can update data in customer object directly. There are three objects available in LMO: sfFma__FeatureParameterBoolean__c, sfFma__FeatureParameterDate__c, sfFma__FeatureParameterInteger__c SOQL to see data. SELECT sfFma__FeatureParameter__r.sfFma__fullname__c, sfFma__License__c, sfFma__Value__c, Id FROM sfFma__FeatureParameterBoolean__c


Only top voted, non community-wiki answers of a minimum length are eligible