将自定义设置元数据部署到 'Enterprise' 组织时出错 - Salesforce

Error while deploying custom settings metadata to 'Enterprise' org - Salesforce

我在将受保护的自定义设置部署到 Spring'20 版本的企业组织时遇到以下错误。

Custom Object You can't set the visibility for a Custom Setting to Protected unless you are in a developer or scratch org.

似乎以下版本更新影响了自定义设置的部署, https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_forcecom_custom_settings_org_visibility.htm

有没有人遇到过这个问题并且知道如何处理?提前致谢。

您似乎正在尝试为生产组织中的自定义设置设置可见性。可见性设置仅适用于托管包,以便为包开发人员提供一种控制包外曝光的方法。这允许存储仅对包可见的敏感数据。

对于您的生产组织自定义设置,读写应设置为 permissions

Visibility—(Only available in developer or scratch orgs) Select the visibility. After you save a custom setting, you cannot change this value.

Protected—If the custom setting is contained in a managed package, subscribing organizations can't see the custom setting—it doesn't display as part of the package list. In addition, subscribing organizations can't access the custom setting using Apex or the API. Custom settings can only be accessed by the Apex code that is part of the managed package. If the custom setting is contained in an unmanaged package, the custom setting is available through the Enterprise WSDL like any custom object (as if the Visibility was Public.)

Public—The custom setting is available through the Enterprise WSDL like any custom object. You can package custom settings defined as public. The subscribing organizations can edit the values, and access them using Apex and SOAP API, regardless of the type of package (managed or unmanaged).

Salesforce Help