I’m facing a major problem is critical stage of my project:
I have packaged my app in a managed package (currently beta), including 5 custom setting objects, 2 of which are Protected.
The 2 protected objects were not installed. Does anyone know why?
In an attempt to move forward I manually copies the two objects into the org (via the IDE), of course these have no namespace. Now some of my code that refers to these object does not work and I don’t know if this is because the objects are Protected or because of the namespace .
Any suggestions for these two problems are much appreciated
As you say, installing the custom settings outside your managed package won’t work as they will be in a different namespace.
Assuming that your protected custom objects are included in the managed package, ensure any of the fields for them are also included. This should happen automatically when they are referenced by your Apex code.
If Privacy for a custom setting is Protected, and the custom setting is contained in a managed package, the subscribing organization cannot edit the values or access them using Apex.
You can only work with your protected custom settings from apex code within your package. You won’t be able to manipulate them directly via the settings page.