我有一个自定义元数据类型“项目文字”,其中包含包含自定义字段 ID 的记录
例子:
标签:StatusFieldId
名称:StatusFieldId
ID 字段:00N8E000000XYuM
使用 DML 语句给我一个错误“Id 字段不可写”
有没有办法使用 apex 更新值?也许通过使用元数据 API,但如何?
最佳答案
来自 Custom Metadata Types Implementation Guide (第 9 页,强调我的):
Access Custom Metadata Types and Records
Use SOQL to access your custom metadata types and to retrieve the API names of the records on those types. DML operations aren’t allowed on custom metadata in Apex, the Partner APIs, and Enterprise APIs.
关于salesforce - Apex 如何更新自定义元数据类型记录/文字值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38342704/