Corrections to the Fourth Edition

Corrections to the Fourth Edition

Chapter 9 – Accessing Custom Settings and Custom Metadata

Effective Winter 19 – API 44 it is possible to instantiate custom metadata objects and set their fields in Apex (though not to update them via a DML operation). So the approach shown to wrap the custom metadata type is not required. That said, the approach shown in the book is still the recommended approach for the same reasons that it is used for custom settings.

See https://releasenotes.docs.salesforce.com/en-us/winter19/release-notes/rn_forcecom_development_custom_metadata_types_apex.htm