Salesforce API:如何使用部分案例 ID 检索案例
我想从 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了一个解决方法:我向 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".