Scope: managed applications, mobile applications, and ordinary applications.
1. If you know the type of a metadata object—for example, catalog or document—to get its metadata, it's recommended that you use the Metadata method. It is not recommended that you use the Metadata global context property because of its considerable runtime overhead.
Metadata.FindByFullName("Catalog." + CatalogName)
// Getting full name of metadata object by its reference.
MetadataObjectName = Metadata.FindByType(TypeOf(Ref)).FullName();