jongpie / CustomMetadataSaver

Allows saving changes to custom metadata records via Apex and Flow
MIT License
39 stars 5 forks source link

Fixed picklist deployment error #6

Closed jongpie closed 3 years ago

jongpie commented 3 years ago

Closes #4 - it looks like picklist fields need to be explicitly cast to strings in the code before deploying the custom metadata.

This is difficult to test in unit tests since Apex will not let you run Metadata.Operations.enqueueDeployment(deployment, callback); in a test context (which is where the error occurs). For now, I've manually tested this change in one of my scratch orgs, but I'll look into finding a better way to automatically test this in the future.