Salesforce Fact #842 | Error while using custom metadata methods

Have you encountered the below error while accessing custom metadata records using built-in methods:

system.typeexception: unsupported sobject type and/or version

This is because the metadata type methods were introduced in API version 51. So, please update the API version of the apex class to v51 or higher to resolve this.

Reference: https://salesforce.stackexchange.com/questions/339818/custom-metadata-types-not-supported-in-apex-classes

Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow