Salesforce API:如何使用部分案例 ID 检索案例

发布于 2024-11-26 02:12:41 字数 551 浏览 5 评论 0原文

我想从 Salesforce API 检索案例记录。我只有案例 ID 的开头 (不要问为什么) 所以我尝试了以下查询:

SELECT Id FROM Case WHERE Id LIKE 'whatever...%'

不幸的是,这会返回以下错误:

SELECT Id FROM Case WHERE Id LIKE '500DABCD...%'
                          ^
ERROR at Row:1:Column:27
invalid operator on id field'
How can we get this functionality from the API?

为什么我不能在 Id 字段上使用 LIKE 运算符?我还有其他方法可以做到这一点吗?

I'd like to retrieve a Case record from the Salesforce API. I only have the beginning of the Case Id (don't ask why) so I've tried the following query:

SELECT Id FROM Case WHERE Id LIKE 'whatever...%'

Unfortunately, this returns the following error:

SELECT Id FROM Case WHERE Id LIKE '500DABCD...%'
                          ^
ERROR at Row:1:Column:27
invalid operator on id field'
How can we get this functionality from the API?

Why can't I use the LIKE operator on the Id field? Is there some other way I can do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最笨的告白 2024-12-03 02:12:41

我找到了一个解决方法:我向 Case 实体添加了一个反映 Id 字段的自定义字段。我发现(与原始 Id 字段不同)我可以使用 LIKE 运算符查询该字段。

该字段的类型为“公式(文本)”,我已将公式设置为“Id”。

I've found a workaround: I've added a custom field to the Case entity that mirrors the Id field. I've found that (unlike the original Id field) I can query this field with the LIKE operator.

The field is of type "Formula (Text)" and I've set the formula to simply be "Id".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文