gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 11:24:50 25 4
gpt4 key购买 nike

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com