31

As of the Winter 18 Release, we can now use the FeatureManagement class for this requirement. The above method can be removed entirely and I can simply call: Boolean hasPermission = FeatureManagement.checkPermission('CanPerformSomeOperation'); Thanks to @sfdcfox for pointing this one out.


7

Update (25 Oct 2020): With Winter'21 release, enabling org shape has been released to all environments. Although still in beta, it facilitates experimentation with org shape creation and easier scratch org creation as needed. At the moment, I'm not aware of any tool available for free to help you draft the scratch org definition file. You may want to check ...


7

Adrian Larson's answer of using FeatureManagement's static Boolean checkPermission(String customPermissionDeveloperName) will Efficiently Check if the Running User has a Custom Permission. Testing Apex when using FeatureManagement's static Boolean checkPermission(String customPermissionDeveloperName) isn't so simple. Often, using Custom Permissions will ...


6

I'm going to have to answer the questions out of order for them to make sense, and much of this is anecdotal at this point, but we've been doing this for a couple of years now, so I hope that this answer will be useful. Is the recommended approach documented anywhere? There are several competing theories on which way is the "best," and it's not related ...


5

WDC stands for "work dot com" (work.com)--similar to how KFC used to mean "Kentucky Fried Chicken" before they rebranded--which occurred as a result of a rebranding (see this): NOTE On May 1, 2020, we rebranded this suite. It's now called WDC. If you're looking for information about our Work.com solution in response to the COVID-19 ...


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

There are numerous strategies for doing so (So, there is no 1 good answer), however, here are a few resources that can help answers some if not all those questions based on your needs: GitFlow Examples These examples are using the default configuration with GitVersion. Which is continuous deployment mode for develop and continuous delivery mode for all ...


4

Managing and maintaining individual sandboxes and keeping them in sync with each other is a big task Stop using Sandboxes. Salesforce DX makes it trivial to spin up a new org as frequently as you need to in order to keep your source in sync with development, no matter how many developers are in play. With the ability to push all the metadata and even upload ...


3

Please, never use extension packages for features. Features are related to pricing, pricing is related to marketing and sales. And by putting features in extension packages, you are roping your sales and marketing to your app's architecture. It's a recipe for future disasters, even if it seems like a great idea now. Just like getting a tattoo of your ...


3

In the demo project, they include instructions for how to set the values both for testing in real mode and in unit test mode. I suspect that the answer you're really looking for is to set the preferred flag in your unit test: // enable the param so we can continue our testing FeatureManagement.setPackageBooleanValue('ExpenseTrackingPermitted',true); This ...


2

Our currently workflow: git checkout -b feature/sales-api git commit add . git commit -am "" git fetch origin git rebase origin master Once is done, rebase your branch to get the newest version of master, then: sfdx package:version:create.... Actually we have more than one package in a project. Particularly, I don't like this approach, because if I have ...


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

The line "definitionFile": "config/project-scratch-def.json", should be included in the sfdx-project.json file as following { "packageDirectories": [ { "path": "force-app", "default": true, "package": "Baseline", "...


1

There are two possible causes of this error. You reference this in the code but didn't include the Feature Parameter in the package version. You reference this in the org where you develop the package To resolve the error for the first case, the referenced feature parameter should be added to package version and new package version should be uploaded and ...


1

You have to create them in your metadata. FeatureParameterBoolean, FeatureParameterDate, and FeatureParameterInteger are the relevant file types, which you can include just like you would any other type of metadata that's supported. You can also view the Metadata Coverage Report for more information.


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

It sounds like you need to contact Partner Support. Try emailing them at partnersupport@salesforce.com. In the future, you shouldn't change that setting from protected to public, even as a joke, because it is no laughing matter. force:source:convert and force:mdapi:convert were meant as convenience tools for a one-time migration, and definitely should not ...


1

Yes. In Lightning Communities you can assign audiences to most Lightning Components as follows: Select the component 1) Click the drop down arrow in the upper left 2) Under the Audience section, click Assign The Audiences window will pop up (pictured below) You can name the audience to re-use for other components. Select a criteria type of Profile For ...


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