Skip to main content
47 votes
Accepted

How can I Efficiently Check if the Running User has a Custom Permission?

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....
Adrian Larson's user avatar
  • 150k
9 votes

How can I Efficiently Check if the Running User has a Custom Permission?

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 ...
Scott Pelak's user avatar
  • 7,524
7 votes

Create Scratch Org Definition file

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 ...
arut's user avatar
  • 5,301
6 votes
Accepted

What does WDC stand for?

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): ...
sfdcfox's user avatar
  • 495k
6 votes
Accepted

Efficiently merge handle parallel feature branches in SFDX

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 ...
sfdcfox's user avatar
  • 495k
5 votes

Efficiently merge handle parallel feature branches in SFDX

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 ...
glls's user avatar
  • 20.2k
5 votes
Accepted

Use FMA Features for per-user licensing

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 ...
Anmol Kumar's user avatar
  • 3,631
4 votes
Accepted

Fine-grained app licensing using FMA and Permission Set Groups

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 ...
StonyGrunow's user avatar
4 votes

Feature based branching

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 ...
sfdcfox's user avatar
  • 495k
4 votes
Accepted

How to enable the FormulaEvalInApex and ApexZipSupport Feature in the Created Scratch Org

You are jumping the gun. Salesforce has not enabled the preview of Spring '24 yet. You need to wait until it is available (during January 2024, take a look here) and then use the preview version ...
Phil W's user avatar
  • 36.9k
3 votes
Accepted

Salesforce Try Catch does not work with FeatureManagement checkPermission

Sorry to say, but System.UnexpectedException can generally not be caught. That's by definition, e.g. see here What you could do is criticize that the exception thrown under these circumstances is of ...
Felix van Hove's user avatar
3 votes
Accepted

Delay of update Feature Management Integer parameter from subscriber org to LMO

This is mentioned in the documentation. When the Apex code in your package updates subscriber-to-LMO values in your subscriber’s org, the changes can take up to 24 hours to reach your LMO. This is ...
sfdcfox's user avatar
  • 495k
3 votes
Accepted

How to override System.FeatureManagement.checkPackageBooleanValue in development org

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 ...
sfdcfox's user avatar
  • 495k
2 votes

Efficiently merge handle parallel feature branches in SFDX

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 ...
Diéffrei Quadros's user avatar
2 votes

How do the FeatureManagement class methods identify the package?

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 ...
Shamina's user avatar
  • 4,295
2 votes
Accepted

Is there any way to set feature parameters for beta versions which did not pass security review?

It is possible to use Dependency Injection to mock the Feature Parameters for development org or for beta packages. Let's create Feature class and include this in the basic package @...
Patlatus's user avatar
  • 17.2k
1 vote

Free and paid tiers for AppExchange app

Please find below answers to your questions to the best of my knowledge : Is it possible for a paid AppExchange app to charge 0 USD for Basic subscription and > 0 USD for Premium? This is ...
Rohit's user avatar
  • 1,926
1 vote

Is it not possible to use FeatureManagment.checkPermission inside a package manage for a custom permission which is not included in that package

Query it using SOQL: SELECT Id, CustomPermissionId, SetupEntityId FROM CustomPermissionDependency WHERE CustomPermission.DeveloperName = 'Your_Custom_Permission_Name' AND SetupEntityId = '...
Renato Oliveira's user avatar
1 vote
Accepted

Package a Default for an FMA Date Feature Parameter

After reaching out to some other peers, it is indeed a good approach to set the default value that needs to have some kind of dependency (like the date should be set to TODAY() date). But Feature ...
Mateusz B's user avatar
  • 113
1 vote
Accepted

Strange error when releasing a new package version: Cannot modify managed object: entity=PackageIntegerValue

I was told this is a known issue I have found the following workaround: Include "country" : "de", "language": "en", into a file project-scratch-def.json
Patlatus's user avatar
  • 17.2k
1 vote

How to add feature based limit in second generation package scratch org?

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 ...
sfdcfox's user avatar
  • 495k
1 vote

I am trying to use method FeatureManagement.changeProtection to make Custom Metadata Object public but it doesn't work

FeatureManagement.changeProtection is available to use only with real Custom Objects and Custom permissions. Custom metadata types, custom settings, big objects and external objects are not supported ...
Patlatus's user avatar
  • 17.2k
1 vote
Accepted

How do I define a dependency in 2GMP for certain Salesforce feature like Quote object?

The line "definitionFile": "config/project-scratch-def.json", should be included in the sfdx-project.json file as following { "packageDirectories": [ { ...
Patlatus's user avatar
  • 17.2k
1 vote
Accepted

What can be the possible cause of error "Unable to retrieve feature parameter Display. No results found."?

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 ...
Patlatus's user avatar
  • 17.2k
1 vote

Use FMA Features for per-user licensing

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 ...
Keith C's user avatar
  • 136k
1 vote

Revert Public Visibility to Protected Prior to Packaging

It sounds like you need to contact Partner Support. Try emailing them at [email protected]. In the future, you shouldn't change that setting from protected to public, even as a joke, ...
sfdcfox's user avatar
  • 495k
1 vote

Lightning: Hide Utility Bar Item based on conditions

At this moment, no option exist for toggle switch on Utility Bar level because we can't control the Component Visibility on those items by conditions. Check the following idea and please vote for it: ...
MaCsi's user avatar
  • 121
1 vote

How to restrict your lighting component to display only in Internal (Employee) Community and not in Partner or Customer Communities?

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, ...
Ayoola Olapo's user avatar
1 vote

FMA parameter update in LMO org using apex

In Apex code, you can update data in customer object directly. There are three objects available in LMO: sfFma__FeatureParameterBoolean__c, sfFma__FeatureParameterDate__c, ...
Ashish Narang's user avatar

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