salesforce - Apex 如何更新自定义元数据类型记录/文字值?

标签 salesforce metadata apex

我有一个自定义元数据类型“项目文字”,其中包含包含自定义字段 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/

相关文章:

Python Simple_Salesforce 关闭连接

javascript - 更新 Salesforce 案例信息

sql-server - 如何获取 SQL Server 中触发器的定义(主体)?

javascript - 如何从外部按钮调用顶点类?

php - Salesforce Apex 的数组表示法

database - 在数据库中存储 EXIF 元数据的格式

sql-server - 查看(但不执行)存储过程及其代码需要什么级别的 SQL Server 访问权限?

salesforce - Twilio 发送短信抛出异常 Salesforce

javascript - 我正在获取图像的 ListView ,而不是以网格格式显示

javascript - 渲染后设置文本框的值 -force.com