Loading
Data Protection and Privacy
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Create Preference Forms with Apex

          Create Preference Forms with Apex

          Use the Preference Builder to configure a preference form by selecting elements to populate onto a blank workspace.

          Required Editions

          User Permissions Needed
          To use Preference Manager: ManagePreferenceManager

          To create a preference form:

          1. On the Preference Manager dashboard, under Preference Manager, click Forms.
          2. Click New Form, then select the Apex method option.
          3. In the Details panel, enter a name and optional description for your form.
            Steps 3, 4, and 5 in Pref Builder
            These details help you identify the forms on your dashboard (1).
          4. Select the Apex class that you want to use (2).
          5. Enter the success and error messages that you want the user to see when they submit a preference form (3).
          6. Under Configuration Home in the Sections panel, click Add Section.
          7. In the Details panel, enter a title for the section. The section title automatically populates in the middle panel.
            Note
            Note If no title is required, leave the section title blank. The section title appears as Untitled Section in the Sections panel, but it isn’t visible in the form.
          8. In the Sections panel, under your section name, click Add Component. Choose a property type for the component.
          9. In the Details panel, enter an optional title for the component that appears in the form. Each component also requires a name that’s used for the form metadata and that isn’t visible to users.
            Mock data in component details panel
          10. Customize your form with as many sections and components as you want. For example, this email preference form has checkbox options for types of emails, an unsubscribe option, and a button to save changes.
            Example Preference Form
            Note
            Note For the Checkbox, Picklist, and Radio button components, enter a value for each group option. Then use Apex to update the consent record.

          When you’re done building your form, click Save or Save & Publish. You can also publish the form at any time from the Preference Manager dashboard.

           
          Loading
          Salesforce Help | Article