3

I have this code:

Metadata.CustomMetadata customMetadata = new Metadata.CustomMetadata();
customMetadata.fullName = 'MyNamespace__MyMetadataTypeName.MyMetadataRecordName';

I see customMetaData_name.fullName = 'name'; used in several posts on here. I have read the CustomMetData class section and the CustomMetadata types section but I cannot find any description of 'fullName' is the same as the 'QualifiedApiName' or Object Name ? What is it exactly ? a Property ? if so why isn't it in the doc...

2 Answers 2

4

All metadata types(eg. ApexClass, ApexPage, CustomMetadata etc.) are derived from a base "Metadata" class. As per documentation.

Metadata is analogous to sObject, which represents all standard objects. Metadata represents all components and fields in Metadata API. Instead of identifying each component with an ID, each custom object or custom field has a unique fullName, which must be distinct from standard object names, as it must be when you create custom objects or custom fields in the Salesforce user interface.

You can read more about base "Metadata" class here:

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm

1

Metadata Properties The following are properties for Metadata.

FullName: The full name of the custom metadata, which can include the namespace, type, and component name. fullName

The full name of the custom metadata, which can include the namespace, type, and component name. Signature

public String fullName {get; set;}

Property Value

Type: String

The format of the full name can include the namespace, metadata type, and metadata component name. If you’re updating components in a namespace, you also need to qualify the namespace for the component in the full name. For example, the full name for a custom metadata "MDType1__mdt" component named "Component1" that is contained in the "myPackage" namespace is "myPackage__MDType1__mdt.myPackage__Component1". For more information on full name formats for different metadata types, see reference documentation on the metadata types in theMetadata API Developer Guide.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .