Use Preference Builder along with the Pref_center Apex namespace to create forms with
advanced customizations.
The Pref_center Apex namespace represents the former name of the Preference Manager
feature.
Required Editions
Available in: Lightning Experience and Salesforce Classic in Developer,
Enterprise, Performance, and Unlimited Editions
User Permissions Needed
To use Preference Manager:
ManagePreferenceManager
When you create your form in Preference Builder, the details, like the names and configuration
of sections that you included, are saved as metadata. When a user opens the preference form,
your custom Apex class retrieves and sets that metadata to configure the form on your site. Then
when the user completes and submits the form, the Apex class creates or updates the submitted
data into the relevant Salesforce consent objects.
Before you configure the preference form, create your Apex class to control how data passed
through the form is managed.
From Setup, in the Quick Find box, enter Custom Code, select
Apex Classes, and then click New.
In the Apex Class text box, copy and paste this code, and replace [YOUR APEX CLASS NAME]
with the name that you want for your Apex class:
Example
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;
}
}
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
Always Active
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
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
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.