I want to write a trigger on a custom object (Template__c) such that it invokes the creation or update of Custom metadata type records. Since the fields are not writeable, how do I achieve this?
I tried using the "CustomMetadataValue". I can see the values assigned in Debug when I run in Anonymous window but the values do not get created in actual.