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
CRMScienceKirkCRMScienceKirk 

Post Install Script and Custom Metadata Types: sObject type '<my_custom_metadatatype__mdt>' is not supported.

Hi all,

I have a package where I have a new Custom Metadata Type and a few records for it included as components in it.  Within the Post Install Script class, I query for this Custom Metadata Type's records for the purposes of creating other custom object records.  However, during the post install, I receive an exception that that Metadata Type "is not supported."

Outside of the Post Install, I have a simple Visualforce page that displays a table of rows derived from the same query - no issues.

Post Install = no access to Metadata Type object
On-demand through VF = no problems

Does anyone have any thoughts around this?