function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Peter BölkePeter Bölke 

FeatureManagement.checkPermission() not working in Winter'20

Hello,

since our Sandboxes have get Winter'20 all test classes which use FeatureManagement.checkPermission() fail.
As Example:
If you try to execute this in Anonymous Apex on a preview Sandbox:
 
if(!FeatureManagement.checkPermission('blabla')){

System.debug('Is not exsisting');

}

You will get the flowing issue:

System.NoDataFoundException: Data Not Available: The data you were trying to access could not be found. It may be due to another user deleting the data or a system error. If you know the data is not deleted but cannot access it, please look at our https://help.salesforce.com/apex/htdoor?body=%2Ftrain%2FonlineSupport.jsp&loc=support&language=en_US&release=222.4.4&instance=CS108&showSplash=true', 'Help', 1024, 768, 'width=1024,height=768,resizable=yes,toolbar=yes,status=yes,scrollbars=yes,menubar=yes,directories=no,location=yes,dependant=no', false, false);" title="support (New Window)">support page.

Does anyone have a workaround?

thanks

 
Khan AnasKhan Anas (Salesforce Developers) 
Hi Peter,

Greetings to you!

I tried to research your problem and found that this is a known issue. Keep watching this issue until get fixed.

https://success.salesforce.com/issues_view?id=a1p3A000001Yn0oQAC&title=featuremanagement-checkpermission-throwing-exception-for-non-existent-apiname-s-formerly-returned-false (https://success.salesforce.com/issues_view?id=a1p3A000001Yn0oQAC&title=featuremanagement-checkpermission-throwing-exception-for-non-existent-apiname-s-formerly-returned-false)

There is no workaround as of now, the release is in progress and the issue will be fixed soon. You can select the 'This Issue Affects Me' button to report your account and receive updates.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas