您位於此處:
建立偏好設定管理員的 Apex 類別
您可以使用「偏好設定產生器」與 Pref_center Apex 命名空間一起,建立具有進階自訂的表單。Pref_center Apex 命名空間代表「偏好設定管理員」功能的先前名稱。

使用較常見的搜尋字詞。
選取較少篩選條件以擴大您的搜尋。
您位於此處:
您可以使用「偏好設定產生器」與 Pref_center Apex 命名空間一起,建立具有進階自訂的表單。Pref_center Apex 命名空間代表「偏好設定管理員」功能的先前名稱。
| 提供版本:Developer、Enterprise、Performance 及 Unlimited Edition 的 Lightning Experience 和 Salesforce Classic |
| 需要的使用者權限 | |
|---|---|
| 使用「偏好設定管理員」: | ManagePreferenceManager |
在「偏好設定產生器」中建立表單時,會將詳細資料 (例如您包含的區段名稱與組態) 儲存為中繼資料。當使用者開啟偏好設定表單時,您的自訂 Apex 類別會擷取並設定該中繼資料,以在您的網站上設定表單。然後,當使用者完成並提交表單時,Apex 類別會建立或將提交的資料更新至相關的 Salesforce 同意物件。
在設定偏好設定表單前,請建立 Apex 類別來控制如何管理傳送至表單的資料。
public without sharing class [YOUR APEX CLASS NAME] implements pref_center.PreferenceCenterApexHandler {
public void submit(pref_center.SubmitParameters submitParams, pref_center.SubmitFormData formData, pref_center.ValidationResult validationResult) {
}
public pref_center.LoadFormData load(pref_center.LoadParameters loadParams, pref_center.LoadFormData loadFormData, pref_center.ValidationResult validationResult) {
return loadFormData;
}
}
如需有關 Apex 類別的詳細資訊,請參閱 Apex 開發人員指南與 Trailhead 中的建立 Apex 類別模組。

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.