0

The FeatureManagement Class methods include the word package e.g.:

checkPackageBooleanValue(String apiName);

and the apiName passed in doesn't have any namespace in the documentation examples. So presumably the package is identified automatically inside the methods.

I can think of two ways that that could be designed:

  1. It's the package that the request/transaction started in.
  2. It's the package of the code that calls the method.

Most of the time these would be the same, but I'd like to put this code in a base package that several other packages depend upon, and if 2 is how it works, I can't do that in a simple way.

So is it 1 or 2 or something else?

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.checkPackageBooleanValue('testnamespace__parametername'));

Hope this helps

  • Hi Shamina, Looks promising - thanks it does help! Will wait for a bit and see if anyone has a working example; been burned quite a few times by namespace related details... – Keith C Apr 25 '20 at 14:43
  • Hello Keith. Sure, no problem – Shamina Apr 25 '20 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.