本文介绍了Salesforce.com Id 属性似乎有 15 和 18 个字符的值,有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用 SOAP API 与 salesforce.com (SFDC) 一起工作时,底层数据库中的主键似乎是 Id.这个值似乎有两种表示形式,要么是 15 个字符的版本,要么是 18 个字符的版本.

When using the SOAP API to work with salesforce.com (SFDC) it seems that the primary key in the underlying database is Id. Well there seems to be two representations of this value as either a 15 character version or an 18 character version.

我一直在使用 18,因为它显然更具体,但最后三位数字中包含什么,它们似乎可以删除?

I have been using the 18 since it is clearly more specific, but what is contained in the last three digits, that they can be dropped, seemingly?

有人明白这是怎么回事吗?

Anyone understand what this is all about?

推荐答案

来自 Web 服务 API 开发人员指南:

Salesforce.com 用户中的 ID 字段界面包含 15 个字符,base-62,区分大小写的字符串.每个15 个字符中的一个可以是数字数字 (0-9)、小写字母 (a-z)、或大写字母 (A-Z).二唯一 ID 可能仅相差一个以防万一.

因为有像这样的应用程序无法识别的访问50130000000014c 是一个不同的 ID50130000000014C,一个18位数字,ID 的大小写安全版本是由所有 API 调用返回.18字符 ID 由为每个 ID 添加后缀Force.com API.18 个字符的 ID 可以是安全地比较唯一性不区分大小写的应用程序,并且可以在所有 API 调用中使用时创建、编辑或删除数据.

Because there are applications like Access which do not recognize that 50130000000014c is a different ID from 50130000000014C, an 18-digit, case-safe version of the ID is returned by all API calls. The 18 character IDs have been formed by adding a suffix to each ID in the Force.com API. 18-character IDs can be safely compared for uniqueness by case-insensitive applications, and can be used in all API calls when creating, editing, or deleting data.

如果您需要转换18 个字符的 ID 到 15 个字符的 ID版本,截断最后三个人物.Salesforce.com 推荐您使用 18 个字符的 ID.

If you need to convert the 18-character ID to a 15-character version, truncate the last three characters. Salesforce.com recommends that you use the 18-character ID.

这篇关于Salesforce.com Id 属性似乎有 15 和 18 个字符的值,有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 02:24