您在此处:
在公式中引用记录类型的提示
获取将不同工作流规则、验证规则或查找筛选器应用于不同记录类型的提示。了解何时在公式中使用记录类型名称或 ID,以根据记录的分类应用逻辑。此外,有关将记录类型全局变量的使用限制为默认值公式的指导,以及 Sandbox 和生产环境的部署注意事项。
获取将不同工作流规则、验证规则或查找筛选器应用于不同记录类型的提示。了解何时在公式中使用记录类型名称或 ID,以根据记录的分类应用逻辑。此外,有关将记录类型全局变量的使用限制为默认值公式的指导,以及 Sandbox 和生产环境的部署注意事项。
| 适用于 Salesforce Classic 和 Lightning Experience |
| 适用于:所有版本 |
| 记录类型可用于:Professional、Enterprise、Performance、Unlimited 和 Developer Edition |
例如,您可以:
在可能时,使用 RecordTypeId 而不是 RecordType.Name 引用特定记录类型。虽然RecordType.Name使公式更具可读性,但如果记录类型的名称发生变化,您必须更新公式,而记录类型的 ID 永远不会发生变化。此外,RecordType.Name 需要记录类型的跨对象引用,而 RecordTypeId 不需要。但是,如果您正在跨组织部署公式(例如,在 Sandbox 和生产之间),请使用 RecordType.Name,因为 ID 在组织之间不相同。
避免在公式中使用 $RecordType,默认值公式除外。而应在对象上使用 RecordType 合并字段(例如,Account.RecordType.Name)或 RecordTypeId 字段。

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.