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

custom setting in managed package


When I install a managed package, this construct: 


as documented here:

is flagged as an error. Yet it works fine in a DE org. 

Can someone tell me why? 



Let's assume the Custom Settings are part of the package you are trying to install.

When you instal the package and run the test, the custom settings are not installed and not initialized, so $Setup.CustomSettingName__c is NULL.