Explore Courses Blog Tutorials Interview Questions
0 votes
in Salesforce by (11.9k points)

I have a custom metadata type "Project Literals" which have records that contain custom field ids

example: Label: StatusFieldId Name: StatusFieldId Id Field: 00N8E000000XYuM

Using DML statements give me an error "Id Field is not writable"

Is there a way to update the value using apex? maybe by using Metadata API, but how?

1 Answer

0 votes
by (32.1k points)

To make DML-like operations, you might also be interested in the apex/visualforce Custom Metadata Loader by Salesforce. It's open-source on GitHub and has to make use of the Metadata API behind the scenes.

Browse Categories