Extend Salesforce with Clicks, Not Code

Salesforce, Winter ’22

@salesforcedocs Last updated: September 15, 2021 © Copyright 2000–2021 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of salesforce.com, inc., as are other names and marks. Other marks appearing herein may be trademarks of their respective owners. CONTENTS

Extend Salesforce with Clicks, Not Code ...... 1 Customize Your Salesforce Org ...... 2 Set Up Your Data Your Way ...... 143 Manage Your Notifications with Notification Builder ...... 461 Define and Manage Platform Events ...... 468 Manage Your Domains ...... 472 Build Your Own Web Site ...... 488 Extend the Reach of Your Organization ...... 710 Build Your Own Salesforce App ...... 942 Lightning App Builder ...... 961 Resources for the & Click Administrator ...... 1016

Index ...... 1018

EXTEND SALESFORCE WITH CLICKS, NOT CODE

Ready to go beyond the basics of Salesforce administration? Want to customize your org, push its boundaries, and enhance its functionality? You can do that and so much more without writing a single line of code. All you need is your mouse and a sense of adventure. Enhance your objects, data, and fields, customize your org’s look and feel, augment your business processes, create websites, and even create apps—all using point-and-click tools.

Customize Your Salesforce Org You can customize each of the standard tabs and types of records, including adding custom fields and setting layouts. You can also customize search, tagging, and user interface options for your org. In addition, every Contact Manager, Group, Professional, Enterprise, Unlimited, and Performance Edition user can customize various personal display options. Set Up Your Data Your Way Optimize your Salesforce data to fit the unique needs of your users. You can create your own objects with data that fits together in the ways that make the most sense for you. Manage Your Notifications with Notification Builder Keep your users in the know with timely notifications, whether they’re at their desks or on the go. Choose whether standard Salesforce notifications, like Chatter notifications, appear on desktop, mobile, or at all. Create custom notifications to give your users new information and reminders, or replace a standard notification. Define and Manage Platform Events Use platform events to connect business processes in Salesforce and external sources through the exchange of real-time event data. Platform events are secure and scalable. Define fields to customize your platform event data. Manage Your Domains You can configure domains and their site associations to suit your organization’s unique needs. For example, you can set up a single domain to host your Experience Cloud, Lightning Platform, and Site.com sites. Or perhaps you want a single site on more than one domain. Build Your Own Web Site You can use Experience Builder or Salesforce Sites to build out your Salesforce organization with custom pages and apps. Extend the Reach of Your Organization Sometimes your users need to work with data and services that are outside your Salesforce org. There’s a variety of ways you can provide seamless access across org boundaries. Build Your Own Salesforce App An app is a collection of items that work together to serve a particular function. Salesforce apps come in two flavors: Classic and Lightning. Classic apps are created and managed in Salesforce Classic. Lightning apps are created and managed in Lightning Experience. You can customize both types of app to match the way your users work. Resources for the Point & Click Administrator In addition to online help, Salesforce creates guides and tip sheets to help you learn about our features and successfully administer Salesforce.

1 Extend Salesforce with Clicks, Not Code Customize Your Salesforce Org

Customize Your Salesforce Org

You can customize each of the standard tabs and types of records, including adding custom fields EDITIONS and setting page layouts. You can also customize search, tagging, and user interface options for your org. In addition, every Contact Manager, Group, Professional, Enterprise, Unlimited, and Available in: both Salesforce Performance Edition user can customize various personal display options. Classic and Lightning Watch a Demo: Creating a Workflow Rule (Salesforce Classic) Experience Quick demo of how to customize the way Salesforce looks for your organization. The available customization options vary according to To tailor Salesforce for your org, you can customize the display of the various tabs and other items. which Salesforce Edition you Select a link to get started on any task. have.

Find Object Management Settings USER PERMISSIONS Salesforce lets you personalize your object model with features like custom fields, page layouts, and validation rules. Depending on which experience of Salesforce you have enabled, these To view setup options: customizations are located in different areas of Setup. • View Setup and Control User Access to Fields Configuration Use field-level security to control user access to fields. Use page layouts to control the layout To customize your org: and organization of detail and edit pages in Salesforce, the Self-Service Portal, and the Salesforce • Customize Application Customer Portal. Custom Help Content Tailor help so that users understand how to work within your unique implementation of Salesforce. You can add learning in the flow of work in several ways. Add custom help for a page, app, object, or org level, or provide links to help in the Utility Bar, Path, or as a text box on the page. Show users custom resources in a Lightning Experience welcome mat when they first log in. Or, add micro-learning prompts and walkthroughs to your app to reach users with important news, training, and on-boarding information. Tailor Business Processes to Different Users Using Record Types Record types let you offer different business processes, picklist values, and page layouts to different users. You might create record types to differentiate your regular sales deals from your professional services engagements, offering different picklist values for each. Or you might display different page layouts for your customer support cases versus your billing cases. Manage Your Translations If your Salesforce org has multiple languages enabled, manage translations so that your global users can use Salesforce in their language.

Find Object Management Settings Salesforce lets you personalize your object model with features like custom fields, page layouts, and validation rules. Depending on which experience of Salesforce you have enabled, these customizations are located in different areas of Setup.

Find Object Management Settings in Lightning Experience Salesforce lets you customize your object model with features like custom fields, page layouts, and validation rules. Most objects are available from the Object Manager in Setup. Find Object Management Settings in Salesforce Classic Salesforce lets you personalize your object model with features like custom fields, page layouts, and validation rules. Depending on which type of object you want to find, these customizations are located in different areas of Setup.

2 Extend Salesforce with Clicks, Not Code Find Object Management Settings

Standard Object Limits Standard object limits include usage details for object customizations, such as the custom fields you’ve added or sharing rules you’ve applied to an object. Quick Access Menu The quick access menu offers handy shortcuts to customization features. App Setup Overview

Find Object Management Settings in Lightning Experience

Salesforce lets you customize your object model with features like custom fields, page layouts, and EDITIONS validation rules. Most objects are available from the Object Manager in Setup. Standard Objects and Custom Objects Available in: Lightning A standard object, such as Account or Contact, comes out of the box with your Salesforce Experience organization. A custom object is an object that you or another administrator created. Available in: All editions From Setup, at the top of the page, select Object Manager. Select one of the objects in the list, and then select a specific customization from the left pane.

For example, to add a custom field to the Account object, select Object Manager from the top of the Setup page. Next, select Account, and then Fields & Relationships. Select New.

3 Extend Salesforce with Clicks, Not Code Find Object Management Settings

Note: If you’ve renamed any objects or fields, the Object Manager uses their assigned custom names.

Other Standard Objects Some standard objects aren’t housed in the Object Manager. Standard objects with more specific purposes and customizations can be found in Setup using the Quick Find box. From Setup, enter the object name in the Quick Find box, then select the customization. Custom Objects You can also create custom objects from the Object Manager. From Setup, at the top of the page, select Object Manager. Then select New Object.

External Objects An external object is similar to custom objects, except that it maps to data that’s stored outside your Salesforce organization. From Setup, enter External Objects in the Quick Find box, then select External Objects. Next, click one of the external objects in the list. Then scroll to the section for the specific customization. For example, to add a custom field to the Orders external object, enter External Objects in the Quick Find box, then select External Objects. Click Orders, and then scroll to Custom Fields and Relationships.

SEE ALSO: Point-and-Click Customization: What’s Different or Not Available in Lightning Experience

Find Object Management Settings in Salesforce Classic

Salesforce lets you personalize your object model with features like custom fields, page layouts, EDITIONS and validation rules. Depending on which type of object you want to find, these customizations are located in different areas of Setup. Available in: Salesforce Standard Objects Classic A standard object, such as Account or Contact, comes out of the box with your Salesforce Available in: All editions organization.

4 Extend Salesforce with Clicks, Not Code Find Object Management Settings

From Setup, enter the name of the appropriate object in the Quick Find box, then select the specific customization. For example, to add a custom field to the Case object, enter Case in the Quick Find box, then select Fields under Cases. Custom Objects A custom object is an object that you or another administrator created. From Setup, enter Objects in the Quick Find box and select Objects. Next, click one of the custom objects in the list. Then scroll to the section for the specific customization. For example, to add a custom field to the Job Applications object, enter Objects in the Quick Find box, then select Objects. Click Job Applications, and then scroll to Custom Fields and Relationships. External Objects An external object is similar to custom objects, except that it maps to data that’s stored outside your Salesforce organization. From Setup, enter External Objects in the Quick Find box, then select External Objects. Next, click one of the external objects in the list. The scroll to the section for the specific customization. For example, to add a custom field to the Orders external object, enter External Objects in the Quick Find box, then select External Objects. Click Orders, and then scroll to Custom Fields and Relationships.

Standard Object Limits

Standard object limits include usage details for object customizations, such as the custom fields EDITIONS you’ve added or sharing rules you’ve applied to an object. The list varies depending on the object. When a customization exceeds the allowed limit for the Available in: both Salesforce object, or reaches 75% of the limit, a tip displays that suggests what you can do next. Classic and Lightning Experience Refer to the standard object limits page when you’re planning to customize a particular standard object or to monitor the usage and limits of customizations on that object. Available in: All Editions To see an object’s usage: except Database.com • If you’re using Lightning Experience, from Setup, open the Object Manager, click the name of the object you want to see the usage for, and then go to Object Limits. • If you’re using Salesforce Classic, from Setup, enter the object name in the Quick Find box, and then select Limits under that object.

Note: The object limit percentages are truncated, not rounded. For example, if your org uses 95.55% of the limit for a particular customization, the object limit displays 95%.

5 Extend Salesforce with Clicks, Not Code Find Object Management Settings

Quick Access Menu

The quick access menu offers handy shortcuts to customization features. EDITIONS When you're working on apps or objects, use this menu to jump to relevant app customization features. It's available from object list view pages and record detail pages. Available in: Salesforce Classic (not available in all Note: If drag-and-drop scheduling on list views is enabled, the quick access menu isn't visible orgs) for list views on accounts, contacts, and custom objects. Available in: Contact • To expand or collapse the menu, click (or press ALT+;). Manager, Group, • To scroll down the list of the menu, press TAB. Professional, Enterprise, • To select an option on the menu, press ENTER. Performance, Unlimited, and Developer Editions • To remove the menu from all list views and record pages, click Turn off menu. To restore the quick access menu: USER PERMISSIONS 1. From your personal settings, enter Advanced User Details in the Quick Find box, then select Advanced User Details. No results? Enter Personal Information in the To view the quick access Quick Find box, then select Personal Information. menu: • Customize Application 2. Click Edit. 3. Select the Quick Access Menu checkbox. 4. Click Save.

SEE ALSO: Personalize Your Salesforce Experience

6 Extend Salesforce with Clicks, Not Code Rename Object, Tab, and Field Labels

Rename Object, Tab, and Field Labels

You can change the name of almost any object, field, or tab in Salesforce. This simple adjustment EDITIONS lets you continue using the terminology your users already know and helps them transition to using Salesforce. However, Salesforce Help and most pages in Setup always display the original names Available in: both Salesforce for standard objects, fields, and tabs. Classic and Lightning For example, you can change the name label for the "Accounts" object and related "Accounts" tab Experience to "Companies", and change the field "Account Name" to "Company Name." When you rename an Available in: Essentials, object, tab, or field, the new name appears on all pages the user sees, in Salesforce for Outlook, and Professional, Enterprise, in Connect Offline. Performance, Unlimited, Before renaming tabs, objects, fields, and other related labels, review the implementation tips for and Developer Editions administrators. If you use person accounts in your Salesforce org, see Renaming Person Account Labels. USER PERMISSIONS 1. From Setup, enter Rename Tabs and Labels in the Quick Find box, then select To rename a tab and field: Rename Tabs and Labels. • Customize Application 2. Select your default language from the Select Language drop-down list at the top of the OR page. Manage Translation Note: In Hebrew, we recommend keeping tab renaming to a minimum because variable OR gender in verbs is not supported and verbs can lose gender agreement. If you are designated as a translator, you need: 3. Click Edit next to the tab you want to rename. Click Reset to revert to a tab’s original name. View Setup and Note: You can’t reset custom object tab names. Configuration

To reset renamed tabs: 4. Enter the singular and plural forms of the new tab name. Also, if applicable for the language, • Customize Application select Starts with a vowel sound for labels that start with a vowel to ensure that Salesforce uses the proper article (such as “a” or “an”). Then click Next. OR When you rename a tab or an object, you can’t use the name of another standard tab, custom Manage Translation object, external object, or custom tab. When you rename an object, a field, or a tab, you can’t OR use include these characters: #, $, %, ;, <, =, >, [, ], ^, `, |, and ~. If you are designated as a translator, you need: 5. Enter your labels for the standard field labels and other user interface elements. Be sure to enter View Setup and both a singular and plural form for each label that requires it. Select Starts with a vowel sound Configuration for labels that start with a vowel.

Note: Some standard fields, such as Created By and Last Modified By, are purposely omitted from renaming because they track system information. EDITIONS

6. Click Save. Available in: Salesforce Repeat this procedure to translate labels into all other languages used in your organization. Classic (not available in all orgs) Tip: After renaming a tab or object, rename any custom reports, dashboards, profiles, permission sets, custom fields, and list views that contain the original name. You can modify Person accounts available labels using the Translation Workbench. To rename a standard report, click Save As and save in: Enterprise, Performance, it to a folder designed for your new name. Unlimited, and Developer Editions Other tab customization options include: • Individual users can control which tabs and related lists display for their own logins.

7 Extend Salesforce with Clicks, Not Code Rename Object, Tab, and Field Labels

• In addition to the standard tabs provided by Salesforce, users can create entirely new custom tabs depending on their Edition. For more information, see Custom Tabs. • In Enterprise, Unlimited, Performance, and Developer Edition organizations, you can override the tab home page that is displayed when a user clicks a standard, custom, or external object tab. For more information, see Override Standard Buttons and Tab Home Pages on page 785.

Renaming Person Account Labels If your org uses person accounts, you can rename these standard fields.

Field Tab Description Business Account Accounts An account that is not a person account because it does not have a record type specific to person accounts. This label is primarily used to clarify the type of accounts you are importing.

Person Account Accounts A person account.

Business Contact Contacts A contact that is associated with a business account. This label is primarily used to clarify the type of accounts you are importing.

When you rename the Person Account field label, the renamed label appears in Salesforce: • As a prefix to differentiate person account fields such as Birthdate and Home Phone from business account fields. For example, Person Account: Birthdate is available as an account in opportunity reports. • In the name of the Is Person Account field and icon. For example, if you rename the Person Account field to “Consumer,” then Is Person Account becomes Is Consumer.

Note: The Person Account and Business Account field labels are independent from actual record type names. • To customize person account record types, from the object management settings for person accounts, go to Record Types. • To customize business account record types, from the object management settings for accounts, go to Record Types.

SEE ALSO: Considerations for Renaming Tab and Field Labels Rename the Chatter Tab Find Object Management Settings

8 Extend Salesforce with Clicks, Not Code Rename Object, Tab, and Field Labels

Considerations for Renaming Tab and Field Labels

Before renaming standard and custom tabs and fields, learn how those changes affect your users. EDITIONS • Most standard tabs and objects can be renamed but not all. For example, the Forecasts tab is not available for renaming. From Setup, enter Rename Tabs and Labels in the Quick Available in: both Salesforce Find box, then select Rename Tabs and Labels to view a list of the tabs and objects you Classic (not available in all can rename. orgs) and Lightning Experience • The renamed labels appear on all user pages in Salesforce including Personal Setup. In Lightning Experience, all pages in the Setup area use the renamed labels. In Salesforce Classic, the Setup Available in: Professional, pages in the Setup area use the default, original labels. Enterprise, Performance, • Some standard fields, such as Created By and Last Modified By, are purposely Unlimited, and Developer omitted from renaming because they track system information. Editions • When you rename a tab or an object, you can’t use the name of another standard tab, custom object, external object, or custom tab. USER PERMISSIONS • When you rename a tab, a field, or an object, you can’t use include these characters: #, $, %, To rename tab and field ;, <, =, >, [, ], ^, `, |, and ~. labels: • After renaming tabs, objects, or fields, check the following additional items that may need • Customize Application manual updates: To reset renamed tabs: – Review all list view names. List view names continue to display the original object name • Customize Application until you change them manually. – Check standard report names and descriptions for the objects you renamed. – Update the titles and descriptions of any email templates that contain the original object or field name. – Manually change any other items you customized with the new object or field name. For example, custom fields, page layouts, and record types may contain the original tab or field name.

• Connect Offline, the Outlook integration, the Gmail integration, and Salesforce for Outlook use your new names. • If you have renamed tabs, objects, or fields, you can also replace the Salesforce Help with another URL. Users can view this URL whenever they click on any context-sensitive help link on an end-user page or within their personal settings. After you replace the help, the Help & Training link at the very top of every page and all Setup pages will continue to display the Salesforce Help. For instructions on replacing the online help, see Define Org-Level Help in Salesforce Classic on page 99. • In Hebrew, we recommend keeping tab renaming to a minimum because variable gender in verbs is not supported and verbs can lose gender agreement.

SEE ALSO: Rename Object, Tab, and Field Labels

9 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Control User Access to Fields

Use field-level security to control user access to fields. Use page layouts to control the layout and EDITIONS organization of detail and edit pages in Salesforce, the Self-Service Portal, and the Salesforce Customer Portal. Available in: both Salesforce Important: When you use page layouts to hide fields from detail and edit pages, users can Classic and Lightning still see these fields via reports, search results, list views, and the API. To restrict field access, Experience use field-level security. Search doesn’t return results for records with fields protected by field Page layouts and search level security. In some rare situations, when search terms match field values protected by layouts available in: All field-level security, the associated records are returned but without the protected fields and Editions their values. Don’t use page layouts to secure data. For example, removing the Edit button Field-level security available from a doesn’t prevent users from using inline editing. To prevent users from in: Enterprise, Performance, editing data, use sharing rules, field-level security, page layout field properties, validation Unlimited, Developer, and rules, object permissions, and Visualforce pages. Database.com Editions

Field-Level Security • Restrict users’ access to view and edit fields. For example, restrict access in reports, search results, list views, related lists, email, and mail merge templates, custom links, Connect Offline. Also restrict API access and when synchronizing data or importing personal data. • Override less-restrictive field access settings in page layouts and mini page layouts. For example, if a page layout requires a field that’s read-only in field-level security settings, the field remains read-only for the user. • Override less-restrictive field settings in search layouts. For example, if a field is visible in the search layout but hidden via field-level security settings, the field remains hidden.

Page Layouts • Control the layout and organization of detail and edit pages. • Control which fields, related lists, and custom links users see, on detail and edit pages only. • Control which standard and custom buttons display on detail pages and related lists. • Determine whether fields are visible, read only, or required, on detail and edit pages only. • Determine the fields that users can import data into. • In Personal, Contact Manager, Group, and Professional Editions, page layouts control which fields users can access in: – related lists and list views – reports – Connect Offline – email and mail merge templates – custom links Page layouts also control field access when synchronizing data. • In Professional, Enterprise, Unlimited, Performance, and Developer Editions, determine aspects of mini page layouts, including: – record type – profile associations – related lists – fields and field access settings

10 Extend Salesforce with Clicks, Not Code Control User Access to Fields

The visible fields and related lists of the mini page layout can be further customized. But other items inherited from the associated page layout can’t be changed on the mini page layout. Mini page layouts display selected fields and related lists of records in the mini view of the console.

Tip: To automatically add a field to all page layouts and make it visible and required everywhere regardless of field-level security, make it a universally required field.

Feed-based Layouts Overview Feed-based page layouts make it easier to work with records by providing two separate views: one for the record’s feed, and one for its details, including related lists. Create Page Layouts With the enhanced page layout editor, you can tailor record page layouts to the needs of your users. Add, remove, or reorder actions, buttons, fields, and sections on a record’s detail page. Create Feed-based Page Layouts Make it easier for your users to work with account, contact, lead, opportunity, custom, and external object records by creating feed-based layouts. These layouts include two separate views: one for the record’s feed and one for its details. Page Layouts Page layouts control the layout and organization of buttons, fields, s-controls, Visualforce, custom links, and related lists on object record pages. They also help determine which fields are visible, read only, and required. Use page layouts to customize the content of record pages for your users. Compact Layouts A compact layout displays a record’s key fields at a glance in the Salesforce mobile app, Lightning Experience, and in the Outlook and Gmail integrations. Select Which Fields Appear in the Recently Viewed List As a Salesforce admin, you can customize the Recently Viewed list that appears on the home page for most standard and custom objects. Choose and order the fields to display so that your users see the information that’s most important for your company.

SEE ALSO: Page Layouts Customize Search Results Layouts

Feed-based Layouts Overview Feed-based page layouts make it easier to work with records by providing two separate views: one for the record’s feed, and one for its details, including related lists.

Available in: Enterprise, Performance, Unlimited, and Developer Editions

Unlike standard page layouts, which include all of a record’s information—the feed, details, and related lists—on one page, feed-based layouts let you switch between the feed view and the details view so you can focus on the type of information you need at any given moment. For example, to see comments others have made about a record or to create a new record that’s related to it, you’d use the feed view. To delve into the record’s related lists, attachments, and other in-depth information, you’d use the details view. Feed-based layouts are available on account, asset, case, contact, lead, opportunity, custom, and external objects.

11 Extend Salesforce with Clicks, Not Code Control User Access to Fields

The feed view in these layouts includes: 1. Tabs or, if you’re working in the Salesforce console, toggle buttons ( ) to switch between the feed view and the detail view. 2. The publisher, which might include actions that let you do things like create related records or log calls, depending on how your administrator has set up your organization. 3. The record feed, which shows activity on the record, such as comments others have made about it. 4. Any custom buttons and links your administrator has added. 5. A follow button ( ) or following indicator ( ) and a list of people who follow the record. Depending on how your administrator has set up the page, these might appear on the left side or on the right side. 6. Feed filters, which let you choose which information from the feed you see. Depending on how your administrator has set up the page, the filters might appear on the left side of the page, in the center, or on the right. Detail views show in-depth information about the record, including related lists.

12 Extend Salesforce with Clicks, Not Code Control User Access to Fields

SEE ALSO: Create Feed-based Page Layouts

Create Page Layouts

With the enhanced page layout editor, you can tailor record page layouts to the needs of your users. EDITIONS Add, remove, or reorder actions, buttons, fields, and sections on a record’s detail page. 1. From the management settings for the object that you want to edit, go to Page Layouts. Available in: Salesforce Classic (not available in all 2. Click New. orgs) and Lightning 3. Optionally, choose an existing page layout to clone. Experience

4. Type a name for the new layout. Available in: Enterprise, 5. Optionally, select Feed-Based Layout to create a layout that includes separate tabs for Performance, Unlimited, a record’s feed and detail pages. and Developer Editions 6. Click Save. 7. Modify the layout. USER PERMISSIONS 8. Assign the new layout to user profiles. To create page layouts: • Customize Application

13 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Tip: You can also create a new page layout by cloning an existing one using Save As from within the layout.

SEE ALSO: Edit Page Layouts for Standard Objects Edit Page Layouts for Custom and External Objects Control User Access to Fields Feed-based Layouts Overview Find Object Management Settings

Create Feed-based Page Layouts

Make it easier for your users to work with account, contact, lead, opportunity, custom, and external EDITIONS object records by creating feed-based layouts. These layouts include two separate views: one for the record’s feed and one for its details. Available in: Salesforce Feed-based layouts offer a more streamlined way of working with records, and don’t require users Classic (not available in all to scroll through information they’re not interested in to find what they’re looking for. Users can orgs) easily switch back and forth between the feed view, which includes the publisher and important Available in: Group, events on the record, shown in chronological order, and the details view, which shows in-depth Professional, Enterprise, information about the record, including related lists. Performance, Unlimited, You can create feed-based layouts for account, asset, contact, lead, opportunity, custom, and external Contact Manager, and objects. To create feed-based layouts for cases, use Case Feed. Developer Editions 1. Be sure feed tracking is enabled for the object on which you want to create a feed-based layout. To enable feed tracking, from Setup, enter Feed Tracking in the Quick Find box, USER PERMISSIONS then select Feed Tracking. To create, edit, and delete 2. Create a new page layout and select Feed-Based Layout. page layouts: • Customize Application Note: Only new page layouts can be feed-based; you can’t change an existing standard layout to a feed-based layout.

3. Click Edit next to your layout and use the enhanced page layout editor to configure it. You can’t configure feed-based layouts with the original page layout editor.

4. On the main page layout editor page, customize the publisher to include the actions you want to make available to users, and add any custom buttons or links. 5. Click Feed View in the page layout editor header to customize what appears on the feed page. You can: • Enable full-width feed so the feed expands horizontally when users view records in Salesforce console tabs or subtabs. • Turn on compact feed so users see a cleaner, more streamlined feed view when working with records in Salesforce console tabs or subtabs. • Choose to automatically collapse the publisher when it’s not in use so users can see more of the information below it on the page. • Add custom components, which are Visualforce pages with functionality you define. • Choose where on the page custom buttons and links and standard components like the Follow button and followers list appear. • Hide the standard sidebar.

14 Extend Salesforce with Clicks, Not Code Control User Access to Fields

• Choose which feed filters are available, and where they appear.

6. Assign the page layout to user profiles.

SEE ALSO: Feed-based Layouts Overview Use Case Feed in Salesforce Classic Feed Tracking Enable Feed Updates for Related Records

Page Layouts

Page layouts control the layout and organization of buttons, fields, s-controls, Visualforce, custom EDITIONS links, and related lists on object record pages. They also help determine which fields are visible, read only, and required. Use page layouts to customize the content of record pages for your users. Available in: both Salesforce Page layouts can include s-controls and Visualforce pages that are rendered within a field section Classic and Lightning when the page displays. You can control the size of the s-controls and Visualforce pages, and Experience determine whether or not a label and scroll bars display. Page layouts are available Salesforce has two drag-and-drop tools for editing page layouts: the original page layout editor in: All Editions and an enhanced page layout editor. The enhanced page layout editor is enabled by default, and Creation and deletion of provides all the functionality of the original editor, as well as additional functionality and an page layouts is available in: easier-to-use WYSIWYG interface. Professional, Enterprise, You can enable the original page layout editor in the User Interface settings. Your Salesforce org Performance, Unlimited, can use only one page layout editor at a time. and Developer Editions From within a page layout, you can access a mini page layout. The mini page layout defines the hover details that display when you mouse over a field on an object’s detail page in the Agent USER PERMISSIONS console or in the Recent Items section of the sidebar in Salesforce Classic. To create, edit, and delete For Personal, Contact Manager, Essentials, and Group Edition orgs, every user views the same layout. page layouts: Professional, Enterprise, Unlimited, Performance, and Developer Edition orgs can create different • Customize Application page layouts for use by different profiles and record types and set field-level security settings to further restrict users’ access to specific fields. In Professional, Enterprise, Performance, Unlimited, and Developer Editions, you can set the mini page layouts and related objects that appear in the Console tab.

Usage Considerations Starting in Winter ’20, layout changes made by administrators for record pages don't appear immediately in Lightning Experience. The record page displays the updated layout about 15 minutes later when you reload the page. This change is a tradeoff to significantly improve performance of record pages. To see your changes immediately, log out and log back in. Other users don't see the change until up to 1 hour later when they reload the page. This change impacts record pages for the following objects. • Account • Case • Contact • Lead

15 Extend Salesforce with Clicks, Not Code Control User Access to Fields

• Opportunity • Custom objects This change also applies to record layouts updated through the page layout editor, compact layouts, and Lightning pages. For example, the layout is changed when you add a custom field to an object and add that field to the page layout. For changes to a Lightning page, such as via the Lightning App Builder, administrators continue to see their changes immediately after a page reload. However, other users and other browsers don’t see the change up to 1 hour later when they reload the page. To see the changes immediately, users can log out and log back in.

Edit Page Layouts for Standard Objects Change the look and feel of page layouts for standard Salesforce objects. Edit Page Layouts for Custom and External Objects Change the look and feel of page layouts for custom and external objects. Customize Page Layouts with the Enhanced Page Layout Editor The enhanced page layout editor is a WYSIWYG tool for customizing your page layouts in Salesforce, the Self-Service Portal, and the Salesforce Customer Portal. The enhanced page layout editor has all the functionality of the original page layout editor, but has more features and an easier-to-use interface. Customize Salesforce Classic Home Tab Page Layouts You can customize the Home tab in Salesforce Classic to include components such as sidebar links, a company logo, a dashboard snapshot, or custom components that you create. A dashboard snapshot is a clipping of the top row of a dashboard’s components. Just like other tabs, you can also assign different home page layouts to different users based on profile. Set Page Layouts and Field-Level Security Assign Page Layouts to Profiles or Record Types Assign Page Layouts from a Customize Page Layout or Record Type Page Edit Multi-Line Layouts for Opportunity Products Build Page Layouts for Custom Objects How Page Layouts Work in the Salesforce Mobile App Use the enhanced page layout editor to customize the layout of an object’s record detail pages, configure actions, and adjust which fields and related lists appear in the Salesforce mobile app. Page Layouts in Lightning Experience When you customize your page layouts in Salesforce Classic, those changes can affect the content of object record pages in Lightning Experience. However, in Lightning Experience, the page elements display differently and some aren’t supported. Tips for Optimizing Page Layouts for the Salesforce Mobile App Here are some tips and tricks for making your existing page layouts more mobile-friendly. Manage Mobile Cards in the Enhanced Page Layout Editor Add expanded lookups, components, and Visualforce pages to the Mobile Cards section of your page layout to have them show up as mobile cards in the Salesforce mobile app. Customize Related Lists You can customize the buttons, columns displayed, column order, and record sort order of related lists on record detail pages in Salesforce and the Salesforce Customer Portal. Customize Detail Page Buttons

16 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Customize Page Layouts with the Original Page Layout Editor Use the original page layout editor to customize page layouts in Salesforce, the Self-Service Portal, and the Salesforce Customer Portal.

SEE ALSO: Control User Access to Fields

Edit Page Layouts for Standard Objects

Change the look and feel of page layouts for standard Salesforce objects. EDITIONS From the management settings for the appropriate object, go to Page Layouts. Alternately, if you’re using the Enhanced Page Layout Editor, which is enabled by default, you can Available in: both Salesforce Classic and Lightning customize a standard object’s page layout by clicking Edit Layout on the object’s detail page. Experience

SEE ALSO: Available in: All Editions Page Layouts Control User Access to Fields USER PERMISSIONS Customize Page Layouts with the Original Page Layout Editor To customize page layouts: Customize Page Layouts with the Enhanced Page Layout Editor • Customize Application To view page layouts: • View Setup and Configuration

Edit Page Layouts for Custom and External Objects

Change the look and feel of page layouts for custom and external objects. EDITIONS 1. From the management settings for the object whose page layout you want to edit, go to Page Layouts. Available in: both Salesforce Classic and Lightning 2. Complete one of the following. Experience a. If you have “Customize Application” permission, open the page layout that you want to customize for edit. Available in: All Editions b. If you have the “View Setup and Configuration” permission, click the page layout that you want to view. USER PERMISSIONS

To customize page layouts: SEE ALSO: • Customize Application Page Layouts To view page layouts: • View Setup and Control User Access to Fields Configuration Customize Page Layouts with the Original Page Layout Editor Customize Page Layouts with the Enhanced Page Layout Editor Find Object Management Settings

17 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Customize Page Layouts with the Enhanced Page Layout Editor

The enhanced page layout editor is a WYSIWYG tool for customizing your page layouts in Salesforce, EDITIONS the Self-Service Portal, and the Salesforce Customer Portal. The enhanced page layout editor has all the functionality of the original page layout editor, but has more features and an easier-to-use Available in: both Salesforce interface. Classic (not available in all The enhanced page layout editor has two parts: a palette on the upper portion of the screen and orgs) and Lightning the page layout on the lower portion of the screen. The palette contains the user interface elements Experience that you can add to your page layout, such as fields, actions, buttons, links, and related lists. Available in: All Editions Note: Currently, you can't change the location of Chatter feeds. However, in Salesforce Classic, users can click the Hide Chatter link in a Chatter feed to hide the feed, and the USER PERMISSIONS Show Chatter link to show the feed. To customize page layouts: When working with the enhanced page layout editor: • Customize Application • To select multiple elements individually, use Ctrl+click. To select multiple elements as a group, To view page layouts: use Shift+click. • View Setup and • To change the properties of an element on the page layout, double-click the element or click Configuration the wrench icon ( ) next to it. You can’t change the properties of elements in the palette. • To make a field read-only or required, double-click the field in the page layout and select the appropriate checkbox. • To access the other layouts for an object with multiple page layouts, click the page layout name at the top of the page and select another layout to view. • To change the name of the page layout, add personal and public tags if available, and display standard object checkboxes on the page layout, click Layout Properties.

Note: You can’t rename a page layout if you’re using Salesforce Professional Edition.

• In Enterprise, Unlimited, Performance, and Developer Editions, you can select a profile to preview how the pages will look for users with that profile. Most related lists’ columns preview without data. • If you’re working with a feed-based page layout, click Feed View to customize the tools and components that appear when users are working in the feed on a record. • To choose which fields display on the record detail page and the order in which they appear, click Edit Multi-Line Layout. • The mini page layout defines the hover details that display when you mouse over a field on an object’s detail page, in the Agent console, or in the Recent Items section of the sidebar in Salesforce Classic. To customize the fields in the mini page layout, click Mini Page Layout at the top of the palette. • When you’re done customizing the page layout, save it. If you navigate away from your page layout before saving, you lose your changes.

Note: Changes to user layouts override the global publisher layout on user profile pages and the Chatter home page.

User Interface Elements for the Enhanced Page Layout Editor Guidelines for Using the Enhanced Page Layout Editor Page Layout Tips Here are a few tips to keep your page layouts organized and easy to use.

18 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Page Layout Considerations Keep these considerations in mind when working with page layouts in the enhanced page layout editor.

SEE ALSO: Guidelines for Using the Enhanced Page Layout Editor Customize Related Lists Feed-based Layouts Overview Page Layouts

User Interface Elements for the Enhanced Page Layout Editor

This list describes the enhanced page layout editor user interface elements and how you can use EDITIONS them in your page layout. To add elements, drag them from the palette to the layout. Valid drop locations show up in green. To remove elements, drag them off the layout and back to the palette. Available in: both Salesforce Important: The Mobile Cards section of the page layout editor is no longer supported as of Classic and Lightning Spring ’20. Items in the Mobile Cards section, such as components and expanded lookups, Experience no longer display in the Salesforce mobile app. For more information, see Mobile Cards Are Available in: All Editions Not Available in the New Salesforce Mobile App in the Salesforce Spring ’20 release notes. Actions USER PERMISSIONS Mobile smart actions appear as a single action element in the page layout editor. In the Salesforce mobile app, the Mobile Smart Actions element expands to distinct create actions that enable To customize page layouts: users to create records directly from the action bar. The create actions included in the set of • Customize Application mobile smart actions vary depending on the page layout’s object. To view page layouts: Note: If you delete an action, the action is removed from all layouts that it’s assigned to. • View Setup and Configuration Einstein Analytics Assets You can add and move an Analytics dashboard to any section on the page layout, except Mobile Cards. For an Analytics dashboard element, use field mapping to map data fields in the dashboard to the object’s fields so that the dashboard shows only the data that’s relevant for the record being viewed. For more about field mapping or filtering Analytics dashboards, see Embed Analytics Dashboards in Lightning Pages or Embed Analytics Dashboards in Salesforce Classic Pages. Blank Spaces You can add and move blank spaces to any section on the page layout, except Mobile Cards. Use blank spaces to visually align and distinguish elements on the page.

Note: If you use the original page layout editor to view a page layout that was created in the enhanced page layout editor, the original page layout editor shows the blank spaces that you added. You can’t move or add blank spaces in the original page layout editor, but you can remove them by dragging them to the box on the right. Buttons You can control which standard and custom buttons are displayed and the order in which the custom buttons appear. You can’t rearrange standard buttons. Standard and custom buttons are available as actions in the Salesforce mobile app and Lightning Experience. Canvas Apps For the Canvas Apps category to appear in the palette, set the canvas app location to Visualforce Page when you create the canvas app in Salesforce.

19 Extend Salesforce with Clicks, Not Code Control User Access to Fields

If you add a canvas app to any section other than the Mobile Cards section, the canvas app appears in the page layout in the full Salesforce site. Canvas apps added as mobile cards don’t appear in the Salesforce mobile app. To have a canvas app appear on a mobile record page, add it to the page as a component using the Lightning App Builder. Components and Expanded Lookups Components and expanded lookups added as mobile cards don’t appear in the Salesforce mobile app. Expanded lookups are no longer supported in mobile as of Spring ’20. To have a News or Twitter component appear on a mobile record page, add it to a Lightning page using the Lightning App Builder. Fields A field can display one or more of these icons: • The field must have a value to save the record, but isn’t required on the page layout itself. • The field must be included on the page layout because an administrator configured the field as universally required or Salesforce automatically requires the field. Although you can’t remove such fields, you can move them to different locations. • The field is a controlling field. • The field is a dependent field. • The field is read-only. To set which fields are required and read-only, select one or more fields and click on any selected field. • You can’t change the field properties of some standard fields. You can change custom fields only if they aren’t universally required fields. • Administrators and users with the Edit Read Only Fields permission can always edit fields marked as read-only. • If you make a picklist field read-only, all new records contain the default value for that picklist. • Auto-number fields are always read-only. • If you mark the opportunity Probability field as read-only, the Probability value is still updated when a user changes the Stage value of an opportunity. When working with fields: • In Personal, Contact Manager, and Group Editions, page layouts control which fields users can access in related lists, list views, reports, Connect Offline, email and mail merge templates, custom links, and when synchronizing data. In Professional, Enterprise, Unlimited, Performance, and Developer Editions, field-level security controls this access. Field-level security settings override field properties that you set on the page layout if the field-level security is more restrictive than the page layout setting. • Users can import values into a field only if they have read and edit access. User permissions, page layout assignments, and field-level security settings determine field access. Related Lists A page layout can have up to 100 related lists. You can place related lists at the bottom of the page layout. To move a related list on the page layout, drag the handle located above the related list. To customize a related list, double-click the related list handle or click inside the handle. Use the related list properties to: • Specify which fields display as columns on the related list, the order in which they appear, and the sort order of the records in the related list. In Professional, Enterprise, Unlimited, and Performance Editions, you can also opt to apply the column information to other page layouts for the same type of object. • Specify which standard and custom buttons appear on the related list. When working with related lists on page layouts, note the following: • The View All button only displays up to 2,000 items in a related list.

20 Extend Salesforce with Clicks, Not Code Control User Access to Fields

• Some related lists aren’t customizable because they link to data rather than store it. Related lists that aren’t customizable are indicated on the page layout. • You can’t add related lists to the page layouts for the User object. • You can enable related list hover links so that record detail pages include links for each related list at the top of the page. Users can hover over the link to display the corresponding related list in an interactive overlay to view and manage the related list items. Users can also click the link to jump to the content of the related list without scrolling down the page. • In Professional, Enterprise, Unlimited, Performance, and Developer Edition, individual users can customize which related lists display for their personal use. Administrators can overwrite these user customizations and apply the related list configuration in the page layout to all users, even if they already customized their display. To overwrite users' related list customizations, click Yes on the Overwrite Users’ Customized Related Lists window, which appears when saving a page layout if you moved or added a related list. • Related lists show up on the record’s related information page in the Salesforce mobile app. Report Charts Report charts are supported in both Salesforce Classic and Lightning Experience. Custom S-Controls A page layout can have up to 20 s-controls. To change the properties of an s-control, double-click the s-control or click its wrench icon ( ) and set the following attributes: • Width sets the horizontal size in pixels or a percent. • Height sets the vertical size in pixels. • Show scrollbars determines whether the iFrame in which the s-control displays contains scroll bars when necessary. • Show label determines whether the page layout includes the Label of the custom s-control. Remove the label to display the s-control in a wider area. S-controls aren’t supported in Lightning Experience. Sections You can add and move sections anywhere above the related lists on the page layout. The sections you add can contain fields, s-controls, and blank spaces. In addition, each page layout has a default section that can only contain custom links and blank spaces. You can change the location of the custom link section, but you can’t remove it from the page. The Section user interface element is the second option in the palette when you select the Fields or Custom S-Controls category on the palette. To change the attributes of a section, double-click the section or select its associated wrench icon ( ). You can: • Enter a name for the section. Names of some standard page sections can’t be changed. • Specify whether the section has one or two columns. • Specify the order in which users can tab through the items in that section. • Specify whether the section heading is shown on the detail and edit pages. Tags If tags are enabled, click Layout Properties and configure personal and public tags in the header section of the page layout. Users can’t tag a record if personal or public tags aren’t included in the header section. Also, the positioning of personal and public tags in the header can’t be modified. Tags aren’t supported in Lightning Experience. Visualforce Pages You can add Visualforce pages to any section on the page layout, except for sections reserved for custom links and related lists. A page layout can have up to 20 Visualforce pages.

21 Extend Salesforce with Clicks, Not Code Control User Access to Fields

You can add a Visualforce page to a page layout only if the standard controller on the Visualforce page is set to the object for which you’re creating the page layout. If you don’t have any Visualforce pages with a standard controller set to that object, the Visualforce Pages category doesn’t appear in the palette. Visualforce pages added as mobile cards in the page layout editor don’t appear in the Salesforce mobile app. To have a Visualforce page appear on a mobile record page, add it to the page as a Visualforce component using the Lightning App Builder.

SEE ALSO: Guidelines for Using the Enhanced Page Layout Editor Customize Page Layouts with the Enhanced Page Layout Editor

Guidelines for Using the Enhanced Page Layout Editor

• Elements that are already on the page layout still appear on the palette but are inactive. When EDITIONS you click an inactive element on the palette, Salesforce highlights the element on the page layout. Available in: Salesforce • Removing a field from a page layout doesn’t remove it from the object’s compact layout. The Classic and Lightning two layout types are independent. Experience

• If the original page layout editor is enabled, users can click the page layout name to access the Available in: All Editions detail page of the page layout. The enhanced page layout editor doesn’t have detail pages, as all the detail page functionality is always available on the enhanced editor. Salesforce displays a read-only version of the enhanced page layout editor to users with the “View Setup and USER PERMISSIONS Configuration” permission. To customize page layouts: Note: The read-only view of the page layout doesn’t display field types and lengths in • Customize Application hover details. To view page layouts: • View Setup and • The Custom Links, Custom S-Controls, and Visualforce Pages categories appear in the palette Configuration only if you’ve defined those types of elements for the object for which you’re defining a page layout. When you create a custom link for an object, you add it to the Custom Links section on that object’s page layout. In non-English Salesforce orgs, the “Custom Links” section title isn’t translated from English automatically for the Territory and Territory Model objects, but you can edit the section title. • The Canvas Apps category appears in the palette only if you defined at least one canvas app with a location of Visualforce Page. • The Components category appears in the palette only if the available components are supported by the object for which you’re defining a page layout. For example, the Twitter component is supported only on account, contact, and lead page layouts. • When you edit an account page layout for use in Salesforce Classic, the following applies: – On business accounts, you can display a Copy Billing Address to Shipping Address link. On the page layout, in the Address Information section, select the option to display the section header on the Edit page. Next to the Billing Address field, add the Shipping Address field. – You can also display a link on person accounts. On the page layout, in the Address Information section, select the option to display the section header on the Edit page. Next to the Billing Address field, add the Shipping Address or the Mailing Address field. The link says Copy Billing Address to Shipping (or Mailing) Address. – Contact fields and related lists are available on person account page layouts, but contact custom links and custom buttons are not.

• This table lists standard objects with checkboxes that are specific to page layouts for that object. To configure how Salesforce displays the checkboxes, when customizing the page layout, click Layout Properties. Use the Select by default option associated with a checkbox if you want Salesforce to automatically select the option when a user accesses the edit page.

22 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Object Checkboxes

Account Evaluate this account against territory rules on save checkbox — Displays the Evaluate this account against territory rules on save checkbox on account edit pages. Territory assignment rules run automatically when the Select by default checkbox is selected. If both Show on edit page and Select by default are selected, users can uncheck the Evaluate this account against territory rules on save checkbox on the account edit page, and territory assignment rules will not be run.

Case – Case assignment checkbox — Displays the Assign using active assignment rules checkbox on case edit pages. Case assignment rules run automatically when the Select by default checkbox is selected. If both Show on edit page and Select by default are selected, the assignment checkbox is selected by default, but users can deselect it to override the assignment rule.

– Email notification checkbox — Displays the Send notification email to contact checkbox on case edit pages.

Case Close – Solution information section — Displays the solution information section on the case close edit pages. – Notify Contact — Displays the Notify Contact checkbox on case close edit pages.

Lead Lead assignment checkbox — Displays the Assign using active assignment rule checkbox appears on the lead edit page. Lead assignment rules run automatically when the Select by default checkbox is selected. If both Show on edit page and Select by default are selected, the assignment checkbox is selected by default, but users can deselect it to override the assignment rule.

Person Account Evaluate this account against territory rules on save checkbox — Displays the Evaluate this account against territory rules on save checkbox on person account edit pages. Territory assignment rules run automatically when the Select by default checkbox is selected. If both Show on edit page and Select by default are selected, users can uncheck the Evaluate this account against territory rules on save checkbox on the account edit page, and territory assignment rules will not be run.

23 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Task Email notification checkbox — Displays the Send Notification Email checkbox appears on the task edit page.

Note: A user’s personal preference for defaulting the state of the checkbox takes precedence over the organization-wide setting.

SEE ALSO: User Interface Elements for the Enhanced Page Layout Editor Customize Page Layouts with the Enhanced Page Layout Editor

Page Layout Tips

Here are a few tips to keep your page layouts organized and easy to use. EDITIONS • Use field-level security to restrict users’ access to fields; then use page layouts to organize detail and edit pages within tabs. This reduces the number of page layouts for you to maintain. Available in: both Salesforce Field-level security settings override the visible and read-only settings on the page layout if the Classic and Lightning field-level security has a more restrictive setting than the page layout. Experience • Remove unnecessary fields. Page layouts are available • Keep the number of required fields to a minimum. in: All Editions • Group similar fields with sections. Creation and deletion of • Think about the right TAB key order for each section. page layouts is available in: Professional, Enterprise, • Check your layouts in Read and Edit modes. Performance, Unlimited, • Add help and description text to custom fields. Use it to explain to users what data you’re and Developer Editions looking for in the field. • In Professional, Enterprise, Performance, Unlimited, and Developer Editions, use record types to provide unique layouts for different records. • Optimize related lists—adjust their overall order, the sorting of the records, and display of relevant columns and buttons. • If you want to customize the user profile layout in the Salesforce mobile app, create a new layout or edit an existing layout in the User Profile Page Layouts section. • If a dependent lookup is above its controlling field on a page layout, make its lookup filter optional or redesign the page layout. Placing a required dependent lookup above its controlling field on a page layout could confuse users who typically start from the top of the page when entering data. • A background process periodically runs that cleans up metadata associated with deleted custom fields. This process will affect the Last Modified Date and Last Modified By fields on page layouts, record types, and custom objects. • Salesforce recommends creating no more than 200 page layouts. Although there is no limit, it can be difficult to manage your page layouts if you have more than 200.

24 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Page Layout Considerations

Keep these considerations in mind when working with page layouts in the enhanced page layout EDITIONS editor. Available in: both Salesforce Page Layouts Classic and Lightning Experience • You can’t rename a page layout if you’re using Salesforce Professional Edition. • You can drag up to 20 s-controls, 20 Visualforce pages, 20 expanded lookups, and 100 related Page layouts are available lists onto a page layout. There are no limits on custom links. in: All Editions Creation and deletion of Note: You can’t place a Visualforce page more than once on a page layout. page layouts is available in: Professional, Enterprise, • In Lightning Experience, page layouts support up to 55 lookup fields. In Salesforce Classic, page Performance, Unlimited, layouts support up to 40 lookup fields. and Developer Editions • Don’t add more than four external lookup fields to your page layout. On Lightning Experience record pages, a Record Detail component that contains more than four external lookup fields breaks the page at runtime. • You can add one dashboard per page layout. • Page layouts for the user object only include custom fields, custom links, s-controls, and Visualforce pages. Tagging, related lists, custom buttons, and standard field customizations aren’t included on page layouts for the user object. Also, field-level security is only available for custom fields on the user object. Only standard Chatter actions appear on the user profile page, regardless of which actions are assigned to the User Page Layout or the global publisher layout. • You can edit only certain attributes when you’re working with a page layout that was installed from a managed app. Some changes that you make to managed page layouts, such as adding components, work when you’re editing the page layout but aren’t reflected on the record detail page. • Chatter group layout changes affect the Salesforce mobile app only. Changes to the group publisher (actions and layout) reflect in both the full Salesforce site and the Salesforce mobile app.

Related Lists • You can include up to 10 fields per related list. • In Lightning Experience, the related list type determines how many fields are displayed in a related list. The Basic List related list type displays only the first four fields of a related list. The Enhanced List type shows up to 10 fields, lets you resize and sort columns, perform mass actions, and wrap text. To change the related list type, customize the related list component in the Lightning App Builder. • You can’t move the first field of a related list, because it’s a unique identifier for the record. • You can add custom fields of the long text area type to a related list. However, you can’t add some standard fields of the long text area type. For example, you can’t add the Description field on an Opportunity to a related list. • The default sort order varies per record. The Sort By dropdown isn’t available for activities and opportunity products. • Lookup fields aren’t available for display on their corresponding lookup related list. For example, the case lookup field on an account page layout isn’t available when editing the cases related list. • You can’t customize the History related list because it links to data stored elsewhere.

Mini Page Layouts • You can’t choose Mini Console View for the Close Case layout, Log a Case page, or View Cases page layouts on the Self-Service Portal. You can’t choose Mini Console View for opportunity team page layouts.

25 Extend Salesforce with Clicks, Not Code Control User Access to Fields

• Field properties on the page layout determine field properties on the mini page layout. For example, if a field is read-only on the page layout, that same field is read-only on the mini page layout. To change the field properties of fields on the mini page layout, you must change the field properties of fields on the page layout. • You can’t define mini page layouts for the Close Case layout, Log a Case page, or View Cases page layouts on the Self-Service Portal. You can’t define mini page layouts for opportunity team page layouts. • You can define mini page layouts for the user object; however, you cannot add standard fields or related lists. Also, a customized mini page layout won’t display in the Agent console. • Overrides for the Edit and View buttons for an object don’t affect the Edit and View buttons in mini page layouts. • Fields marked Always Displayed or Always on Layout on page layouts are automatically included on the mini page layout and can’t be removed unless they’re removed from the page layout.

Knowledge Layouts • Authoring actions that you add to the Salesforce Mobile and Lightning Experience Actions section of the page layout appear in the highlights panel on record pages in Lightning Experience and the Salesforce mobile app. • To use inline edit with Knowledge, add the Publication Status field to your standard page layout. The Publication Status field must be in the standard page layout, not in a compact layout. However, the field can appear in both the standard and compact layouts.

Tip: If the Publication Status field is in a collapsed layout section, you must expand the section to load the edit icons before you can use inline editing. To increase the accessibility of inline editing, add the Publication Status field to a layout section that is likely to always be open.

• The Title and URL Name standard fields are required. You can’t remove them from the layout. • To control which audiences can view an article, add these fields to the page layout: Visible in Internal App; Visible to Customer; Visible to Partner; and Visible in Public Knowledge base. The fields appear as checkboxes in the record.

Customize Salesforce Classic Home Tab Page Layouts

You can customize the Home tab in Salesforce Classic to include components such as sidebar links, EDITIONS a company logo, a dashboard snapshot, or custom components that you create. A dashboard snapshot is a clipping of the top row of a dashboard’s components. Just like other tabs, you can Available in: Salesforce also assign different home page layouts to different users based on profile. Classic You can add components to the sidebar or the main panel. You can also determine if custom sidebar Available in: All Editions components appear only on the Home tab or on all Salesforce pages.

USER PERMISSIONS Create Custom Home Page Components Use custom components to configure the Salesforce Classic home page for your users. Add To view home page layouts: HTML, images, links, and more to enhance your users’ productivity. • Customize Application Design Home Page Layouts in Salesforce Classic To create or change home After creating the components you want displayed on the Home tab, design your home page page layouts: layouts. You can design your layouts based on your unique organizational and user needs. • Customize Application Visualforce Area Home Page Components Use Visualforce Area home page components to add dynamic content to your home page. For example, you can present content from partner apps, display charts with the Reports and Dashboards REST API, or add a canvas app to the home page. Home Page Components Tips and Considerations Keep these considerations in mind when creating custom components that you want displayed on the Salesforce Classic Home tab.

26 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Assign Home Tab Page Layouts to Profiles Your home page layouts are only visible to users after you assign them to a user profile.

Create Custom Home Page Components

Use custom components to configure the Salesforce Classic home page for your users. Add HTML, EDITIONS images, links, and more to enhance your users’ productivity. Before you begin: Available in: Salesforce Classic • If you’re creating custom link components, define your Home tab custom links first. See Custom Buttons and Links on page 774. Available in: All Editions • If you’re creating an image component, upload your image to the Documents tab first. • If you’re creating a Visualforce Area component, create your Visualforce page first. USER PERMISSIONS 1. From Setup, enter Home Page Components in the Quick Find box, then select To create or change home Home Page Components. page layouts: 2. Click New. • Customize Application 3. Enter a name for the component. For custom links, this name is displayed as the section heading in the sidebar on the Home tab. 4. Choose the type of component. 5. Click Next, and then complete one or more of these steps. • For links, select the appropriate custom links, and then click Add. • For images, click Insert an image, choose the document folder, and then select the image file. The image file must be in a public folder and Externally Available must be enabled on the document’s properties so that users can view the image.

Tip: Keep your image size smaller than 20 KB for optimum performance.

• For an HTML Area component, choose where to display it—in the wide or narrow column—and then enter your content in the box below.

Note: HTML Area home page components don’t support JavaScript, CSS, iframes, and some other advanced markup. To use JavaScript or other advanced HTML elements in your home page component, we recommend that you use a Visualforce Area component instead.

• For a Visualforce Area component, choose where to display it—in the wide or narrow column—then select the Visualforce page, and assign it a height.

6. Click Save. After creating the home page component, you need to add it to a home page layout. See Design Home Page Layouts in Salesforce Classic on page 28.

Note: Components in the narrow column are displayed in the sidebar. They aren’t displayed in the sidebar on other pages in Salesforce unless you specify that in your user interface settings or by assigning the “Show Custom Sidebar On All Pages” permission.

SEE ALSO: Visualforce Area Home Page Components Home Page Components Tips and Considerations

27 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Design Home Page Layouts in Salesforce Classic

After creating the components you want displayed on the Home tab, design your home page EDITIONS layouts. You can design your layouts based on your unique organizational and user needs. 1. From Setup, enter Home Page Layouts in the Quick Find box, then select Home Available in: Salesforce Page Layouts. Classic 2. Click to edit an existing layout or create one. Alternately, select a layout to copy and click Clone. Available in: All Editions 3. If you create a layout, give it a name and then click Save. 4. Select the components to display on the layout. USER PERMISSIONS

• To add the Find Articles component, select Article Search. This component is only available To view home page layouts: for Salesforce Knowledge users. • View Setup and • To add the Customer Portal component, select Customer Portal Welcome. If the My Configuration Profile site Visualforce page has been enabled, this component contains a personalized To create or change home welcome message and a link to the portal user’s profile. The My Profile page enables users page layouts: logged into either your Salesforce site, or your Customer Portal from Salesforce sites, to • Customize Application update their own contact information. When they make changes to this page, the corresponding portal user and contact records are updated. • To allow your users to resume flow interviews that they’ve paused, select Paused Flow Interviews. This component displays only flow interviews that the user has paused.

Note: You can add up to 20 components to a home page layout.

5. Click Next. 6. Customize the order in which the narrow and wide components appear. Move a component by selecting it and using the arrow buttons. 7. Click Save.

SEE ALSO: Assign Home Tab Page Layouts to Profiles Customize Salesforce Classic Home Tab Page Layouts

Visualforce Area Home Page Components

Use Visualforce Area home page components to add dynamic content to your home page. For EDITIONS example, you can present content from partner apps, display charts with the Reports and Dashboards REST API, or add a canvas app to the home page. Available in: Salesforce The Visualforce page that you choose for the component can use a standard or custom controller. Classic (not available in all You can include JavaScript in your Visualforce page, but because the component is rendered in an orgs) iframe on the home page layout, the JavaScript can’t interact with the page that contains the Available in: All Editions component.

Sample Usage If your Visualforce Area home page component displays in the sidebar, you can dynamically get the record ID and top-level URL of the page that the component is being displayed on by using the $CurrentPage global variable in your Visualforce markup.

28 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Using $CurrentPage, you can access the query string parameters for the page by specifying the parameters attribute, after which you can access each individual parameter:

$CurrentPage.parameters.parameter_name

The parameters for record ID and top-level page URL are, respectively, id and sfdcIFrameOrigin. For more information, see “Getting Query String Parameters” in the Visualforce Developer's Guide.

Home Page Components Tips and Considerations

Keep these considerations in mind when creating custom components that you want displayed EDITIONS on the Salesforce Classic Home tab. • Standard components without an Edit link are read only. Available in: Salesforce • The components that you select for the narrow column display in the sidebar. They don’t display Classic in the sidebar on other pages within Salesforce unless you specify that in your user interface Available in: All Editions settings. If you only want certain users to view sidebar components on all pages, grant those users the “Show Custom Sidebar On All Pages” permission. • When editing the standard Messages & Alerts component, enter the text that you want to display to users. If entering HTML code for your message, make sure that it’s self-contained, well-formed HTML.

Note: Standard Messages & Alerts home page components don’t support JavaScript, CSS, iframes, and some other advanced markup.

• When editing the standard Custom Links home page component, enter the link text to display to users in the Bookmark field. In the URL field, enter the complete website address, such as http://www.yahoo.com. To link to a Salesforce page, enter only the part of the URL after salesforce.com, for example, /00Ox0000000esq4. These links always open within the main Salesforce window, not in a popup window. • The standard Custom Links home page component is a quick way to add links to the sidebar, but it doesn’t support merge fields, functions (such as URLFOR), executing JavaScript, or customizable window opening properties. If you need this additional functionality: 1. From Setup, enter Home in the Quick Find box, then select Custom Links, and then create your home page custom links on that page. 2. From Setup, enter Home in the Quick Find box, then select Home Page Components, and then create a custom home page component of type Links on that page that includes the custom links that you created in the first step. Creating a custom home page component for your links doesn’t change the visual styling for your end users.

• The Dashboard Snapshot component displays the top three components of the last dashboard the user accessed. Users can view a dashboard snapshot on their Home tab if they have access to at least one dashboard. • When designing home page layouts for your Customer Portal, we recommend adding the following components: Search, Solution Search, Recent Items, Customer Portal Welcome, and a custom HTML Area component that includes your corporate branding in the wide column. • You can add up to 20 components to a home page layout.

SEE ALSO: Create Custom Home Page Components

29 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Assign Home Tab Page Layouts to Profiles

Your home page layouts are only visible to users after you assign them to a user profile. EDITIONS 1. From Setup, enter Home Page Layouts in the Quick Find box, then select Home Page Layouts. Available in: Salesforce Classic 2. Click Page Layout Assignment. 3. Click Edit Assignment. Available in: All Editions 4. Choose the appropriate page layout for each profile. Initially, all users, including Customer Portal users, are assigned to the Home Page Default layout. USER PERMISSIONS

5. Click Save. To assign home page layouts: Tip: Users can customize the dashboard settings on their Home tab in their personal settings. • Customize Application

Set Page Layouts and Field-Level Security

Use field-level security as the means to restrict users’ access to fields; then use page layouts primarily EDITIONS to organize detail and edit pages within tabs. This reduces the number of page layouts for you to maintain. For example, if a field is required in the page layout and read only in the field-level security Available in: both Salesforce settings, the field-level security overrides the page layout and the field will be read only for the user. Classic and Lightning Experience

For Personal, Contact Manager, and Group Editions Page layouts and search 1. Create custom fields. layouts available in: All Editions 2. Create any custom buttons or links. Field-level security available 3. Create any custom s-controls. in: Professional, Enterprise, 4. Define page layouts. All users automatically use the same page layout for each object. Performance, Unlimited, and Developer Editions 5. Set the related objects and the mini page layouts that display in the console. 6. Define search layouts. All users use the same search layouts.

For Professional, Enterprise, Unlimited, Performance, and Developer Editions 1. Create custom fields. 2. Create any custom buttons or links. 3. Create any custom s-controls. 4. Create any custom profiles. 5. Create record types for different business scenarios. 6. Assign which record types are available to users with different profiles. 7. Set the field-level security for each profile to restrict users’ access to specific fields. 8. Define page layouts to organize your pages. 9. Set the related objects and the mini page layouts that display in the console. 10. Assign page layouts to users based on profiles and record types. 11. To verify that all field access settings are correct, check the field accessibility grid. 12. Define search layouts. All users use the same search layouts.

30 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Tip: Click Preview while editing a page layout to see how the page will look for users with different profiles. This preview includes any extra security that is set in field-level security.

SEE ALSO: Field-Level Security

Assign Page Layouts to Profiles or Record Types

After defining page layouts, assign which page layouts users see. A user’s profile determines which EDITIONS page layout he or she sees. In addition, if your organization is using record types for a particular object, the combination of the user’s profile and the record type determine which page layout is Available in: both Salesforce displayed when a user views records for that object. Classic and Lightning You can assign page layouts from: Experience • The object's customize page layout or record type page Page layouts are available • The original or enhanced profile user interface. in: All Editions To verify that users have the correct access to fields based on the page layout and field-level security, Record types are available you can check the field accessibility grid. From Setup, enter Field Accessibility in the in: Professional, Enterprise, Quick Find box, then select Field Accessibility. From this page, choose a particular object to view Performance, Unlimited, and then select whether you want to check access by profiles, record types, or fields. and Developer Editions

SEE ALSO: Page Layouts Assign Page Layouts in the Original Profile User Interface Assign Record Types and Page Layouts in the Enhanced Profile User Interface Tailor Business Processes to Different Users Using Record Types Control User Access to Fields

31 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Assign Page Layouts from a Customize Page Layout or Record Type Page

1. From the management settings for the appropriate object, go to Page Layouts or Record Types. EDITIONS 2. Click Page Layout Assignment. 3. Click Edit Assignment. Available in: Salesforce Classic and Lightning 4. Use the table to specify the page layout for each profile. The table displays the page layout Experience assignments for each profile. If your organization uses record types, a matrix displays a page layout selector for each profile and record type. Page layouts are available in: All Editions When selecting page layout assignments: Record types are available • Click a cell, column, or row heading to select all the table cells in that column or row. in: Professional, Enterprise, • Press SHIFT+click to select multiple adjacent table cells, columns, or rows. Performance, Unlimited, • Press CTRL+click to select multiple nonadjacent table cells, columns, or rows. and Developer Editions • Click any cell and drag to select a range of cells. • Click Next or Prev to view another set of record types. USER PERMISSIONS

Selected page layout assignments are highlighted. Page layout assignments you change are To assign page layouts: italicized until you save your changes. • Manage Profiles and Permission Sets 5. If necessary, select another page layout to assign from the Page Layout To Use drop-down list and repeat the previous step for the new page layout. 6. Click Save.

SEE ALSO: Assign Page Layouts to Profiles or Record Types

Edit Multi-Line Layouts for Opportunity Products

You can customize the columns that display when you click Edit All in the Products related list of EDITIONS an opportunity detail page. 1. From the object management settings for opportunity products, go to Page Layouts. Available in: Lightning Experience and Salesforce 2. Next to the name of an opportunity product page layout, click Edit. Classic (not available in all 3. Click Edit Multi-Line Layout. orgs)

4. Move fields between Available Fields and Selected Fields. Available in: Professional, • To customize which fields display in the layout, select one or more fields in Available Fields Enterprise, Performance, and click Add or Remove. Unlimited, and Developer Editions • To sort fields in the layout, select one or more fields in Selected Fields and click Up or Down. • To select multiple fields individually, use CTRL+click. USER PERMISSIONS • To select multiple fields as a group, use SHIFT+click.

Note: Product and Quantity fields are required and can’t be removed from the layout. To edit multi-line layouts for opportunity products: • Customize Application 5. Click Save.

32 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Build Page Layouts for Custom Objects

Page layouts define which fields users can view and edit when entering data for a custom object EDITIONS record. You can use the default page layout that is created automatically when you create a custom object. You can also build your own page layout with related lists and custom links. If you do not Available in: both Salesforce use any page layout with your custom object, you can still interact with it by using the Lightning Classic (not available in all Platform API to manage custom data or build a custom user interface. orgs) and Lightning Experience

Available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions

USER PERMISSIONS

To define page layouts for custom objects: • Customize Application

1. From the object management settings for a custom object, go to Page Layouts. 2. In the Page Layouts related list, open an existing page layout for edit, or create a new page layout. 3. If creating a new page layout, enter a name for it, and select an existing page layout to clone, if desired. 4. Edit the page layout just as you would any other page layout. 5. Click Save.

SEE ALSO: Page Layouts Find Object Management Settings

33 Extend Salesforce with Clicks, Not Code Control User Access to Fields

How Page Layouts Work in the Salesforce Mobile App

Use the enhanced page layout editor to customize the layout of an object’s record detail pages, EDITIONS configure actions, and adjust which fields and related lists appear in the Salesforce mobile app. In the Salesforce mobile app, page layouts drive these areas of the mobile experience. Available in: both Salesforce Classic and Lightning Record Related Information and Detail Pages Experience When you view a record in the mobile app, you see the fields, Visualforce pages, and related lists that are based on the record type and the user’s profile. Related lists show up as single-line Available in: All editions cards containing the name of the page or related list. Tapping the related list card displays its except Database.com details. Actions Actions in the Salesforce Mobile and Lightning Experience Actions section of a page layout appear in the action bar and action menu on the object’s record pages. Here are the record details, related lists, and action menu for a sample account, Edge Communications:

Page Layouts in Lightning Experience

When you customize your page layouts in Salesforce Classic, those changes can affect the content EDITIONS of object record pages in Lightning Experience. However, in Lightning Experience, the page elements display differently and some aren’t supported. Available in: Lightning If your org supports multiple page layouts, you can create a page layout from the Page Layouts Experience related list on any object in the Object Manager. You can also edit or delete an object’s page layouts Page layouts are available by clicking on a page layout in the Page Layouts related list. in: All Editions

Here’s a sample contact record in Lightning Experience. The highlights panel contains key record Creation and deletion of fields and is the only part of a record page that you can’t customize using the page layout editor. page layouts is available in: The fields in the highlights panel are customized using a compact layout. Enterprise, Performance, Unlimited, and Developer Editions

34 Extend Salesforce with Clicks, Not Code Control User Access to Fields

These page layout elements are supported in Lightning Experience. Actions Actions display in different places, such as the highlights panel, Activity tab, and the Chatter tab. The actions are derived from the list of actions in the Salesforce Mobile and Lightning Experience Actions section of the page layout. Some actions aren’t supported in Lightning Experience. For more information, see Actions in Lightning Experience on page 754. Blank Spaces Blank spaces are supported in Lightning Experience. Canvas Apps Canvas apps are supported in Lightning Experience. Custom Links Custom links display under the Details tab. Fields Fields display under the Details tab. You can remove or reorder fields on a page layout only via the page layout editor. The top-down tab-key order, which allows users viewing a record detail page to move through a column of fields from top to bottom before moving focus to the top of the next column of fields, isn’t supported in Lightning Experience. Even if a page layout is configured for a top-down tab-key order, tabbing moves from left-to-right through field columns in Lightning Experience. Related Lists Related lists are included as Lightning components in Lightning Experience. Not all related lists are supported in Lightning Experience. In Lightning Experience, the related list type determines how many fields are displayed in a related list. The Basic List related list type displays only the first four fields of a related list. The Enhanced List type shows up to 10 fields, lets you resize and sort columns, perform mass actions, and wrap text. To change the related list type, customize the related list component in the Lightning App Builder. Report Charts Report charts that you add to a page layout appear under the Details tab in Lightning Experience. When you add a report chart to a page layout, it can take a few moments before the chart appears on Lightning record pages. Sections Sections appear along with fields under the Details tab. A section with no header is incorporated into the section above it.

35 Extend Salesforce with Clicks, Not Code Control User Access to Fields

The Detail Page visibility setting controls whether the section header appears for both the detail page and the edit page. If the section header is set to display (or hide) on the detail page, the header also displays (or hides) on the edit page. Standard and Custom Buttons Standard and custom buttons are treated as actions in Lightning Experience, just like in the Salesforce mobile app.

Important: Custom buttons that call JavaScript aren’t supported in Lightning Experience.

Visualforce Pages Visualforce pages that you added to the page layout appear under the Details tab. Only Visualforce pages with Available for Lightning Experience, Experience Builder sites, and the mobile app enabled display in Lightning Experience on Lightning pages, utility bars, and the Salesforce mobile app. These page layout elements aren’t supported in Lightning Experience. • Expanded lookups • Mobile cards • S-controls • Section header visibility for Edit Page • Tags

Note: You can’t use the enhanced page layout editor to customize the layout of Lightning Experience record home pages.

SEE ALSO: Add Send an Email, Log a Call, New Event, and New Task Buttons to the Activity Composer Customize Record Page Settings

Tips for Optimizing Page Layouts for the Salesforce Mobile App

Here are some tips and tricks for making your existing page layouts more mobile-friendly. EDITIONS Page layouts containing dozens of fields and lots of related lists might be manageable when viewing records on a computer screen, but on a small mobile device, viewing that same record can be Available in: both Salesforce overwhelming. People accessing information using a mobile device are looking for a quick way to Classic and Lightning get what they need, and making your users sift through hundreds of fields and related lists just Experience doesn’t make sense. Available in: All editions When optimizing a page layout, consider: except Database.com • What are the important things to see at a glance? • What are the important moments for your users when they’re working in the Salesforce mobile app? • What actions or processes can you automate so that your users don’t have to manually do them?

The Key: Organize and Minimize Fields • Use sections to organize information logically, putting the most important things at the top of the page so they show up first. Your users don’t want to search for fields individually. Organizing similar fields in sections will help your users find what they need. They can then easily scroll down the page to the section they care about. • For accounts, contacts, and leads, you don’t need to put phone or email fields near the top. They’re already quickly accessible via the and icons on each record page’s action bar.

36 Extend Salesforce with Clicks, Not Code Control User Access to Fields

• You don't need to keep fields in one column, as the page will render dynamically. Salesforce for iOS or Android will reorder the fields into a single column, while web browsers can show two columns. • Put the most important fields into the compact layout—which drives record highlights and record preview cards in the mobile app—so they’re available right up front, and so your mobile users don’t have to drill into the record detail. We’ll get into compact layouts in more detail soon. • Keep the number of required fields to a minimum. Setting a field to required means it must appear on the detail page of all page layouts, so consider whether each field is truly required. You might have to convince stakeholders that a field isn’t actually necessary for a record to be saved. • If available in your organization, think about using record types so that fields that aren’t common to all records don’t have to appear on all records. • To reduce the number of fields on a screen, consider using default values for new records instead of having the user enter the data.

Manage Mobile Cards in the Enhanced Page Layout Editor

Add expanded lookups, components, and Visualforce pages to the Mobile Cards section of your EDITIONS page layout to have them show up as mobile cards in the Salesforce mobile app.

Important: The Mobile Cards section of the page layout editor is no longer supported as of Available in: both Salesforce Spring ’20. Items in the Mobile Cards section, such as components and expanded lookups, Classic and Lightning no longer display in the Salesforce mobile app. For more information, see Mobile Cards Are Experience Not Available in the New Salesforce Mobile App in the Salesforce Spring ’20 release notes. Available in: All editions except Database.com

USER PERMISSIONS

To customize page layouts: • Customize Application To view page layouts: • View Setup and Configuration

Customize Related Lists

You can customize the buttons, columns displayed, column order, and record sort order of related EDITIONS lists on record detail pages in Salesforce and the Salesforce Customer Portal. 1. Access the page layout editor. Available in: both Salesforce Classic and Lightning 2. To edit a related list, double-click its tab. If you’re using the enhanced page layout editor, you Experience can also click the wrench icon ( ). Available in: All Editions Note: You can’t customize the History related list because it links to data stored elsewhere. except Database.com

3. Select which fields to include in the related list, define the order in which the fields display, and select the record sort order. The default sort order is by record ID. You can include up to 10 USER PERMISSIONS fields per related list. To display more than four fields in Lightning Experience, edit the related To customize related lists: list component in the Lightning App Builder and choose Enhanced List as the related list type. • Customize Application 4. If desired, select other page layouts to apply your related list customizations to.

37 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Only layouts that include this related list appear in the list. Layouts that include related lists with the same customizations as the current layout had when you opened it are selected by default.

5. Click + in the Buttons section to customize which standard and custom buttons are displayed in the related list.

Note: The custom button must be defined for the object contained in the related list, not the parent object, and the button Type must be List Button. For example, to display a custom button on the Contacts related list of an account, define the custom button for contacts, not accounts.

6. If necessary, click Revert to Defaults to undo any customizations and use the default Salesforce settings in the related list. 7. Click OK to store your customizations. Changes aren’t saved until you save the page layout. 8. Select Overwrite users’ customized related lists to apply the related lists in the page layout to all users, even if they’ve already customized their display. 9. Save the page layout.

Note: You can enable related list hover links so that record detail pages include links for each related list at the top of the page. Users can hover over the link to display the corresponding related list in an interactive overlay to view and manage the related list items. Users can also click the link to jump to the content of the related list without scrolling down the page.

SEE ALSO: Control User Access to Fields Knowledge Article: Unable to Edit a Related List

Customize Detail Page Buttons

When customizing page layouts, you can control which standard and custom buttons are displayed EDITIONS and the order in which the custom buttons are shown. To customize the buttons on record detail pages: Available in: both Salesforce 1. From the management settings for the object whose page layout you want to customize, go Classic and Lightning to Page Layouts. Experience 2. Click Edit next to the page layout you want to customize. Available in: All Editions 3. Do one of the following. • In the original page layout editor, double-click the Detail Page Buttons item in the Button USER PERMISSIONS Section. To customize detail page – To hide any standard button, deselect the checkbox next to the button name. buttons: – To add or remove a custom button, select the button in the Available Buttons list, and • Customize Application click Add or Remove. – Sort custom buttons by selecting them and clicking Up or Down. – To undo your customizations and restore default settings, click Revert to Defaults. – Click OK to close the popup when you are done.

• In the enhanced page layout editor, select the Buttons category on the palette and drag one or more buttons from the palette to the buttons section on the page layout. Standard buttons must go in the standard buttons area, and custom buttons must go in the custom buttons area. To remove a standard or custom button from the page layout, drag the button to the palette.

4. Click Save on the page layout.

38 Extend Salesforce with Clicks, Not Code Control User Access to Fields

5. Click Save.

SEE ALSO: Override Standard Buttons and Tab Home Pages Define Custom Buttons and Links Find Object Management Settings

Customize Page Layouts with the Original Page Layout Editor

Use the original page layout editor to customize page layouts in Salesforce, the Self-Service Portal, EDITIONS and the Salesforce Customer Portal.

Note: We recommend using the enhanced page layout editor instead of the original page Available in: Salesforce layout editor because it offers more features and an easier-to-use interface. Classic 1. Access the page layout editor. Available in: All Editions • Edit Page Layouts for Standard Objects • Edit Page Layouts for Custom and External Objects USER PERMISSIONS

2. If tags are enabled, specify whether personal and public tags should be included in the header To customize page layouts: section of the page layout. Users can tag a record only if personal or public tags are included • Customize Application here. • To add personal or public tags, select Header Items from the View dropdown list and then drag the Personal Tags or Public Tags items to the header section. You can’t change the order in which personal and public tags appear when both are in the header section at the same time. • To remove tags, drag the Personal Tags and Public Tags items from the header section to the area under the View dropdown list.

3. To customize buttons, double-click Detail Page Buttons in the Button section. 4. To arrange fields, custom s-controls, Visualforce pages, custom links, and related lists on the layout, select one or more items from the box on the right and drag them to the desired location. You can drag up to 20 s-controls, 20 Visualforce pages, 20 expanded lookups, and 100 related lists onto a page layout. There are no limits on custom links.

Note: You can add a Visualforce page to a page layout only if the standard controller on the Visualforce page is set to the object for which you’re creating the page layout. If you don’t have any Visualforce pages with a standard controller set to that object, the Visualforce Pages category doesn’t appear in the palette.

5. To set which fields are required and read only, select one or more fields and click Edit Properties. • You can change custom fields only if they are not universally required fields. • Fields marked as read only are always editable by administrators and users with the Edit Read Only Fields permission. • If you make a picklist field read only, all new records contain the default value for that picklist. • Auto-number fields are always read only. • If you make the opportunity Probability field read only, the Probability value still updates automatically when a user changes the Stage value of an opportunity. • In Professional, Enterprise, Unlimited, Performance, and Developer Editions, field-level security settings override the field properties you set here if the field-level security is more restrictive than the page layout setting.

6. To change the properties of an s-control or Visualforce page, double-click it and set the following attributes.

39 Extend Salesforce with Clicks, Not Code Control User Access to Fields

• Width sets the horizontal size in pixels or a percent. • Height sets the vertical size in pixels. • Show scrollbars determines whether the iFrame in which the s-control displays contains scrollbars when necessary. • Show label determines whether the page layout includes the label of the custom s-control. Remove the label to display the custom s-control in a wider area.

7. To organize the page using sections, click Edit next to an existing page section, or click Create New Section. 8. To customize related lists on the page layout, double-click a related list in the Related List section. Some related lists aren’t customizable because they link to data rather than store it. You can move your cursor over any related list section to see if it is customizable. Also, lookup fields are not available for display on their corresponding lookup related list. For example, the case lookup field on an account page layout isn’t available when editing the cases related list.

9. To apply the related lists in the page layout to all users, even if they’ve already customized their display, select Overwrite users’ customized related lists. 10. To review the page layout, click Preview. From the preview in Enterprise, Unlimited, Performance, and Developer Editions, select a profile to see how the pages look for users with different profiles. Most related lists’ columns preview without data. 11. Click Save to finish. Alternatively, click Quick Save to save and continue editing the page layout. In Professional, Enterprise, Unlimited, Performance, and Developer Editions: • To choose which related records display in the Console tab’s mini view, click Mini Console View. • To define the mini page layouts of the records that appear in the Console tab’s mini view, click Mini Page Layout.

Note: You can’t define mini console views or mini page layouts for the Close Case Layout or the Log a Case Page and View Cases Page layouts on the Self-Service Portal. In Enterprise, Unlimited, Performance, and Developer Editions: • You can assign page layouts for different profile and record type combinations. • You can set field-level security to restrict field access further.

Notes on Using the Original Page Layout Editor

SEE ALSO: Notes on Using the Original Page Layout Editor Customize Related Lists Page Layouts

Notes on Using the Original Page Layout Editor

• When customizing page layouts for tasks, you can select the following checkboxes. (These EDITIONS options are unavailable when user control over task assignment notifications is enabled.) – Show Task Email Notification checkbox displays the Send Available in: Salesforce Notification Email checkbox when users create or edit a task. Classic – Select Task Email Notification checkbox by default selects the Available in: All Editions Send Notification Email checkbox by default when users create or edit a task. Note that a user's personal preference for defaulting the state of the checkbox takes precedence over the organization-wide setting.

40 Extend Salesforce with Clicks, Not Code Control User Access to Fields

• When customizing page layouts for cases, you can select the following checkboxes. (These options are unavailable when user control over task assignment notifications is enabled.) – Show on edit page Case Assignment checkbox displays the Assign using active assignment rules checkbox when users create or edit a case. – Default Case Assignment checkbox automatically runs case assignment rules. If both Show on edit page and Select by default are selected, the assignment checkbox is selected by default, but users can deselect it to override the assignment rule.

– Show Case Email Notification checkbox displays the Send Notification Email checkbox when users create or edit a case. – Select Case Email Notification checkbox by default selects the Send Notification Email checkbox by default when users create or edit a case.

• Page layouts for the user object only include custom fields, custom links, s-controls, and Visualforce pages. Tagging, related lists, custom buttons, and standard field customizations are not included on page layouts for the user object. Also, field-level security is available only for custom fields on the user object. • You can define mini page layouts for the user object; however, you cannot add standard fields or related lists. Also, a customized mini page layout won’t display in the Agent console. • Users can import values into a field only if they have read and edit access. User permissions, page layout assignments, and field-level security settings determine field access. • In Personal, Contact Manager, and Group Editions, page layouts control which fields users can access in related lists, list views, reports, Connect Offline, email and mail merge templates, custom links, and when synchronizing data. In Professional, Enterprise, Unlimited, Performance, and Developer Editions, this access is controlled by field-level security. • In Professional, Enterprise, Unlimited, Performance, and Developer Edition, individual users can customize which tabs and related lists display for their personal use. • When editing a person account page layout, if you add Shipping Address next to Billing Address in the Address Information section, a link will display on the person account edit page that allows you to copy the billing address to the shipping address. Also, an equivalent link appears if you add Other Address to the Address Information section. • Some items can only be moved to certain sections on the page layout. For example, you can drag a custom s-control to any field section on the page layout but not a related list section or button section. • Create the appropriate buttons before editing your page layout. For example, create an account custom button for the detail page and a contact custom list button before putting them both on an account page layout. • If you use the original page layout editor to view a page layout that was created in the new page layout editor, the original page layout editor will show any blank spaces you added. You cannot move or add blank spaces in the original page layout editor, but you can remove them by dragging them to the box on the right.

SEE ALSO: Customize Page Layouts with the Original Page Layout Editor

41 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Compact Layouts

A compact layout displays a record’s key fields at a glance in the Salesforce mobile app, Lightning EDITIONS Experience, and in the Outlook and Gmail integrations. Creating and customizing compact layouts for objects isn't required, because system defaults are Available in: Salesforce provided out of the box. However, we recommend using compact layouts to put important fields Classic (not available in all into object record headers—and elsewhere—to help your users get the information they need orgs) and Lightning quickly. Experience In the Salesforce mobile app, the fields that you assign to a compact layout appear in: Available in: All editions except Database.com • An object record’s highlights area (shows up to ten fields) • Expanded lookup cards on a record’s related information page (shows the first four fields) In Lightning Experience, up to the first seven fields in a compact layout appear in the highlights panel of an object record. (On smaller screens, the highlights panel displays fewer fields.) When a user hovers over a lookup relationship field on the object record page, a highlights panel for that field also displays the first seven fields from the compact layout. Highlights panels display the first field from the compact layout at the top in an accented .

In the Outlook and Gmail integrations, up to the first three fields in a compact layout appear for records related to an email or event. As with page layouts, there are separate compact layouts for each object. By default, each object derives its record highlight fields, preview cards, and action-related feed items from the predefined set of fields in the object’s read-only, system default compact layout.

42 Extend Salesforce with Clicks, Not Code Control User Access to Fields

You can create custom compact layouts on an object-by-object basis. After you create one or more custom compact layouts, you set one as the primary compact layout for the object. The primary compact layout is then used as the new default for that object. If you have record types associated with an object, you can override the object’s primary compact layout and assign different compact layouts to some or all the record types. Each record type can have only one compact layout assigned to it. Event and task compact layouts determine the fields that appear in the details section when you expand an activity in the activity timeline in Lightning Experience. When you change the compact layout for tasks in the activity timeline, you also impact the fields that show up in the highlights area on tasks, in tasks lists, and everywhere else the compact layout is used.

Create Compact Layouts Use compact layouts to customize the fields that display for object records when viewed in the Salesforce mobile app and Lightning Experience. Assign Compact Layouts to Record Types As with page layouts, there are separate compact layouts for each object. By default, each object derives its record highlight fields, preview cards, and action-related feed items from the predefined set of fields in the object’s read-only, system default compact layout. You can create custom compact layouts on an object-by-object basis. After you create one or more custom compact layouts, you set one as the primary compact layout for the object. The primary compact layout is then used as the new default for that object. Compact Layout Limitations and Considerations Keep these limitations and considerations in mind when using compact layouts.

SEE ALSO: Activity Timeline Customization Considerations

Create Compact Layouts

Use compact layouts to customize the fields that display for object records when viewed in the EDITIONS Salesforce mobile app and Lightning Experience. 1. From the management settings for the object that you want to edit, go to Compact Layouts. Available in: both Salesforce Classic and Lightning 2. Create a new compact layout and give it a label. Experience 3. Add up to 10 fields. Available in: All editions Tip: Put the object’s Name field first to provide context for your users when they view a except Database.com record.

4. Sort the fields by selecting them and clicking Up or Down. USER PERMISSIONS

The order you assign to the fields determines the order in which they display. To customize compact 5. Save the layout. layouts: • Customize Application 6. To set the compact layout as the primary compact layout for the object, click Compact Layout To view compact layouts: Assignment. • View Setup and Example: Here’s a sample compact layout edit page for the Account object. It shows the Configuration name of the layout and a list of fields to display.

43 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Here’s the related page for the same account object in Lightning Experience, displaying six of the eight fields assigned to the compact layout. You can see the account’s name, phone number, business hours, website, owner, and type at the top of the page.

And here’s what that same account record looks like in the mobile app.

44 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Note: Up to ten fields on your compact layout populate the record highlights section at the top of each record view in the Salesforce mobile app. The record highlights section in Lightning Experience uses the first seven fields on the compact layout. However, the number of fields that display can vary based on the width of your screen, which record page is being viewed, and the permissions of the user.

SEE ALSO: Customize Case Hovers in Lightning Experience

Assign Compact Layouts to Record Types

As with page layouts, there are separate compact layouts for each object. By default, each object EDITIONS derives its record highlight fields, preview cards, and action-related feed items from the predefined set of fields in the object’s read-only, system default compact layout. You can create custom compact Available in: both Salesforce layouts on an object-by-object basis. After you create one or more custom compact layouts, you Classic and Lightning set one as the primary compact layout for the object. The primary compact layout is then used as Experience the new default for that object. Compact layouts are If you have record types associated with an object, you can override the object’s primary compact available in: All editions layout and assign different compact layouts to some or all the record types. Each record type can except Database.com have only one compact layout assigned to it. Record types are available 1. From the management settings for the object that you want to edit, go to Compact Layouts. in: Professional, Enterprise, Tip: For Salesforce Knowledge articles, from Setup, enter Knowledge Article Performance, Unlimited, Types in the Quick Find box, then select Knowledge Article Types, click the name of and Developer Editions an article type, then scroll down to the Compact Layouts related list. USER PERMISSIONS 2. Click Compact Layout Assignment. 3. Select a compact layout to use as the primary compact layout for this object. To customize compact layouts: 4. In the Record Type Overrides section, select one or more record types to which you want to • Customize Application assign a compact layout. To view compact layouts: If you don’t have record types set for the object, you won’t see this section. If you don’t set any • View Setup and record type overrides, all record types use the object’s primary compact layout by default. Configuration

45 Extend Salesforce with Clicks, Not Code Control User Access to Fields

Some record types in the list might be inactive. You can assign a compact layout to an inactive record type.

5. Select a compact layout from the Compact Layout To Use drop-down list to assign it to the selected cells. 6. Click Save.

SEE ALSO: Find Object Management Settings

Compact Layout Limitations and Considerations

Keep these limitations and considerations in mind when using compact layouts. EDITIONS

Considerations Available in: Salesforce Classic (not available in all • Up to ten fields on your compact layout populate the record highlights section at the top of orgs) and Lightning each record view in the Salesforce mobile app. The record highlights section in Lightning Experience Experience uses the first seven fields on the compact layout. However, the number of fields that display can vary based on the width of your screen, which record page is being viewed, Available in: All editions and the permissions of the user. except Database.com • Changes you make to a compact layout are reflected in both Lightning Experience and the Salesforce mobile app. • Each record type can have only one compact layout assigned to it. However, the same compact layout can be associated with multiple record types. • Compact layouts aren’t assigned to profiles or individual users. To display different sets of fields in records by use case or role, create record types for the object, then assign the appropriate custom compact layout to each record type. • If a user doesn’t have access to one of the fields that you assign to a compact layout, the next field on the layout is used. • A compact layout must contain at least one field. • Don’t make the primary field a lookup field. Doing this could result in navigation issues in Lightning Experience and the Salesforce mobile app. • Removing a field from a page layout doesn’t remove it from the object’s compact layout. The two layout types are independent. • If you change a field on a compact layout to an unsupported type, the field is removed from the compact layout. • Before you can delete a compact layout that’s set as the primary compact layout for the object, you must choose another compact layout to replace it. • In the Salesforce mobile app, tasks automatically show whether a task is open or closed and the due date (depending on a user’s access to activity dates). When customizing a task compact layout, you don’t have to add these fields to the Selected Fields list. • Compact layouts installed from a managed package are editable. However, we recommend against editing compact layouts installed from a package, as doing so can cause destructive changes to your org. Instead, clone the installed compact layout and make your changes to the clone. • Compact layout assignments are subscriber controlled. If a user installs a managed package that contains a compact layout and then changes the compact layout’s assignment in their org, the compact layout’s assignment isn’t overridden when they later upgrade the package. • These considerations apply to Chatter: – In the full Salesforce site, a compact layout determines which fields appear in the Chatter feed item that appears after a user creates a record with a quick action.

46 Extend Salesforce with Clicks, Not Code Control User Access to Fields

– To avoid inadvertent sharing of information through the feed, the Task page layout determines the fields shown in the Chatter feed items for tasks created using a quick action. – Primary compact layouts determine which fields are shown in Chatter personal digest emails.

Limitations • A compact layout can only contain fields from its object, including a formula field that is a cross-object reference to another object. • Fields that aren’t available in SOAP API don’t show up on compact layouts in the Salesforce mobile app. • Compact layouts support all field types except: – text area – long text area – rich text area – multi-select picklist

SEE ALSO: Create Compact Layouts Compact Layouts Customize Case Hovers in Lightning Experience

Select Which Fields Appear in the Recently Viewed List

As a Salesforce admin, you can customize the Recently Viewed list that appears on the home page EDITIONS for most standard and custom objects. Choose and order the fields to display so that your users see the information that’s most important for your company. Available in: Lightning Experience Note: These steps work in Lightning Experience. If you see the App Launcher icon ( ) on the left side of the navigation bar at the top of your screen, you're in Lightning Experience. If Available in: Essentials, not, you're in Salesforce Classic. Group, Professional, Enterprise, Performance, For most list views, your users can select which fields to display and how to order the view columns. Unlimited, and Developer However, they can’t edit the recent records quick list on object home pages. Only Salesforce admins Editions can select and order the fields to display for the recent records quick list. Admins can’t make any other changes to this default list. USER PERMISSIONS 1. From Setup, at the top of the page, select Object Manager. 2. Click the label name of the object for the Recently Viewed list you want to modify. To customize recent records list 3. From the menu of links at the top of the page, click Search Layouts. • Customize Application 4. In the far right of the Search Results row, click and select Edit. Recently viewed lists use the Search Results search layout in Lightning. In Classic, recently viewed lists use the Tab search layout.

5. To add columns to the Recently Viewed list, select one or more fields from Available Fields and click Add. To remove columns, select one or more fields from Selected Fields and click Remove. 6. Order columns by selecting one or more fields from Selected Fields and clicking Up or Down. 7. Click Save.

47 Extend Salesforce with Clicks, Not Code Custom Tabs

Example: Your users collaborate on opportunities. To make it easy to see who worked on a recent opportunity last, select Last Modified By from the Available Fields list. Click Add to move it to Selected Fields. Now this information appears on the Recently Viewed list on the Opportunities home page. In the Salesforce mobile app, the Recently Viewed list is the same list view as the desktop list view, with a few differences. • The Recently Viewed list shows up to two fields for each record. To see more than two fields, tap . • The fields shown come from the search results layout for the object. Any user with the Edit user permission for an object can add up to 10 fields. On desktop, go to Setup > Customize > {Object Name} > Search Layouts > Search Results. A user’s changes also affect which fields are shown on the search results page.

Note: In the Salesforce mobile app, a Recent list appears below the list views on an object’s home page. It’s an automatically generated list of recently accessed records. It isn’t a list view and can’t be modified.

Custom Tabs

Custom tabs let you display custom object data or other web content in Salesforce. When you add EDITIONS a custom tab to an app in Salesforce Classic, it appears as a tab. When you add a custom tab to an app in Lightning Experience, it appears as an item in the app’s navigation bar and in the App Available in: both Salesforce Launcher. Classic (not available in all Custom tabs show custom object data or other web content embedded in the app. You can create orgs) and Lightning any of these types of custom tabs. Experience Custom Object Tabs Custom Object Tabs and Custom object tabs (available only at an app level and not on subtab apps) show the data of Web Tabs available in: your custom object. Custom object tabs look and function just like standard tabs. Contact Manager, Group, Professional, Enterprise, Web Tabs Performance, Unlimited, Custom web tabs show any external web-based application or web page. You can design web and Developer Editions tabs to include the sidebar or span the page without the sidebar. Visualforce Tabs available Visualforce Tabs in: Contact Manager, Visualforce tabs show data from a Visualforce page. Visualforce tabs look and function just like Group, Professional, standard tabs. Enterprise, Performance, Lightning Component Tabs Unlimited, and Developer Lightning component tabs make Lightning components available in the Salesforce mobile Editions apps and in Lightning Experience. Lightning components aren’t supported in Salesforce Classic. Lightning Page Tabs available in: All Editions Note: To expose Lightning components via Lightning component tabs, you must enable except Database.com and deploy My Domain. Lightning Page Tabs Lightning page tabs let you add Lightning app pages to the Salesforce mobile app and Lightning USER PERMISSIONS Experience navigation bars. To create and edit custom In Salesforce Classic, Lightning page tabs don’t appear on the All Tabs page when you click . tabs: Lightning page tabs also don’t appear in the Available Tabs list when you customize the tabs • Customize Application for your apps. Subtab apps support only web tabs and Visualforce tabs. Delegated administrators who can manage specified custom objects can also create and customize tabs for those custom objects.

48 Extend Salesforce with Clicks, Not Code Custom Tabs

In Lightning Experience, Lightning page tabs, Visualforce tabs, and Lightning component tabs have a fixed, friendly URL structure of /lightning/n/customTabDevName.

SEE ALSO: Create Custom Apps for Salesforce Classic What is a Subtab App?

Create Web Tabs

Build web tabs so that your users can use your web applications or other websites from within the EDITIONS application. 1. From Setup, enter Tabs in the Quick Find box, then select Tabs. Available in: both Salesforce Classic (not available in all 2. Click New in the Web Tabs related list. orgs) and Lightning 3. Choose a layout for the new tab. The full page width spans across the entire page without the Experience sidebar, while the column style allows users to view the sidebar. Custom Object Tabs and 4. Click Next. Web Tabs available in: 5. Enter a label to display on the tab. Contact Manager, Group, Professional, Enterprise, 6. Click the Tab Style lookup icon to display the Tab Style Selector. Performance, Unlimited, If a tab style is already in use, a number enclosed in brackets [] appears next to the tab style and Developer Editions name. Hover your mouse over the style name to view the tabs that use the style. Click Hide Visualforce Tabs available styles which are used on other tabs to filter this list. in: Contact Manager, Group, Professional, 7. Click a tab style to select the color scheme and icon for the custom tab. Optionally, click Create Enterprise, Performance, your own style on the Tab Style Selector dialog to create a custom tab style if your org has Unlimited, and Developer access to the Documents tab. To create your own tab style: Editions a. Click the Color lookup icon to display the color selection dialog and click a color to select Lightning Page Tabs it. available in: All Editions b. Click Insert an Image, select the document folder, and select the image you want to use. except Database.com c. Select a file and click OK. The New Custom Tab wizard reappears.

8. Change the content frame height if necessary. USER PERMISSIONS 9. Enter a description of the tab, if desired, and click Next. To create and edit custom tabs: 10. Enter the URL or choose the custom s-control that you want to display in the tab. Optionally, • Customize Application copy and paste any merge fields for data that you want dynamically replaced in the link. Click Preview Web Tab to display your web tab.

Note: Only User, organization, and API merge fields are supported for web tabs.

11. For a URL, choose an encoding setting and click Next. 12. Add the web tab to the appropriate profiles. Choose Default On, Default Off, or Tab Hidden to determine whether the custom tab is visible to users with that profile. You can change this setting later. 13. Click Next. 14. Specify the custom apps that should include the new tab. 15. Select Append tab to users' existing personal customizations to apply the tab visibility settings to all users.

49 Extend Salesforce with Clicks, Not Code Custom Tabs

16. Click Save.

Create a Custom Object Tab

Create a custom object tab to give your users access to custom object data and records in an app. EDITIONS Custom object tabs are available only at the app level, not on subtab apps. Custom object tabs look and function just like standard tabs. Available in: both Salesforce When you add a custom object tab to an app in Salesforce Classic, it appears as a tab. When you Classic (not available in all add a custom object tab to an app in Lightning Experience, it appears as an item in the app’s orgs) and Lightning navigation bar and in the App Launcher. Experience 1. From Setup, in the Quick Find box, enter Tabs, then select Tabs. Custom Object Tabs and Web Tabs available in: 2. Click New in the Custom Object Tabs related list. Contact Manager, Group, 3. Select the custom object to appear in the custom tab. If you haven’t created the custom object, Professional, Enterprise, click create a new custom object now and follow the instructions in Create a Custom Object Performance, Unlimited, on page 146. and Developer Editions The label of the new tab is the same as the plural version of the custom object label. Visualforce Tabs available in: Contact Manager, 4. Click the Tab Style lookup icon to show the Tab Style Selector. Group, Professional, If a tab style is already in use, a number enclosed in brackets [] appears next to the tab style Enterprise, Performance, name. Hover over the style name to view the tabs that use the style. Click Hide styles which Unlimited, and Developer are used on other tabs to filter this list. Editions Lightning Page Tabs 5. Click a tab style to select the color scheme and icon for the custom tab. available in: All Editions If your org has access to the Documents tab, click Create your own style on the Tab Style except Database.com Selector dialog to create a custom tab style.

a. Click the Color lookup icon to show the color selection dialog and click a color to select it. USER PERMISSIONS b. Click Insert an Image, select the document folder, and select the image you want to use. To create and edit custom Alternatively, click Search in Documents, enter a search term, and click Go! to find a tabs: document file name that includes your search term. • Customize Application Note: This dialog only lists files in document folders that are under 20 KB and have the Externally Available checkbox selected in the document property settings. If the document used for the icon is later deleted, Salesforce replaces it with a default multicolor block icon ( ).

c. Select a file and click OK. The New Custom Tab wizard reappears.

6. Optionally, choose a custom link to use as the introductory splash page when users initially click the tab. 7. Enter a description of the tab, if desired, and click Next. 8. Choose the user profiles that you want to have access to the new custom tab. For Professional Edition users and Salesforce Platform One license users, tab visibility is set to Default On.

Note: A custom object that's associated with a custom tab is searchable (by default), even if users don't add the tab for display.

9. Specify the custom apps that should include the new tab.

50 Extend Salesforce with Clicks, Not Code Custom Tabs

10. Select Append tab to users' existing personal customizations to add the tab to your users’ customized display settings if they have customized their personal display. 11. Save the tab. Depending on the visibility settings you selected, you see the tab right away.

SEE ALSO: Custom Tabs Make Search Faster

Create Lightning Page Tabs

Before you can include a Lightning app page in the Salesforce mobile apps or in a Lightning app, EDITIONS you must create a custom tab for it. When you first activate an app page in the Lightning App Builder, a tab is created for the page as Available in: both Salesforce part of the activation process. You can also create a tab for the page manually in Setup before you Classic (not available in all activate it. orgs) and Lightning Experience You can create a custom tab only for an App Page type of Lightning page. 1. From Setup, enter Tabs in the Quick Find box, then select Tabs. Available in: All editions 2. Click New in the Lightning Page Tabs related list. USER PERMISSIONS 3. Choose a Lightning page for the tab. 4. Enter a label. To create and edit custom tabs: This text is used as the display name for the Lightning page. • Customize Application 5. Select a tab style to set a color scheme and icon for the Lightning page tab. 6. Enter a description of the tab, if desired, and click Next. 7. Choose the user profiles the new custom tab is available for.

Note: In Salesforce Classic, the Default On and Default Off options for Lightning page tabs don’t work the same way as for other custom tabs. The Lightning page menu item appears for the selected profiles in Salesforce for Android and Salesforce for iOS whether you choose Default On or Default Off. Select the Tab Hidden option to hide the Lightning page for the selected profiles.

8. Click Save.

51 Extend Salesforce with Clicks, Not Code Custom Tabs

Tip: When creating a custom icon for your Lightning page tab, follow these image guidelines. The icon should: • Be less than 10k in size • Be 120 x 120 pixels • Be a PNG with a transparent background • Have a resolution of 72 dpi • Not include a color background • Not include outer shadows on the inner icon graphic

Custom Tab Considerations

When working with custom tabs, keep these considerations in mind. EDITIONS • The custom tabs limit is a fixed number based on edition and can’t be increased. For more information, contact Salesforce. Available in: both Salesforce • If you choose Default On or Default Off when setting custom object tab visibility, an option is Classic (not available in all added to the Create New dropdown list in the Salesforce Classic sidebar so that users with the orgs) and Lightning Experience Create permission can quickly create a record. For example, if the custom object displayed in the custom tab is named Expenses, an Expense option appears in this list. Custom Object Tabs and • A custom object that's associated with a custom tab is searchable (by default), even if users Web Tabs available in: don't add the tab for display. Contact Manager, Group, Professional, Enterprise, • A Web tab or custom link could display a blank page if the embedded site: Performance, Unlimited, – Has been set to deny the loading of its content in a frame. and Developer Editions – Has been set to allow the loading of its content in a frame only if the same site is delivering Visualforce Tabs available the content. in: Contact Manager, – Contains a mix of secure and unsecure content, and the user’s browser has been configured Group, Professional, to block mixed active content. Enterprise, Performance, Unlimited, and Developer To resolve this issue, try these workarounds. Editions – Set your custom link to either open in a new window or display in the existing window Lightning Page Tabs without the sidebar or header. available in: All Editions – Move the URL from a Web tab into a custom link instead, and set the URL to either open except Database.com in a new window or display in the existing window without the sidebar or header. – If the site you’re embedding has an HTTP prefix and mixed active content, try changing the prefix to HTTPS. If the embedded site has a valid security certificate and it hasn’t blocked itself from being displayed in frames, using HTTPS as the prefix allows the site to display.

• In Salesforce Classic, Lightning page tabs don’t display on the All Tabs page when you click . Lightning page tabs also don’t appear in the Available Tabs list when you customize the tabs for your apps. • In Salesforce Classic, the Default On and Default Off options for Lightning page tabs don’t work the same way as for other custom tabs. The Lightning page menu item appears for the selected profiles in Salesforce for Android and Salesforce for iOS whether you choose Default On or Default Off. Select the Tab Hidden option to hide the Lightning page for the selected profiles.

52 Extend Salesforce with Clicks, Not Code Custom Help Content

Custom Help Content Tailor help so that users understand how to work within your unique implementation of Salesforce. You can add learning in the flow of work in several ways. Add custom help for a page, app, object, or org level, or provide links to help in the Utility Bar, Path, or as a text box on the page. Show users custom resources in a Lightning Experience welcome mat when they first log in. Or, add micro-learning prompts and walkthroughs to your app to reach users with important news, training, and on-boarding information.

Help Salesforce Classic Lightning Experience Field-Level Help—Detail the purpose and function of a standard or custom field.

Object-Level Help in Salesforce Classic—Help your users by providing object-level help for all custom objects and external objects.

Learning Paths—Create a personalized and always-available learning experience for your users.

Customize the Help Menu in Lightning Experience—Supplement the recommended resources by adding a section with links to your own content.

In-App Guidance—Use prompts to reach users directly with news, training, and on-boarding messages.

Welcome Mat—Provide resources the first time that users log in to Lightning Experience.

Utility Bar—Use the Notes component to add links to custom help.

Rich Text Component—Add simple HTML to your Lightning page.

Guidance for Success on Path—Give key coaching details to support users.

In-Dashboard Videos for Einstein Not applicable - cloud-based platform Not applicable - cloud-based platform Analytics—Provide customized instruction that helps users get the most out of dashboards.

Custom Notification from a Process—Alert an account owner if a new support case is logged while trying to close a deal, or send a notification for a workflow built entirely with custom objects.

53 Extend Salesforce with Clicks, Not Code Custom Help Content

Help Salesforce Classic Lightning Experience

myTrailhead—Your company’s content and Not applicable Not applicable brand on Trailhead. You can offer the same bite-size, skill-based, gamified learning experience as Salesforce Trailhead.

Field-Level Help Field-level help lets you provide help text detailing the purpose and function of any standard or custom field. Before defining field-level help, review these implementation tips and best practices. Custom Help in Lightning Experience In Lightning Experience, in-app guidance allows you to use prompts and walkthroughs to reach users directly with news, training, and onboarding messages. Customizing the Help Menu allows you to supplement the recommended resources by adding a section with links to your own content. Admins customize the Learning Paths panel by selecting learning content and assigning it to a specific audience and location in the app. Custom Help in Salesforce Classic In Salesforce Classic, object-level help replaces the links for a custom object or external object page. Replace built-in Salesforce Help with documentation that’s customized for your users.

Field-Level Help Field-level help lets you provide help text detailing the purpose and function of any standard or custom field. Before defining field-level help, review these implementation tips and best practices.

Implementation Tips • Field-level help is enabled by default for all editions. • Field-level help isn’t available for some standard fields, including fields on the User object, system read-only fields, auto-number fields, multi-currency fields, Ideas fields, and Experience Cloud site fields. • The help text for a field is automatically added to a package when you add the associated field to any AppExchange package. • In a managed package, the help text is locked to the developer, giving installers full capabilities to change it.

Best Practices • Because your custom help text displays on both edit and detail pages, avoid instructions for entering data. Instead, construct help text that defines the field's purpose, such as: The maximum discount allowed for this account.

• Provide information in your help text about the attributes of the field, such as: A detailed description of the purpose for the expense report. Up to 32 KB of data are allowed. Only the first 255 characters display in reports.

• Provide examples in your help text that help users understand the field's meaning clearly, such as: The four-digit promotional code used to determine the amount charged to the customer, for example, 4PLT (for level-four platinum pricing).

• If your org uses more than one language, provide translations for your Help Text using the Translation Workbench.

54 Extend Salesforce with Clicks, Not Code Custom Help Content

Define Field-Level Help Define custom help text for your organization’s fields to provide users with a helpful description. Help text can be defined for standard and custom fields on all detail and edit pages where the field displays. Users can view the field-level help text by hovering over the Info icon next to the field.

SEE ALSO: Custom Help Content

Define Field-Level Help

Define custom help text for your organization’s fields to provide users with a helpful description. EDITIONS Help text can be defined for standard and custom fields on all detail and edit pages where the field displays. Users can view the field-level help text by hovering over the Info icon next to the field. Available in: both Salesforce 1. From the management settings for the field’s object, go to Fields. Classic and Lightning Experience 2. Click Edit next to the field. 3. In the Help Text field, enter the text you want displayed. The text displays when a user Available in: All Editions hovers the mouse over the Info icon that appears next to the field on a detail or edit page. You except Database.com can enter up to 510 characters. 4. Click Save. USER PERMISSIONS

Note: If the object you’re modifying is exposed in an Experience Cloud site, field-level help To define or change is visible to site members, including unlicensed users, partners, and customers. Make sure field-level help: the information you provide in field-level help accounts for all audiences and doesn’t contain • Customize Application business-sensitive information.

SEE ALSO: Custom Help Content Field-Level Help Find Object Management Settings

Custom Help in Lightning Experience In Lightning Experience, in-app guidance allows you to use prompts and walkthroughs to reach users directly with news, training, and onboarding messages. Customizing the Help Menu allows you to supplement the recommended resources by adding a section with links to your own content. Admins customize the Learning Paths panel by selecting learning content and assigning it to a specific audience and location in the app.

If you... Then consider...

Have a few, key resources to share with your users. Help Menu Provide a space for users to access critical resources anytime, anywhere in the org. Add a custom section to the Help Menu with links to your FAQs, Trailhead mixes, Salesforce Help documents, and more. Centralize learning resources in the Help Menu, which users can access by clicking the ? in the global header.

55 Extend Salesforce with Clicks, Not Code Custom Help Content

If you... Then consider...

Have dozens of resources to share with your users. Learning Paths Require users to complete training by a certain date. Manage, assign, and track all your longform in-depth learning Have training created for specific pages or specific users. resources. Display public Trailhead and myTrailhead modules or URLs to resources in specific locations for specific users with a contextual learning panel. Apply a due date and track completion metrics. Centralize all learning resources on the Learning homepage. Earn Trailhead and myTrailhead badges inside the app.

Want to nudge, prompt, or remind users of important In-App Guidance announcements or features. Provide targeted, micro-learning moments to boost feature adoption. Pick from targeted, floating, and docked prompts or walkthroughs. Design the guidance, select the target audience, and specify where it appears and for how long. Add links to internal wikis, training, or PDFs for a custom call to action. Use built-in engagement tracking.

In-App Guidance in Lightning Experience In Lightning Experience, add prompts and walkthroughs to your app to share information, train, or onboard users. Write the content, select the target audience, and specify where it appears and for how long. You can add multiple items to the same page, but they don’t appear at the same time. By default, a user sees only one item per 24 hours, per app. Salesforce shows it again or cancels scheduled recurrences based on whether the user interacts with or ignores the prompt or walkthrough. Best Practices for Learning Paths and the Help Menu Whether you have minimal time to devote to end-user training or your company has a full-fledged training program, Help Menu and Learning Paths can help. Learn how to define an in-app help strategy and get tips for customizing Learning Paths. Learning Paths Bring all the fun of Trailhead inside the workspace to create a personalized and always-available learning experience for your users. The Learning Paths icon in the global header is visible to all users. It opens a panel where users can read Trailhead and myTrailhead content and earn badges inside the app. Admins customize the panel by selecting learning content and assigning it to a specific audience and location in the app. Choose modules from Trailhead or myTrailhead and add links to other training resources for the ultimate custom training experience. Admins can let other stakeholders, such as trainers or sales team managers, assign and manage learning items. Customize the Help Menu in Lightning Experience The Help icon in the header opens a menu of contextual help topics, Trailhead modules, videos, and more items chosen by Salesforce. You can supplement the recommended resources by adding a section with links to your own content. Your section appears at the top of the Help Menu on each page. There’s only one custom Help Menu section per org. You can’t add links to the Getting Started, Help For This Page, or More Resources sections.

56 Extend Salesforce with Clicks, Not Code Custom Help Content

In-App Guidance in Lightning Experience In Lightning Experience, add prompts and walkthroughs to your app to share information, train, or onboard users. Write the content, select the target audience, and specify where it appears and for how long. You can add multiple items to the same page, but they don’t appear at the same time. By default, a user sees only one item per 24 hours, per app. Salesforce shows it again or cancels scheduled recurrences based on whether the user interacts with or ignores the prompt or walkthrough. Watch the video to learn how to navigate the In-App Guidance Setup page and builder. Get Started with In-App Guidance in Lightning Experience

In-App Guidance Best Practices in Lightning Experience From writing engaging titles to choosing the right resources, review Salesforce recommendations for creating more effective prompts and walkthroughs. Get inspired with examples for common use cases such as onboarding and training. Considerations for In-App Guidance in Lightning Experience Before creating prompts and walkthroughs for your users, understand the settings and their behavior. Define Walkthroughs in Lightning Experience Create a hands-on interactive tour to guide users through onboarding or feature introduction with a series of step-by-step prompts. Define Prompts in Lightning Experience Reach users inside the app with small windows displaying news, training, feature adoption, and onboarding messages. Test In-App Guidance in Lightning Experience Testing lets you log in as specific users to verify that they see the correct prompt or walkthrough. While in test mode, Salesforce ignores the schedule settings and timed delay so you can test more than one item at a time. User interactions aren’t logged, so metrics aren’t affected. Monitor In-App Guidance in Lightning Experience Learn how to resolve and clear in-app guidance errors and warnings. Use metrics to fine-tune the location, position, content, and schedule settings. Salesforce In-App Content in Lightning Experience Learn about the valuable in-app content that appears in Salesforce.

SEE ALSO: Video: Get Started with In-App Guidance Video: Create Prompts Video: Create Walkthroughs Trailhead: User Engagement Knowledge Article: In-App Guidance Prompts FAQ

In-App Guidance Best Practices in Lightning Experience From writing engaging titles to choosing the right resources, review Salesforce recommendations for creating more effective prompts and walkthroughs. Get inspired with examples for common use cases such as onboarding and training.

Getting Started Resources Available from AppExchange For example prompts, install the In-App Guidance: Boost Sales User Productivity in Lightning Experience or In-App Guidance: Boost Service User Productivity in Lightning Experience packages.

57 Extend Salesforce with Clicks, Not Code Custom Help Content

For example walkthroughs, install the In-App Guidance Walkthroughs: Getting Started for Sales Users package. For monitoring user engagement of in-app guidance with prebuilt, customizable reports and dashboards, install the packages for prompts and walkthroughs.

Choosing the Right In-App Guidance Consider these high-level recommendations when choosing the in-app guidance type for your use case. For more information, take the User Engagement Trailhead module. Floating Prompt Use a short message, an optional image of your choosing, and an action button to enhance feature discovery. Pros: You can place floating prompts at nine positions around the page, allowing you to link the prompt content to what the user sees on the screen. The short length means that the user gets the information and gets on with their workday quickly. Cons: The user can easily overlook the floating prompt because it’s smaller and disappears when a user navigates off the page. But that’s when scheduling more recurrences comes in handy.

Example: Here’s a floating prompt for feature discovery and adoption. The goal is to make sure that all users are familiar with the latest productivity-boosting feature: the ability to pin a favorite list view.

Targeted Prompt Enjoy the same benefits as a floating prompt without being confined to nine placement positions. Connect a targeted prompt to a specific page element to show your users exactly what you’re referring to. Pros: You can place targeted prompts on targetable page elements. Further customize the position and alignment relative to your chosen element by choosing from 12 positions around the element. Or use smart positioning and let Salesforce determine the best location based on the user’s page configuration. Cons: Page configurations can change and so can user’s access to an app or a page. If a user doesn’t have access to the element the targeted prompt points to, the prompt shows a warning to the user and in the In-App Guidance Setup page and the In-App Guidance Builder. Also, if the element is no longer on the page, the targeted prompt also switches to a floating prompt.

Example: Here’s a targeted prompt pointing to a path element on an opportunity. The goal is to make sure users notice that the path element tracks their progress as they complete steps.

58 Extend Salesforce with Clicks, Not Code Custom Help Content

Docked Prompt Take advantage of more room to include an optional image or embed a video, or include step-by-step directions for completing a task. Doing so assists with feature adoption, deeper learning, and training. Pros: Users can maximize, minimize, or keep the docked prompt open while they navigate around the app, making it ideal for instructions the user can follow as they work. Cons: Although there’s more room for content, too much information can overwhelm users and cause them to not complete your call to action. Focus on the most important information, and take advantage of the option to add a video.

Example: Here’s a docked prompt to highlight configuration changes. The goal is to alert users that you’re changing the page layout of the Account record.

59 Extend Salesforce with Clicks, Not Code Custom Help Content

Walkthrough Provide a step-by-step, guided educational experience on a single page or across multiple pages by stringing together a series of floating, targeted, and docked prompts. Walkthroughs provide in-context training that’s perfect for onboarding and feature adoption. Pros: Instead of just reading instructions, users see the steps in their own workspace. It’s a great way for new users to learn more about how to use the app. Cons: Users must invest time to fully comprehend and complete walkthroughs. Although you can add up to 10 steps, Salesforce recommends roughly five steps for higher completion rates. If you drafted a longer walkthrough, consider breaking it up into two walkthroughs.

Tip: Salesforce recommends floating and targeted prompts for most walkthrough steps. Docked prompts are recommended only for the final step to include more information and calls to action.

Example: Here’s part of a walkthrough for onboarding training. The goal is to train new sales team members on how to use Path.

60 Extend Salesforce with Clicks, Not Code Custom Help Content

Writing Engaging In-App Guidance Content In general, use a conversational but concise tone when writing in-app guidance. For more voice and tone information, check out the Salesforce Voice and Tone Guidelines, the User Engagement Trailhead module, and the Writing Style Trailhead module. Consider these tips for each part of the prompt when writing in-app guidance. Header (Docked Prompt) The header follows the title, so use it to indicate to the user what type of information is in the prompt. For example, Important Changes, New Feature, or List View Tips. Title Use keywords that emphasize the purpose and value of the feature or process to users. Avoid excessive exclamation marks. For single prompts, format your title using imperative phrases. For example, “Create shortcuts to favorite pages” instead of “Favorites are a way to create shortcuts” or “New feature: Favorites.” For walkthroughs, your title varies with each step. • The first step of the walkthrough welcomes the user and explains where users are headed. • The middle steps can be either instructional to describe how to complete an action or conceptual to provide information that helps users understand the use case, benefit, or purpose. • The last step gives users encouragement for taking the walkthrough.

61 Extend Salesforce with Clicks, Not Code Custom Help Content

Body Elaborate on the title without restating it. Provide more information about the feature or process, mention the problem that the solution solves, or include common use cases. Write in a minimal and straightforward style. Include content that’s directly relevant to the current task. Don’t include anything that users must refer to later. Focus on writing content that’s easy to understand and to execute. For walkthroughs, the body varies with each step. • The first step of the walkthrough clearly states the goal and the benefits to the user before they start. • The middle steps provide more details about the process or concept. • The last step can include next steps or resources to keep the user engaged with the feature. Media Upload images to floating, targeted, and docked prompts or embed a video in a docked prompt. Make your in-app guidance more engaging by adding a .jpg, .jpeg, .png, or .gif file. Animated .gifs can further articulate the guidance in a prompt.

Note: Animated .png files aren’t supported and don’t include a play/pause button.

Or embed a video in docked prompts.

Note: You can only include an image or an embedded video. If you include an embedded video and then include an image, the image shows in the docked prompt. Buttons Keep button names consistent. Salesforce recommends Dismiss for the dismiss button and Tell Me More for the action button or link to a help resource. The action button label indicates where users are going before they click. When choosing a resource to link to, think about a resource that helps users complete the task or is part of the call to action. In-app guidance is engaging because it keeps users in the app, so don’t direct them to help stored outside the app unnecessarily.

SEE ALSO: Define Prompts in Lightning Experience Define Walkthroughs in Lightning Experience Considerations for In-App Guidance in Lightning Experience

62 Extend Salesforce with Clicks, Not Code Custom Help Content

Considerations for In-App Guidance in Lightning Experience

USER PERMISSIONS EDITIONS

To add, edit, and manage prompts and Modify All Data OR Customize Application In-App Guidance available walkthroughs as an admin in: Lightning Experience

To add, edit, and manage prompts and Manage Prompts AND View All Profiles (if In-App Guidance available walkthroughs as a designated user profile filtering is enabled) in: Essentials, Group, Professional, Enterprise, Note: An admin can manage Performance, Unlimited, prompts without adding more user and Developer Editions permissions. Assign these permissions to non-admin users who In-App Guidance not want to manage prompts. If you don’t available for: Chatter have access to an item, such as an External and Chatter Free object or app, some actions aren’t user licenses available to you. myTrailhead available in: Only users with the View All Data or Enterprise, Performance, Modify All Data permissions can see and Unlimited Editions another user’s errors, views, and completions.

To view more than three active custom View Walkthroughs walkthroughs as a user outside of the In-App Note: The View Walkthroughs user Guidance Builder permission is part of the Walkthroughs Note: If some users in an org have a permission set license. The myTrailhead subscription, users who myTrailhead subscription includes this don’t have the subscription can’t see feature. For pricing details, contact in-app guidance. your Salesforce account executive.

Before creating prompts and walkthroughs for your users, understand the settings and their behavior. In-App Guidance isn’t supported in the Salesforce mobile app.

In-App Guidance Packages Create You can package prompts and walkthroughs into a managed package. For details and considerations, see: • SOAP API Developer Guide: Prompt and PromptVersion • ISVforce Guide: Create a Package and Components Available in Managed Packages You don’t have to purchase a license to create, preview, or package walkthroughs. Note the restrictions on user visibility of the walkthroughs you create in the Install and Manage section. Install and Manage If the package includes a custom profile that isn’t part of your Salesforce org, the in-app guidance is installed. However, it doesn’t include those custom items. For example, you install a prompt with several custom profiles not included in your org. The prompts are installed without those custom profiles. If the package includes a custom permission that isn’t a part of your Salesforce org, the installation fails.

63 Extend Salesforce with Clicks, Not Code Custom Help Content

If the package includes a standard app that isn’t part of your Salesforce org, the in-app guidance is installed, but it’s not usable. The Package column indicates the in-app guidance installed from packages. The name of the admin who installed the package is listed under the Created By column. The publish status set by the package owner is retained. For example, a prompt marked as active in the package is active after installing it in your org. After installation, you can change the publish status at any time from the In-App Guidance Setup page. If the owner included translated labels, they can be installed from the package. For walkthrough packages: • If a managed or unmanaged package includes walkthroughs for standard apps, walkthroughs are installed. However, production orgs can have only three active walkthroughs at a time without subscribing to myTrailhead. • If a security-reviewed, first-generation managed package includes walkthroughs with at least one step on a page within a custom app, users can see the walkthroughs without a subscription to myTrailhead. Always consult the package owner for specific details about the package containing in-app guidance. Edit and Clone In-app guidance cloned from managed packages doesn’t receive updates from the package owner. For in-app guidance installed from packages, you can edit only the schedule, profiles, permissions, and status settings. You can’t add, remove, or reorder steps from a walkthrough installed from a managed package. For cloned prompts and walkthroughs, you can edit any setting except the in-app guidance type (prompt or walkthrough).

Create Custom In-App Guidance In-App Guidance Limits

In-App Guidance Limit Salesforce Recommendation Walkthroughs installed from the No limit currently. An enforceable limit is 500 AppExchange possible in future releases.

Walkthroughs created in your org 500 No specific recommendation

Prompts installed from the AppExchange No limit currently. An enforceable limit is 500 possible in future releases.

Prompts created in your org 500 No specific recommendation

You can add up to 10 steps in a walkthrough. In-App Guidance and Prompt Types The floating and targeted prompts disappear when the user navigates away from the page. Use the Prompt Position settings to indicate where to place a floating or targeted prompt. Make sure that you’re not blocking important information. However, users can move the prompt. The floating and targeted prompt types include a snooze icon and a dismiss button, and you can optionally add an action button. The docked prompt type doesn’t include a dismiss button, but you can optionally add an action button. Users can maximize, minimize, or keep the docked prompt open while they navigate around the app or use the snooze icon. Walkthroughs consist of up to 10 floating, targeted, or docked prompts. There are some differences between single prompts and prompts included in a walkthrough. Each step includes a progress button labeled Next, except for the final step, which is labeled Finish. Instead of an action button, there’s an optional action link on the last step of the walkthrough. Each prompt indicates which step is shown. For example, Step 1/4.

64 Extend Salesforce with Clicks, Not Code Custom Help Content

Custom Theme Color Make your in-app guidance complement or contrast your org or app theme color. Salesforce suggests up to four colors to choose from. The colors are derived from your org’s current settings, which can be changed from the Themes and Branding Setup page or Lightning App Builder. • Org brand color • Page background color • Header background color • App brand color (if the app has a custom theme) Salesforce ensures that the colors are accessible by darkening the color or by increasing the contrast color ratio. We recommend previewing the prompt to ensure that the copy is visible. The custom theme is specified only on the first step of a walkthrough but is applied to all steps of a walkthrough. The custom theme color doesn’t affect in-app content created by Salesforce. Custom theme color isn’t supported in the Internet Explorer 11 browser. Media Images make prompts more engaging for users. Add a .jpg, .jpeg, .png, or .gif file, or further articulate the guidance in a prompt by adding an animated .gif file.

Note: Animated .png files aren’t supported and don’t include a play/pause button.

Keep these tips in mind when adding images to in-app guidance: • In floating and targeted prompts, you can add the image above, below, to the right of, or to the left of the body text. • In docked prompts, you can add the image above or below the body text. • For images above or below body text, maximum size is 324 x 132 pixels. For images to the right or left of the body text, maximum size is 148 x 148 pixels. • Large images are resized and maintain their aspect ratio. • Maximum file size is 5 MB. • Include alt text to represent the image to blind or low-vision users. Include a video to explain more complex ideas.

Note: You can include an image or an embedded video. If you first include an embedded video and then include an image, the image replaces the video in the docked prompt. If a video doesn’t load, check your browser privacy settings. For example, YouTube provides the Privacy-Enhanced Mode. Users watch the video within the docked prompt, in the expanded docked prompt, or in full screen mode. The video player actions vary depending on the video host. When adding a video to a docked prompt, enter the URL specified in the src attribute listed in the embed code from the video host.

Tip: To find the embed code for a video, follow the instructions from the video host site. Usually you can find the steps by searching for the name of the site and “embed video.” For example, here’s what the embed code looks like for YouTube: Then you enter the URL found in the src attribute. For the example used, enter https://www.youtube.com/embed/di6iwHhrH6.

65 Extend Salesforce with Clicks, Not Code Custom Help Content

To ensure that videos embed properly, use trusted sites. YouTube, Vidyard, and Vimeo are trusted websites for In-App Guidance. If videos from others sites don’t appear correctly, try making those sites trusted. For more information, see Create CSP Trusted Sites to Access Third-Party APIs in Salesforce Help.

Permission and Profile If the in-app guidance doesn’t apply to a specific group of users, select the No restrictions radio button. If the in-app guidance applies to a specific group, define the audience using standard and custom permissions and profiles. If you apply multiple permissions, the prompt or walkthrough appears only to users who have all the permissions specified. If you apply multiple profiles, the in-app guidance appears to users who have any of the profiles specified. You can select a combination of up to 10 profiles and permissions for each in-app guidance. If you select multiple items, the prompt or walkthrough appears to users who have all the permissions specified and any of the profiles specified.

Note: If any of the profiles or permissions assigned to the prompt or walkthrough are deleted, a warning appears in the In-App Guidance Setup page, the In-App Guidance Builder, and in the Customize In-App Guidance window on the Profile and Permission steps. Review the selected profiles or permissions to ensure that the correct users see the prompt or walkthrough. If all profiles or permissions assigned to a prompt or walkthrough are deleted, an error appears. To save your prompt or walkthrough, update the profile or permission selections. Schedule To specify when to make the in-app guidance appear, specify a date range. The default start date is the current date. For recurring in-app guidance, use Frequency to specify the number of times to show the in-app guidance and the days in between occurrences. Repeat the same prompt or walkthrough multiple times to ensure that users understand or take a desired action on the content. You can repeat in-app guidance up to 30 times, with up to 30 days in between. Consider the date range when deciding how many days between each repeat. By default, a 24-hour delay, or cooling off period, between instances ensures that a user sees only one prompt or walkthrough per day per app. Change the amount of time for the delay between all in-app guidance, even in-app content created by Salesforce, under Settings on the In-App Guidance Setup page. Choose a value 0–99 hours and 0–59 minutes. Or choose to ignore the delay for a single in-app guidance by checking Show when the page loads when creating. The specified Schedule still applies for each in-app guidance, including the start date, times to show, and days in between. A single prompt or walkthrough appears no more than once every 24 hours even if you adjust the global time delay or set it so that the in-app guidance shows when the page loads. The in-app guidance that you create for your org is prioritized over prompts and other in-app content created by Salesforce, except for some important announcements or onboarding content, such as welcome mats. Salesforce detects how users interact with in-app guidance. If a user acknowledges the content, Salesforce stops showing the prompt or walkthrough to the user, even if you scheduled more occurrences. Salesforce continues showing in-app guidance until users acknowledge the in-app guidance or until the specified end date, even if you set up the prompt or walkthrough to show only once. The table summarizes when Salesforce continues or stops showing in-app guidance based on the user’s interaction.

User Interaction Floating and Targeted Docked Prompt Walkthrough Prompts User didn’t click a button. Show the prompt again. Show the prompt again. Show the walkthrough again.

User clicked the X to close the Not applicable. This type of • If there’s no action button, Show the walkthrough again. prompt. prompt doesn’t have a dismiss stop showing the prompt. button. • If there’s an action button, show the prompt again.

66 Extend Salesforce with Clicks, Not Code Custom Help Content

User Interaction Floating and Targeted Docked Prompt Walkthrough Prompts

User selected a snooze option. Show the prompt again after Show the prompt again after Show the walkthrough again the snooze time expires, the the snooze time expires, the after the snooze time expires, next time the user navigates to next time the user navigates to the next time the user the page. the page. navigates to the page.

User clicked the dismiss button. • If there’s only a dismiss Not applicable. This type of Show the walkthrough again. button, stop showing the prompt doesn’t have a dismiss prompt. button. • If there’s a dismiss button and action button, show the prompt again.

User clicked the action button Stop showing the prompt. Stop showing the prompt. Stop showing the walkthrough. (prompt) or action link (walkthrough).

User clicked the finish button. Not applicable for prompts. Not applicable for prompts. Stop showing the walkthrough.

Note: Watching a video doesn’t register as a user interaction.

Action Button and Link Action buttons in floating and targeted prompts and docked prompts and action links in walkthroughs are optional. When adding an action button or link, you can enter a relative URL or a fully qualified URL with an http:// or https:// prefix. Usually, clicking the action button or link opens a new tab. But if you add a URL for a flow, clicking the action button or link refreshes the current tab the user is on. Shareable URL Share a direct link to in-app guidance with users or add to the custom section of the Help Menu. Or, string multiple walkthroughs together by using the URL as the action link. If you use the URL as the action button or link, the prompt opens in a new tab and the walkthrough refreshes the page. Access the shareable URL from Settings inside the In-App Guidance Builder or from the row-level action menu on the Setup page. When you edit the API Name or delete a record that the in-app guidance was added to, the URL changes. When you make any other change to the in-app guidance, the URL remains the same. The URL opens the in-app guidance on a record that the prompt or walkthrough was added to. If the user doesn’t have access to that specific record, the in-app guidance opens on a record of the same object type and record type, if a specific record type was defined. The URL opens even if the user previously viewed or closed the in-app guidance, clicked the action button, or isn’t a part of the profile or permission set. The URL also ignores all schedule settings, such as the start date, end date, number of times to show, and days to wait in between occurrences. If the in-app guidance is inactive, the URL doesn’t open.

Note: If you deselect Custom In-App Guidance in the Settings accessed from the In-App Guidance Setup page, users can’t open links to custom in-app guidance. Keyboard Shortcuts Use these handy keyboard shortcuts for Mac and Windows to quickly navigate around the builder.

67 Extend Salesforce with Clicks, Not Code Custom Help Content

Action Mac Windows

Keyboard Help Press ?+Shift+/ Press ?+Shift+/

Switch focus to different regions (move Press Cmd+F6 Press Ctrl+F6 focus around areas of the In-App Guidance Builder, such as the header, right sidebar, and left sidebar)

Switch focus to the builder (move focus Press Cmd+F7 Press Ctrl+F7 from the canvas (preview of app) to the In-App Guidance Builder)

Select the next element in the canvas Press Ctrl+Alt+t Press Ctrl+Alt+t

Select the previous element in the canvas Press Cmd + Option + Shift + t Press Ctrl+Alt+Shift+t

Add a targeted prompt to the selected Press Cmd+Option+a Press Ctrl+Alt+a element

SEE ALSO: Define Prompts in Lightning Experience Define Walkthroughs in Lightning Experience Monitor In-App Guidance in Lightning Experience Test In-App Guidance in Lightning Experience Knowledge Article: In-App Guidance Prompts FAQ

Define Walkthroughs in Lightning Experience

USER PERMISSIONS EDITIONS

To add, edit, and manage prompts and Modify All Data OR Customize Application In-App Guidance available walkthroughs as an admin in: Lightning Experience

To add, edit, and manage prompts and Manage Prompts AND View All Profiles (if In-App Guidance available walkthroughs as a designated user profile filtering is enabled) in: Essentials, Group, Professional, Enterprise, Note: An admin can manage Performance, Unlimited, prompts without adding more user and Developer Editions permissions. Assign these permissions to non-admin users who In-App Guidance not want to manage prompts. If you don’t available for: Chatter have access to an item, such as an External and Chatter Free object or app, some actions aren’t user licenses available to you. myTrailhead available in: Only users with the View All Data or Enterprise, Performance, Modify All Data permissions can see and Unlimited Editions another user’s errors, views, and completions.

68 Extend Salesforce with Clicks, Not Code Custom Help Content

To view more than three active custom walkthroughs as a View Walkthroughs user outside of the In-App Guidance Builder Note: The View Walkthroughs user permission is part Note: If some users in an org have a myTrailhead of the Walkthroughs permission set license. The subscription, users who don’t have the subscription myTrailhead subscription includes this feature. For can’t see in-app guidance. pricing details, contact your Salesforce account executive.

Create a hands-on interactive tour to guide users through onboarding or feature introduction with a series of step-by-step prompts.

Tip: You can activate up to three custom walkthroughs for free and an unlimited number of active walkthroughs in a Developer Edition org. For more details, see Considerations for In-App Guidance in Lightning Experience in Salesforce Help. Watch the video to see how to add a walkthrough. Create Walkthroughs in Lightning Experience 1. From Setup in Lightning Experience, in the Quick Find box, enter In-App Guidance, and then select In-App Guidance. 2. Click Add. The In-App Guidance Builder opens in a new browser tab. 3. Inside the builder canvas, navigate to the app and page where you want to add the walkthrough, and then click Add. You remain in the builder while you navigate. The builder shows information about your page location, other in-app guidance on the page, and your next step.

Note: You can place walkthroughs on object record pages, object home pages such as Home, and on new, edit, and clone record pages, including dialogs. The Add button is disabled when you can’t add a walkthrough to the page. For record pages, you can’t add a walkthrough step to a specific record. Instead, a step is added to a record page type. The step takes users to a record they have access to. If a new or clone record page has multiple record types, you can choose if you want in-app guidance to appear for all or only a specific record type. You can’t place in-app guidance on task record pages when using the split view, the prompt appears on the Task home page.

4. Follow the instructions in the right side panel to choose Walkthrough. Then specify the type and position of the prompt and the content. A left side panel appears for you to view, reorder, or delete steps in the walkthrough. Add a step using the builder header actions.

Tip: The In-App Guidance Builder shows errors and warnings related to authoring in-app guidance. For example, a page doesn’t support a prompt. Or a page that contained a prompt is now missing, the author doesn’t have access to the page, or there’s a field-level error. Errors that users encountered when viewing a walkthrough are noted on the In-App Guidance Setup page.

Warning: Walkthroughs don’t appear correctly when the split view list view is open. Close split view before adding a step. The first step of a walkthrough can instruct the user to close the split view before continuing with the walkthrough.

5. To specify the tile, body, and button text, select Next. You can also include an image, or for docked prompts, embed a video. 6. Save your work. A window appears to complete more settings for an action link, schedule, profile, permissions, active status, and name. The walkthrough is active by default. 7. Click Done. To edit a walkthrough, click Edit from the In-App Guidance Setup page row-level action menu or the In-App Guidance Builder header. Move a walkthrough step by navigating to a different page and saving. To edit more settings, click the gear icon in the header of the builder. To quickly create in-app guidance for different users, consider cloning. You can clone any prompt or walkthrough, including prompts installed from packages, by clicking Clone from the row-level action menu. Edit any setting except the type.

69 Extend Salesforce with Clicks, Not Code Custom Help Content

Activate or deactivate a single prompt or walkthrough from the row-level action menu. Use Translation Workbench to maintain your translated labels in your org. Look for the Prompt and PromptVersion setup component to get started. Open Settings on the In-App Guidance Setup page to: • Turn off or turn on all in-app guidance created or installed in your Salesforce org. • Turn off or turn on all in-app guidance created by Salesforce. • Change the delay between in-app guidance appearances.

Assign Walkthrough Permissions in Lightning Experience To have more than three custom walkthroughs active at a time, subscribe to myTrailhead and assign the Walkthrough permission set license and the Access Walkthroughs permission set to selected users.

SEE ALSO: Plan Your myTrailhead Solution Manage Your Translations Considerations for In-App Guidance in Lightning Experience Test In-App Guidance in Lightning Experience Monitor In-App Guidance in Lightning Experience Knowledge Article: In-App Guidance Prompts FAQ

Assign Walkthrough Permissions in Lightning Experience

USER PERMISSIONS EDITIONS

To add, edit, and manage prompts and Modify All Data OR Customize Application In-App Guidance available walkthroughs as an admin in: Lightning Experience

To add, edit, and manage prompts and Manage Prompts AND View All Profiles (if In-App Guidance available walkthroughs as a designated user profile filtering is enabled) in: Essentials, Group, Professional, Enterprise, Note: An admin can manage Performance, Unlimited, prompts without adding more user and Developer Editions permissions. Assign these permissions to non-admin users who In-App Guidance not want to manage prompts. If you don’t available for: Chatter have access to an item, such as an External and Chatter Free object or app, some actions aren’t user licenses available to you. myTrailhead available in: Only users with the View All Data or Enterprise, Performance, Modify All Data permissions can see and Unlimited Editions another user’s errors, views, and completions.

70 Extend Salesforce with Clicks, Not Code Custom Help Content

To view more than three active custom walkthroughs as a View Walkthroughs user outside of the In-App Guidance Builder Note: The View Walkthroughs user permission is part Note: If some users in an org have a myTrailhead of the Walkthroughs permission set license. The subscription, users who don’t have the subscription myTrailhead subscription includes this feature. For can’t see in-app guidance. pricing details, contact your Salesforce account executive.

To have more than three custom walkthroughs active at a time, subscribe to myTrailhead and assign the Walkthrough permission set license and the Access Walkthroughs permission set to selected users. You can activate up to three custom walkthroughs at a time for your users without subscribing to myTrailhead. To see how many are available, go to the In-App Guidance Setup page. 1. From Setup in Lightning Experience, in the Quick Find box, enter Users, and select Users.

Tip: To mass-assign permission set licenses, you can use the Data Loader. You can also assign permission set licenses by assigning the permission sets first. When you assign the permission sets to users, the permission set license is automatically assigned to those users.

2. Click a user’s name, go to the Permission Set License Assignments section, and then click Edit Assignments. Check Walkthroughs. 3. From Setup in Lightning Experience, in the Quick Find box, enter Permission Sets, and select Permission Sets. 4. Select the Access Walkthroughs permission set. Click Manage Assignments, and then Add Assignments. Select the checkboxes next to the names of the users you want assigned to the permission set, and click Assign.

SEE ALSO: Plan Your myTrailhead Solution Permission Set Licenses Permission Sets

71 Extend Salesforce with Clicks, Not Code Custom Help Content

Define Prompts in Lightning Experience

USER PERMISSIONS EDITIONS

To add, edit, and manage prompts and Modify All Data OR Customize Application In-App Guidance available walkthroughs as an admin in: Lightning Experience

To add, edit, and manage prompts and Manage Prompts AND View All Profiles (if In-App Guidance available walkthroughs as a designated user profile filtering is enabled) in: Essentials, Group, Professional, Enterprise, Note: An admin can manage Performance, Unlimited, prompts without adding more user and Developer Editions permissions. Assign these permissions to non-admin users who In-App Guidance not want to manage prompts. If you don’t available for: Chatter have access to an item, such as an External and Chatter Free object or app, some actions aren’t user licenses available to you. myTrailhead available in: Only users with the View All Data or Enterprise, Performance, Modify All Data permissions can see and Unlimited Editions another user’s errors, views, and completions.

To view more than three active custom View Walkthroughs walkthroughs as a user outside of the In-App Note: The View Walkthroughs user Guidance Builder permission is part of the Walkthroughs Note: If some users in an org have a permission set license. The myTrailhead subscription, users who myTrailhead subscription includes this don’t have the subscription can’t see feature. For pricing details, contact in-app guidance. your Salesforce account executive.

Reach users inside the app with small windows displaying news, training, feature adoption, and onboarding messages. Watch the video to see how to add a prompt. Create Prompts in Lightning Experience 1. From Setup in Lightning Experience, in the Quick Find box, enter In-App Guidance, and then select In-App Guidance. 2. Click Add. The In-App Guidance Builder opens in a new browser tab. 3. Inside the builder canvas, navigate to the app and page where you want to add the prompt, and then click Add. You remain in the builder while you navigate. The builder shows information about your page location, other in-app guidance on the page, and your next step.

Note: You can place prompts on object record pages, object home pages such as Home, and on new, edit, and clone record pages, including dialogs. The Add button is disabled when you can’t add a prompt to the page. For record pages, you can’t add a prompt to a specific record. Instead, a prompt is added to a record page type. The prompt takes users to a record they have access to. If a new or clone record page has multiple record types, you can choose if you want in-app guidance to appear for all or only a specific record type. You can’t place in-app guidance on task record pages when using the split view, the prompt appears on the Task home page.

4. Follow the instructions in the right side panel to choose Single Prompt. Then specify the type and position of the prompt and the content.

72 Extend Salesforce with Clicks, Not Code Custom Help Content

Tip: The In-App Guidance Builder shows errors and warnings related to authoring in-app guidance. For example, a page doesn’t support a prompt. Or, a page that contained a prompt is now missing, the author doesn’t have access to the page, or there’s a field-level error. Errors that users encountered when viewing a prompt are noted on the In-App Guidance Setup page.

5. When you’re done creating the prompt, click Save. A window appears to complete more settings for an action button, schedule, profile, permissions, active status, and name. The prompt is active by default. 6. Click Done. To edit a prompt, click Edit from the In-App Guidance Setup page row-level action menu or the In-App Guidance Builder header. Move a prompt by navigating to a different page and saving. To edit more settings, click the gear icon in the header of the builder. To quickly create in-app guidance for different users, consider cloning. You can clone any prompt, including prompts installed from packages, by clicking Clone from the row-level action menu. Edit any setting except the prompt type. Activate or deactivate a single prompt or walkthrough from the row-level action menu. Use Translation Workbench to maintain your translated labels in your org. Look for the Prompt and PromptVersion setup component to get started. Open Settings on the In-App Guidance Setup page to: • Turn off or turn on all in-app guidance created or installed in your Salesforce org. • Turn off or turn on all in-app guidance created by Salesforce. • Change the amount of time for the global delay between in-app guidance.

SEE ALSO: Manage Your Translations Test In-App Guidance in Lightning Experience Monitor In-App Guidance in Lightning Experience Knowledge Article: In-App Guidance Prompts FAQ

Test In-App Guidance in Lightning Experience

USER PERMISSIONS EDITIONS

To add, edit, and manage prompts and Modify All Data OR Customize Application In-App Guidance available walkthroughs as an admin in: Lightning Experience

To add, edit, and manage prompts and Manage Prompts AND View All Profiles (if In-App Guidance available walkthroughs as a designated user profile filtering is enabled) in: Essentials, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions

In-App Guidance not available for: Chatter External and Chatter Free user licenses

myTrailhead available in: Enterprise, Performance, and Unlimited Editions

73 Extend Salesforce with Clicks, Not Code Custom Help Content

Note: An admin can manage prompts without adding more user permissions. Assign these permissions to non-admin users who want to manage prompts. If you don’t have access to an item, such as an object or app, some actions aren’t available to you. Only users with the View All Data or Modify All Data permissions can see another user’s errors, views, and completions.

To view more than three active custom walkthroughs as a View Walkthroughs user outside of the In-App Guidance Builder Note: The View Walkthroughs user permission is part Note: If some users in an org have a myTrailhead of the Walkthroughs permission set license. The subscription, users who don’t have the subscription myTrailhead subscription includes this feature. For can’t see in-app guidance. pricing details, contact your Salesforce account executive.

Testing lets you log in as specific users to verify that they see the correct prompt or walkthrough. While in test mode, Salesforce ignores the schedule settings and timed delay so you can test more than one item at a time. User interactions aren’t logged, so metrics aren’t affected. 1. From Setup in Lightning Experience, enter In-App Guidance in the Quick Find box, and then select In-App Guidance. 2. Click Start Testing. 3. Log in as a specific user, and navigate to the page where the in-app guidance appears. If you see anything that needs updating, edit the in-app guidance by clicking Open In-App Guidance Builder from the testing bar at the top of the screen. 4. When you’re done, click Exit Testing in the testing bar. There are two other ways to test in-app guidance. • Take a quick look at in-app guidance. Click Preview from the In-App Guidance Setup page row-level action menu. A new tab opens with the in-app guidance in preview mode in the builder. • See in-app guidance in action in a sandbox environment. If you don’t see prompts and walkthroughs, turn on Adoption Assistance in Sandbox Orgs on the Adoption Assistance setup page in your sandbox org.

SEE ALSO: Define Prompts in Lightning Experience Define Walkthroughs in Lightning Experience Considerations for In-App Guidance in Lightning Experience

74 Extend Salesforce with Clicks, Not Code Custom Help Content

Monitor In-App Guidance in Lightning Experience

USER PERMISSIONS EDITIONS

To add, edit, and manage prompts and Modify All Data OR Customize Application In-App Guidance available walkthroughs as an admin in: Lightning Experience

To add, edit, and manage prompts and Manage Prompts AND View All Profiles (if In-App Guidance available walkthroughs as a designated user profile filtering is enabled) in: Essentials, Group, Professional, Enterprise, Note: An admin can manage Performance, Unlimited, prompts without adding more user and Developer Editions permissions. Assign these permissions to non-admin users who In-App Guidance not want to manage prompts. If you don’t available for: Chatter have access to an item, such as an External and Chatter Free object or app, some actions aren’t user licenses available to you. myTrailhead available in: Only users with the View All Data or Enterprise, Performance, Modify All Data permissions can see and Unlimited Editions another user’s errors, views, and completions.

To view more than three active custom View Walkthroughs walkthroughs as a user outside of the In-App Note: The View Walkthroughs user Guidance Builder permission is part of the Walkthroughs Note: If some users in an org have a permission set license. The myTrailhead subscription, users who myTrailhead subscription includes this don’t have the subscription can’t see feature. For pricing details, contact in-app guidance. your Salesforce account executive.

Learn how to resolve and clear in-app guidance errors and warnings. Use metrics to fine-tune the location, position, content, and schedule settings.

Resolve In-App Guidance Errors and Warnings If a user can’t access a walkthrough step or the assigned profiles or permissions were deleted, you see an error or a warning on the In-App Guidance Setup page, the In-App Guidance Builder, and the In-App Guidance Settings window. A common error is when a walkthrough is added to a page that was later deleted or the targeted user doesn’t have access to the page. You can’t delete a custom app that contains in-app guidance. To resolve errors and warnings: 1. From Setup in Lightning Experience, in the Quick Find box, enter In-App Guidance, and then select In-App Guidance. An icon on the left side of the number column indicates in-app guidance that has errors or warnings. Click the icon to review details. 2. From the row-level action menu, click Edit to open the In-App Guidance Builder. 3. Resolve the error or warning.

75 Extend Salesforce with Clicks, Not Code Custom Help Content

Tip: The In-App Guidance Builder shows errors and warnings mostly related to authoring prompts—not errors users encountered. For example, a page doesn’t support a prompt, a page that contained a prompt was deleted, the author doesn’t have access to the page, or there’s a field-level error.

4. Back on the In-App Guidance Setup page, click Clear Errors in the row-level action menu. Only perform this action after you confirmed that the error is resolved. To troubleshoot a walkthrough to determine the cause of the error, create a report. 1. Set up a custom report type using the Prompt Actions object. 2. Add the Step Number, Last Display Date, Last Result (look for the Error valid value), Name, and User: Full Name fields as columns in the report.

Tip: Missing fields when you create or edit a report? You can design the field layout for reports created from a custom report type. From the Report Types Setup page, select the custom report type you want to edit. Click Edit Layout on the Fields Available for Reports section.

Keep Track of User Engagement There are three ways to monitor in-app guidance user engagement: • Look at the metrics on the In-App Guidance Setup page. • Create a custom report type. • Download a Salesforce Labs package of prebuilt, customizable reports and dashboards.

Look at the metrics on the In-App Guidance Setup page To track user interactions per org, review the standard usage metrics. From Setup in Lightning Experience, in the Quick Find box, enter In-App Guidance, and then select In-App Guidance. Look for the Views and Completes columns. • Views represent the total number of unique users who saw the prompt or walkthrough. • Completes is the percentage of viewers who clicked the action button (prompt) or link (walkthrough) or clicked the finish button on the last step of a walkthrough. Video views aren’t tracked. From the row-level action menu, click Reset Metrics to restart metrics values at zero. For instance, you made significant changes to a prompt and you want to restart the metrics tracking. If the end date hasn’t passed and the in-app guidance is active, users see the prompt or walkthrough again after resetting the metrics.

Create a custom report type 1. Set up a custom report type using the Prompt Actions object. 2. Add the Last Display Date, Last Result, Name, Times Action Taken, Times Dismissed, Times Displayed, and User: Full Name fields. If you’re reviewing walkthrough data, consider adding the Step Count and Step Number fields. You can use the Step Number divided by the Step Count to create a progress percentage formula field. Here’s a list of the Prompt Actions fields. See the PromptAction and PromptVersion API objects for more information.

76 Extend Salesforce with Clicks, Not Code Custom Help Content

Fields Description

Active Date The date the in-app guidance was activated. If part of a package, the active date is the date when the package was installed.

API Type The type of in-app guidance. Valid values are Docked Prompt, Floating Prompt, Targeted Prompt, and Walkthrough.

Last Display Date The date the in-app guidance was last showed to the user.

Last Result The most recent user interaction. Valid values are Error, Not Seen, No Action, Dismiss, Finish (walkthroughs only), and Custom Action. No Action represents the user clicking the close button.

Last Result Date The date the in-app guidance was last interacted with.

Name The name of the in-app guidance.

Step Count The total number of steps in the walkthrough.

Step Number The number of the last step the user viewed or interacted with in a walkthrough.

Times Action Taken The number of times that the user acted upon on the in-app guidance.

Times Dismissed The number of times that the user dismissed the in-app guidance.

Times Displayed The number of times that the in-app guidance was shown to the user.

User: Full Name The full name of the user who viewed the in-app guidance.

Download a Salesforce Labs package of pre-built, customizable reports and dashboards Visit AppExchange to install the free packages for prompts and walkthroughs. Find more information about the package on AppExchange listing pages, including user guides.

SEE ALSO: Create a Custom Report the Field Layout for Reports Created from Your Custom Report Type Build a Formula Field Define Prompts in Lightning Experience Define Walkthroughs in Lightning Experience Considerations for In-App Guidance in Lightning Experience

Salesforce In-App Content in Lightning Experience Learn about the valuable in-app content that appears in Salesforce.

77 Extend Salesforce with Clicks, Not Code Custom Help Content

Experience Cloud Sites

Type Description Welcome mat Introduces users to the Experience Cloud Mobile Experience.

Essentials

Type Description Docked prompt Highlights commonly used features including chat, messaging, and dialer. Only shown to admins.

Docked prompt Notifies admins that the trial period has expired. Only shown to admins.

Survey Asks for product feedback.

Welcome mat Provides resources for new users. Users see the welcome mat after the survey. This welcome mat also appears in trial orgs.

Welcome mat Highlights the Pocket Guide, which is the go-to place for questions while users work. Users see the welcome mat after the new users welcome mat.

Walkthrough Educates users on the importance of accounts and the basics of an account record. Shown in the Sales and Service apps.

Walkthough Educates users on the importance of tasks and activities and how to create tasks and log a call. Shown in the Sales and Service apps.

Walkthrough Educates users on the importance of opportunities and how to move them forward in the pipeline. Shown in the Sales and Service apps.

Marketing

Type Description Docked prompt Highlights tips and best practices for managing benefits.

Docked prompt Highlights tips and best practices for managing promotions.

Docked prompt Highlights tips and best practices for managing vouchers.

Feature popover Highlights the Pardot Setup Assistant within the Marketing Setup App. Only shown to admins.

Platform

Type Description Docked prompt Highlights the display density feature.

Docked prompt Highlights simple record home. For admins, the prompt recommends enabling the feature. For users, the prompt educates them about the feature.

78 Extend Salesforce with Clicks, Not Code Custom Help Content

Type Description

Docked prompt Provides information about building pages for Lightning on Mobile.

Docked prompt Encourages admins to enable the Enhanced Related List feature. Only shown to admins.

Docked prompt Encourages admins to use Dynamic Forms and highlights the localization feature.

Docked prompt Encourages users to download the Salesforce mobile app if they haven't used it yet and they're in a mobile-enabled org.

Docked prompt Notifies admins that Mobile Home is the new landing page for the Salesforce mobile app. Only shown to admins.

Docked prompt Notifies admins to add Mobile Home to a Lightning App or to the Mobile Only navigation for users to access it in their menu. Only shown to admins.

Floating prompt Highlights the Recycle Bin feature.

Floating prompt Reminds admins to try the Multi-Factor Authentication Assistant and guides them through stages if they left before completing the implementation path.

Floating prompt Highlights release readiness materials. Only shown to admins.

Floating prompt Highlights sandbox readiness materials. Only shown to admins.

Series of floating Highlights a series of features, such as Chatter, Home, Reports, List Views, and Opportunities, and how to customize and docked them. Also listed inside the Guidance Center. Only shown to admins with new Salesforce orgs. prompts

Feature popover Highlights the list view pin feature.

Feature popover Highlights the list view filtering features.

Docked prompt Encourages admins to turn on the Enhanced Related List feature. Only shown to admins.

Feature popover Encourages users to customize the navigation bar in console apps.

Feature popover Encourages users to customize the navigation bar in standard apps.

Feature popover Highlights the Help Menu and the ability to view Salesforce documentation inside a docked composer.

Feature popover Encourages admins to use the Guidance Center in the Learning Paths. Only shown to admins.

Feature popover Highlights the Learning Paths panel.

Feature popover Encourages users to employ the global actions menu.

Feature popover Highlights the features of the Einstein Bots Builder. Only shown to admins.

Welcome mat Provides resources for working more productively in Lightning Experience. Users see the welcome mat when they’re automatically switched from Salesforce Classic to Lightning Experience.

Survey Asks for product feedback. Shown to a small, random sampling of users to complete optionally.

79 Extend Salesforce with Clicks, Not Code Custom Help Content

Sales

Type Description Docked prompt Highlights the benefits of planning territories in Salesforce Maps and then integrating them with Enterprise Territory Management.

Docked prompt Introduces admins to Salesforce CPQ when they’re interacting with quotes. Only shown to admins.

Docked prompt Highlights the benefits of Pipeline Inspection to users.

Docked prompt Reminds admins to enable the Einstein Conversation Insights feature, which is included for orgs that have both High Velocity Sales and Lightning Dialer. Only shown to admins.

Docked prompt Explains how to use Pipeline Inspection, and highlights key features.

Feature popover Highlights the filter button in the Add Products dialog on opportunity records.

Feature popover Highlights the Opportunity Score feature, if added to a record page.

Feature popover Highlights the Opportunity Score feature, if added to a list view.

Feature popover Asks admins and end users for feedback about Einstein Opportunity Scoring.

Feature popover Highlights target status filters used to organize work queue items with two separate popovers.

Feature popover Encourages admins to configure custom insights for Einstein Conversation Insights from the Call Insights Setup page.

Floating prompt Encourages sales managers to try out the Einstein Conversation Insights feature within the High Velocity Sales app.

Floating prompt Provides tips and best practices for using Pipeline Inspection.

Welcome mat Encourages admins to enable Sales Cloud Einstein. If not enabled, floating prompts in a series appear as reminders. Only shown to admins.

Welcome mat Provides resources for new users of the High Velocity Sales app. Users see the welcome mat when they first view the app. If the app was installed but the user hasn’t viewed it, a floating prompt encourages users to visit the app.

Welcome mat Provides resources for getting started with Pardot and Salesforce.

Welcome mat Introduces admins to Pipeline Inspection. Only shown to admins.

Welcome mat Introduces users to Pipeline Inspection.

Search

Type Description Feature popover Encourages admins to enable Einstein Search for their entire org.

Feature popover Highlights Einstein Search and recommends enabling the features. If only personalization is enabled, another feature popover encourages admins to turn on the rest of the Einstein Search capabilities.

Feature popover When Einstein Search is turned on, a feature popover educates users about the feature.

Feature popover Highlights Einstein Search for all orgs. Only shown to admins.

80 Extend Salesforce with Clicks, Not Code Custom Help Content

Service

Type Description Feature popover Introduces and walks users through setting up Macros.

Feature popover Introduces and walks users through using Quick Text.

Floating prompt Reminds admins to return to the Service Setup Assistant to finish setting up the org. A second prompt notifies admins that changes to the org require returning to the assistant. Only shown to admins.

Floating prompt Introduces users to the case list view created by the Service Setup Assistant.

Walkthrough Introduces users to the case record page layout created by the Service Setup Assistant.

Walkthrough Introduces users to the default help center created by the Service Setup Assistant.

Walkthrough Introduces users to the Lightning email templates created by the Service Setup Assistant.

Walkthrough Introduces users to the default surveys created by the Service Setup Assistant.

Setup

Type Description Welcome mat Highlights the org setup assistant. Only shown to admins.

Docked prompt Reminds admins how to prepare their data before importing. Only shown to admins.

Walkthrough Highlights In-App Guidance to admins. Only shown to admins.

Other

Type Description Floating prompt Remind admins of the open IdeaExchange prioritization period. Only shown to admins.

Turning Off All Salesforce In-App Content To turn off all the Salesforce-created prompts, popovers, and welcome mats: 1. From Lightning Experience Setup, in the Quick Find box, enter In-App Guidance, and then select In-App Guidance. 2. Click Settings. 3. Deselect Salesforce Standard In-App Guidance.

Best Practices for Learning Paths and the Help Menu Whether you have minimal time to devote to end-user training or your company has a full-fledged training program, Help Menu and Learning Paths can help. Learn how to define an in-app help strategy and get tips for customizing Learning Paths.

81 Extend Salesforce with Clicks, Not Code Custom Help Content

Benefits Easily accessible resources within the app are crucial to help users do their jobs efficiently and effectively inside their workspace. Learn more about the onboarding and troubleshooting stages of the in-app journey by taking the User Engagement Trailhead module. Without training, end-user productivity declines, as can trust and feature adoption. With sufficient training and on-demand troubleshooting resources, users quickly find answers to their questions so they can get unblocked and back to work. Such resources also are a time saver so that admins don’t repeatedly field the same questions from their users. The Help Menu provides Salesforce-suggested resources directly to end users and admins just for this reason. But because apps are so often customized, Salesforce resources don’t always reflect the actual user experience. Many admins add links to resources to offer their users help that reflects the company’s unique processes and guidelines. There are several ways to integrate custom help inside the app, but the Help Menu and Learning Paths are great additions to your admin toolbox.

Similarities and Differences Learning Paths and the Help Menu are accessible from the global header. The Help Menu offers Salesforce-suggested resources and a section for admins to add links to their own content that their users can see anywhere in the app. Learning Paths offer admins not only a panel to add contextual help per page, but also a way to assign learning to users, with optional due dates. Users see all their assignments on a single page. Check out Find Help in Lightning Experience for more details about Help Menu and Learning Paths features and behavior. This table lists the main differences between Learning Paths and the Help Menu.

Feature Learning Paths Help Menu

Hide completely Yes, from the Learning Paths Setup page Yes, from the Help Menu Setup page

Hide individual sections No Yes, from the Help Menu Setup page

Add URLs as learning items Add up to 500 learning items Add up to 30 URLs

Add help for a specific page, app, or org Resources for the object home or record are Resources for an org are shown in the global shown under Learning for You. The Ways custom resource section at the top of the to Learn More section includes resources Help Menu. Admins can’t specify per page assigned to all objects for all apps or for a or per app. specific app.

Specify a required due date to complete Yes No

Specify user-level visibility Yes, either specify by users or by public No groups

View Trailhead modules inside the app Yes, users can read and earn badges for No, all URLs open in a new tab. Links to multiple choice challenges inside the app Salesforce documentation under Help for This Page do show inside the app.

View suggestions from Salesforce For admins, suggestions are shown under Suggestions are shown under Help for This Learning for You on several, key pages. For Page for most pages in the app, including end users, three suggested modules are Setup. Global links for search, support, only visible by default, or on pages when keyboard shortcuts, and release notes are assigned content isn’t visible. under More Resources.

82 Extend Salesforce with Clicks, Not Code Custom Help Content

Strategy As you plan your in-app help strategy, think of adding layers of customization to address the needs of your users and, if applicable, your existing training program. The Help Menu offers a default in-app help experience by suggesting related resources for a page. Recommended resources are helpful for companies that don’t have much guidance available to users. All admins can direct users to the Help Menu for general onboarding questions and help with troubleshooting common issues. If you find that some sections of the Help Menu aren’t working for your users, simply hide them. You can add resources to the custom section of the Help Menu. To further customize the in-app help experience, add Learning Paths to get more robust features, such as due dates. And Learning Paths has more targeted assignment functionality, available now and in upcoming releases. It’s as easy to assign learning items across Salesforce as it is to assign items to a specific page for specific users. If you have myTrailhead or use public Trailhead modules as part of onboarding, users can read through modules assigned to them and earn badges right inside the app. Be sure to let users know that they can access these resources from the Trailhead icon in the global header or from the Learning object. To make Learning home easier to find, add Learning to the navigation bar.

Tips to Get Started Here are some ideas to help you plan which resources to add to Learning Paths. • Add an onboarding module such as Salesforce User Basics, Salesforce User Tour, or Salesforce CRM (CRM for Lightning Experience). • Replicate the modules you added to the global custom section of the Help Menu. • Check out the Help Menu (under Help for This Page) for inspiration on what modules or other documentation to add. • Add your company’s myTrailhead modules, videos, wiki pages, quick start guides, or other custom resource. • Assign shorter modules that users can complete in less than a half hour to facilitate learning as the user works. • Assign only one or two items to a specific page in the app to avoid overwhelming the user. • Add due dates to give users a better sense of when to complete the learning item. • Scope out what to add by listing the learning item, location, audience, and, optionally, due date. Here are some resources to consider adding. All learning items are Trailhead modules, except as noted.

Onboarding

Learning Item App Let’s Take Lightning Experience for a Spin (video) All

Searching in Salesforce (video) All

Working with List Views (video) All

Trailhead: Quick Look All

Salesforce User Basics All

Salesforce User Tour All

Salesforce CRM (CRM for Lightning Experience) All

83 Extend Salesforce with Clicks, Not Code Custom Help Content

Working from Anywhere

Learning Item App Virtual Meeting Setup: Quick Look All

Virtual Collaboration All

Virtual Whiteboarding: Quick Look All

Effective Emails: Quick Look All

Relationship Building All

Emotional Intelligence All

Fearless Teaming All

Sales

Learning Item App Sales Cloud: Quick Look Sales

Prospecting for Better Sales Sales

Daily Productivity Tips for Sales Sales

Productive Sales Without Digital Distraction Sales

Demo Delivery Essentials Sales

Demo Storytelling Sales

Design Thinking for Sales Sales

Service

Learning Item App Service Cloud: Quick Look Service

Service Cloud Agent Experience Service Console

Communication Skills for Customer Service Agents Service

Wellbeing

Learning Item App The Power of Movement All

The Value of Sleep All

84 Extend Salesforce with Clicks, Not Code Custom Help Content

Learning Item App

Mindful Living with the Plum Village Monastics All

SEE ALSO: Find Help in Lightning Experience Custom Help in Lightning Experience

Learning Paths

Bring all the fun of Trailhead inside the workspace to create a personalized and always-available EDITIONS learning experience for your users. The Learning Paths icon in the global header is visible to all users. It opens a panel where users can read Trailhead and myTrailhead content and earn badges inside Available in: Lightning the app. Admins customize the panel by selecting learning content and assigning it to a specific Experience audience and location in the app. Choose modules from Trailhead or myTrailhead and add links to other training resources for the ultimate custom training experience. Admins can let other Available in: Developer, stakeholders, such as trainers or sales team managers, assign and manage learning items. Professional, Enterprise, Performance, and Learning Paths isn’t available in sandbox environments. Unlimited Editions This feature is on by default in Salesforce, but you can turn it off from the Learning Paths page in Not Available for: Chatter Setup. When you disable Learning Paths, admins with the Modify All Data or Customize Application External, Chatter Free, or permissions can still see the icon in the global header. The icon gives admins access to the Guidance Communities (now known Center (1), which offers personalized recommendations for setting up, customizing, and enhancing as Experience Cloud) user Salesforce. licenses

myTrailhead Available in: Enterprise, Performance, and Unlimited Editions

In the side panel on certain pages in the Sales, Service, and Setup apps, admins also can see some Trailhead modules suggested by Salesforce (2). These modules remain in the panel even after you customize Learning Paths, but end users can’t see them unless you assign the modules to them. When you customize Learning Paths, you can choose whom to assign a learning item to—individuals, public groups, or all users. You can choose whether to associate the learning item with a particular app or page in Salesforce. And you can choose whether to apply a due date to each learning item. Learning items with a due date are required. Learning items without a due date can be helpful but aren’t required. When you assign a learning item to a page, end users see the item in the Learning for You section of the side panel. Learning items that you assign to all apps, or to all objects and records within an app, are included in the Ways to Learn More section of the panel. A learning item that’s assigned to an app or a page is visible in the side panel only when users are in the associated app.

85 Extend Salesforce with Clicks, Not Code Custom Help Content

All users have access to the Learning Home page in their Salesforce org. On Learning Home, users can see all their required and suggested learning items. They also can see which learning items they have in progress and which are completed. Admins get an extra page on Learning Home: Manage Learning Assignments. From there, they can customize Learning Paths.

Until you assign a learning item to a user, the user sees three Salesforce-suggested Trailhead modules in the panel. After you assign learning content to a user, those modules appear in the panel only on pages in Salesforce that have no learning items associated with them.

Note: As long as your Salesforce-related accounts are part of your Trailblazer.me profile, badges that you earn while inside Lightning Experience are included in your profile. See Trailblazer.me and Trailhead. If your company has myTrailhead, you don’t necessarily have a Trailblazer.me profile, but you can create one. See Create a Trailhead Account, and log in with the username and password that you use to log in to Salesforce. If your company uses Salesforce Identity for myTrailhead to authenticate myTrailhead users, the Salesforce Trailhead badges that you earn in-app appear on your Trailblazer.me profile. The myTrailhead badges that you earn don’t appear on your Trailblazer.me profile. See How Can I Tell Which Authentication Provider I Use to Access myTrailhead?

Considerations for Using Learning Paths As you prepare to customize Learning Paths for your users, keep these details in mind. Assign a Learning Item for Learning Paths You can assign a Trailhead or myTrailhead module or a custom learning item such as a video, tutorial, or reference guide. You can assign a learning item to individuals, public groups, or all users. And you can associate a learning item with an app and a particular object and page within the app. Until you assign content to a user, the user sees a few modules suggested by Trailhead in the learning panel and on Learning Home. Monitor Learning Paths (Beta) Use custom reports and dashboards to track user engagement with Learning Paths, Trailhead, and myTrailhead.

86 Extend Salesforce with Clicks, Not Code Custom Help Content

Considerations for Using Learning Paths

As you prepare to customize Learning Paths for your users, keep these details in mind. EDITIONS You can create a learning item with a Trailhead or myTrailhead module or a link to a custom resource such as a video, tutorial, or reference guide. You can assign learning items to individuals, public Available in: Lightning groups, or a combination of both. You also can assign a learning item to all users. There are some Experience limits to the assignments that you can make. Available in: Developer, Professional, Enterprise, Assignments Maximum Performance, and Learning items 500 Unlimited Editions

Assignments per learning item 100 Not Available for: Chatter External, Chatter Free, or Communities (now known as Experience Cloud) user An assignment to a public group counts as one assignment. licenses

myTrailhead Available in: Assigning a Learning Item Enterprise, Performance, You can assign Trailhead modules that contain quizzes, but not modules that contain hands-on and Unlimited Editions challenges. You can’t assign Trailhead projects. You can’t create more than one learning item with the same Trailhead or myTrailhead module. When you assign a learning item to a particular app or page, the item is visible in the side panel only to users who are in that app. It’s visible on Learning Home to all users, regardless of which app a user is in. To assign a learning item to a group, use a public group. You can't assign learning items to Roles and Subordinates or Roles and Internal Subordinates public group member types. You can’t assign learning items to permission set groups, personal groups, or Chatter groups. When you assign a Trailhead or myTrailhead module via Learning Paths, the module assignment appears in the learning panel and on Learning Home. It doesn’t appear on an assignee’s myTrailhead home page.

Modifying a Learning Item After you save a learning item, you can’t change its module, custom link, or due date. Delete the learning item and create another one with the module, link, or due date that you want to assign. To add more assignees to a learning item, use the Add Assignments feature on Learning Home. If a module is deleted from Trailhead or myTrailhead, any learning item that you created with that module remains in Learning Paths. To avoid confusing users, delete the learning item.

SEE ALSO: Assign a Learning Item for Learning Paths Monitor Learning Paths (Beta)

87 Extend Salesforce with Clicks, Not Code Custom Help Content

Assign a Learning Item for Learning Paths

You can assign a Trailhead or myTrailhead module or a custom learning item such as a video, tutorial, EDITIONS or reference guide. You can assign a learning item to individuals, public groups, or all users. And you can associate a learning item with an app and a particular object and page within the app. Available in: Lightning Until you assign content to a user, the user sees a few modules suggested by Trailhead in the Experience learning panel and on Learning Home. Available in: Developer, 1. To open the panel, click the icon for Learning Paths in the global header. Professional, Enterprise, Performance, and Unlimited Editions

Not Available for: Chatter External, Chatter Free, or 2. At the bottom of the panel, click Go to Learning Home. Communities (now known You can also get to Learning Home via the App Launcher. Add Learning Home to your navigation as Experience Cloud) user bar for easy access. licenses

3. On Learning Home, click Manage Learning Assignments, then click New. Only admins or myTrailhead Available in: users with the Manage Learning user permission have access to the Manage Learning Enterprise, Performance, Assignments page. and Unlimited Editions 4. In the New learning item window, select a content type, then search for a Trailhead or myTrailhead module or enter the URL for a custom link. USER PERMISSIONS

To manage as an admin • Modify All Data OR Customize Application To manage as a designated trainer • Manage Learning

When users click the link for a Trailhead or myTrailhead module in the side panel or on Learning Home, the item opens in the app. Custom links open in a new browser tab. If you like, you can put custom links that you previously included in the Help Menu in Learning Paths instead. 5. Under Location, specify where the learning item appears in the app by selecting an app and, if you like, an object and record.

• To make the learning item appear across Salesforce, select All for App and Object and Record.

88 Extend Salesforce with Clicks, Not Code Custom Help Content

• To make the learning item show up on every page in an app, select an app in the App picklist and select All in the Object and Record picklist. • To make the learning item show up for a specific object in an app, select a value in both the App and the Object and Record picklists. • To have the learning item show up for the same object across Salesforce, select All in the app picklist and select a value in the Object and Record picklist. • To add a module to a specific Setup page, enter a URL. If you don’t specify a URL, the module shows up on all pages in Setup.

6. Under Assignments, specify which users and public user groups see the module. If you don’t assign the module to at least one user or public group, it doesn’t show up in the app.

When you assign a learning item to a public group, the assignment also applies to members that you subsequently add to the group. The assignment is removed for members that you remove from the group. 7. To make the learning item required, include a due date.

8. Save your changes. 9. On the Manage Learning Assignments page, you can expand a row in the Name column to see all the users and groups that the learning item is assigned to.

Use the row-level actions for a learning item to edit, delete, or add assignees to the item. • To change the page that a learning item is assigned to, select Edit from the actions menu for the learning item. • To assign a learning item to another individual or group, select Add Assignments from the actions menu for the learning item. • To remove all assignments, select Unassign All in the row-level actions menu for the learning item. • To delete a particular assignment, select Remove Assignment from the row-level action menu for an individual or group.

89 Extend Salesforce with Clicks, Not Code Custom Help Content

We suggest that you let your users know about Learning Paths so they can watch for required content.

SEE ALSO: Considerations for Using Learning Paths Best Practices for Learning Paths and the Help Menu Find Help in Lightning Experience Customize the Help Menu in Lightning Experience Get Personalized Guidance While Setting Up and Enhancing Salesforce Plan Your myTrailhead Solution Your Trailblazer.me Profile Merge Trailblazer.me Accounts Personalize the Navigation Bar in Lightning Experience Personalized Navigation Considerations Add and Customize Tabs on Lightning Pages Using the Lightning App Builder What Is a Group? Create and Edit Groups

Monitor Learning Paths (Beta)

USER PERMISSIONS EDITIONS

To create custom reports and dashboards Manage Learning Reporting Available in: Lightning for Learning Paths Experience

To create and update custom report types Legacy Folder Sharing Available in: Developer, Create and Customize Reports Professional, Enterprise, Performance, and AND Unlimited Editions Manage Custom Report Types Not Available for: Chatter Enhanced Folder Sharing External, Chatter Free, or Create and Customize Reports Communities (now known AND as Experience Cloud) user licenses Manage Custom Report Types myTrailhead Available in: To delete custom report types Legacy Folder Sharing Enterprise, Performance, Create and Customize Reports and Unlimited Editions AND Manage Custom Report Types AND Modify All Data Enhanced Folder Sharing Create and Customize Reports AND

90 Extend Salesforce with Clicks, Not Code Custom Help Content

Manage Custom Report Types AND Modify All Data

Use custom reports and dashboards to track user engagement with Learning Paths, Trailhead, and myTrailhead.

Note: As a beta service, Monitoring Learning Paths is subject to the Beta Services terms at: https://www.salesforce.com/company/legal/agreements.jsp. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn’t guarantee general availability of this feature within any particular time frame or at all, and we can discontinue it at any time. This feature is for evaluation purposes only, not for production use. It’s offered as is and isn’t supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature.

Use Cases for Reporting on Learning Paths Learning Paths comes with four objects. Two of them give you information about Trailhead and myTrailhead, and two give you information about your assignments in Learning Paths. You can: • Track the number of Trailhead and myTrailhead modules completed, including total points earned and how long it took each user to complete each module. • Identify the modules that are the most popular with your users by tracking how many people complete each one. • Track the number of assigned modules that your users started but haven’t completed to get an idea of how helpful that learning item is. • Track how many learning items you assign in a given month and how many are in progress, overdue, or completed. • Filter your reports by user fields such as username, profile, role, manager, or locale. Here are examples of how you can use the four objects to track your users’ progress on learning items. Set up a custom report type using one of the following objects to monitor Learning Paths.

Object Pulls Data from... Create a Report Showing... Learning Content Trailhead and myTrailhead How many Trailhead or myTrailhead modules exist, by module title, and how many points a user can earn for each

Learning Content Progress Trailhead and myTrailhead How many Trailhead and myTrailhead modules your users completed Which users completed a particular Trailhead or myTrailhead module and how long it took them to finish How many myTrailhead modules are in progress How many total points earned company-wide

91 Extend Salesforce with Clicks, Not Code Custom Help Content

Object Pulls Data from... Create a Report Showing...

Learning Learning Paths How many individual users you assigned a learning item to and how many of those users completed the item

Learning Assignment Progress Learning Paths Which users you assigned a learning item to, which users have it in progress, and which users completed it Which users have an overdue learning assignment The percentage of your users that completed an assigned learning item

For example, create a report that associates the Learning Content object with the Learning object and Learning Assignments Progress object. Then you can review data on the modules that you assign to specific users and those users' progress on the assigned modules.

After you create reports, you can create a dashboard that shows key data.

1. Number of Trailhead and myTrailhead modules completed company-wide, by week 2. Most popular Trailhead and myTrailhead modules

92 Extend Salesforce with Clicks, Not Code Custom Help Content

3. Number of Trailhead and myTrailhead modules completed company-wide 4. Number of hours spent reading Trailhead and my Trailhead modules company-wide 5. Number of points earned company-wide 6. Number of Trailhead and myTrailhead modules that your users have started but not yet finished

Considerations for Monitoring Learning Paths You can track user engagement with Trailhead and myTrailhead modules, but not with custom links. Reports using the Learning Content and Learning Content Progress objects show a maximum of 1,000 rows. You can filter a report on the Learning Content Progress object by the date when a user began a module, but not when a user completed the module. You can’t filter a report on the Learning Assignment Progress object by the date when a user completed a module. To report on users' learning assignment progress, filter your report on the Title field from the Learning Content object. You can't create a report that shows users' progress on all assigned Trailhead modules. You can’t track how many public groups or public group members you assigned a learning item to. For more details on limitations for reports on Learning Paths, see Limits on Report Types and Report Considerations for Salesforce Connect—All Adaptors in Salesforce Help.

SEE ALSO: Assign a Learning Item for Learning Paths Create a Custom Report Type Limits on Report Types Manage Custom Report Types Build a Lightning Experience Dashboard Reports

Customize the Help Menu in Lightning Experience

The Help icon in the header opens a menu of contextual help topics, Trailhead modules, videos, EDITIONS and more items chosen by Salesforce. You can supplement the recommended resources by adding a section with links to your own content. Your section appears at the top of the Help Menu on each Available in: Lightning page. There’s only one custom Help Menu section per org. You can’t add links to the Getting Started, Experience Help For This Page, or More Resources sections. Available in: Group, 1. From Setup in Lightning Experience, in the Quick Find box, enter Help Menu, and then select Professional, Enterprise, Help Menu. Performance, Unlimited, 2. Enter a title for the custom section. Salesforce recommends naming the section so that users and Developer Editions understand that the resources are custom help for your org or company. For example, Acme Company Help. Labels aren’t translated and appear as you’ve entered them. USER PERMISSIONS 3. Tip: List the most important resources first. Only the first two resources are shown in To create custom help: each section. Users can view all resources by clicking the section name or the arrow. • Customize Application OR Modify All Data

93 Extend Salesforce with Clicks, Not Code Custom Help Content

Add labels and URLs for the resources. For example, Sales Tips and https://www.acmecustomhelp.com/pdf/salestips.pdf. You can add up to 30 resources. Items are listed in the Help Menu in the order that they appear on the setup page. 4. Save your changes. 5. Turn on Customize the Help Menu. You can hide sections and links to content created by Salesforce from users. Under the Salesforce Help Content section, turn off the sections and links that you want to hide. As an admin with the Customize Application or Modify All Data user permission, you always see all resources, including a link to the release notes. If you turn off the link to Get Support, the corresponding link in the Salesforce feedback form is also not displayed to users.

Important: If you install a package with custom Help Menu resources, they don't appear in your Help Menu Setup page or in the Help Menu user interface. To add resources per the package suggestions, use the CustomHelpMenuItem and CustomHelpMenuSection SOAP API objects to view the information contained in the package. Then manually add any resources to the Help Menu Setup page. The Help Menu isn’t supported in the Salesforce mobile app.

SEE ALSO: Find Help in Lightning Experience

Custom Help in Salesforce Classic In Salesforce Classic, object-level help replaces the links for a custom object or external object page. Replace built-in Salesforce Help with documentation that’s customized for your users.

Object-Level Help in Salesforce Classic Help your users by providing object-level help for all custom objects and external objects. This way, when your users click the Help for this Page link on your custom object, they’ll find useful information that’s relevant to your custom object. When you add custom help to a custom or external object, the Help for this Page link on those object pages displays your custom help instead of generic help. Your users can access the custom help content from the object home (overview), detail, and edit pages, list views, and related lists.

Object-Level Help in Salesforce Classic Help your users by providing object-level help for all custom objects and external objects. This way, when your users click the Help for this Page link on your custom object, they’ll find useful information that’s relevant to your custom object. When you add custom help to a custom or external object, the Help for this Page link on those object pages displays your custom help instead of generic help. Your users can access the custom help content from the object home (overview), detail, and edit pages, list views, and related lists.

Note: If you don’t create object-level help, the Help for this Page link provides information about standard objects that won’t be relevant to your custom object. You can override the Help for this Page links for a custom object or external object with help content contained in a Visualforce page. But don’t worry! You don’t have to learn Visualforce to add help content to your custom objects.

94 Extend Salesforce with Clicks, Not Code Custom Help Content

Define Org-Level Help in Salesforce Classic If you rename standard tabs, objects, fields, and other related user interface labels, you can also replace the built-in Salesforce Help with documentation that’s customized specifically for your users. To replace the built-in help, simply provide a URL to your custom help. This feature is available for Salesforce Classic only.

SEE ALSO: Custom Help Content Define Object-Level Help in Salesforce Classic Object-Level Help Considerations in Salesforce Classic

Define Object-Level Help in Salesforce Classic

Object-level help overrides the Help for this Page links for a custom object or external object with EDITIONS your own help content contained in a Visualforce page. To make object-level help available to all your users, create a Visualforce page that contains your help content. Then edit the custom or Available in: Salesforce external object definition to reference the page. Object-level help becomes available to all your Classic users instantly. Custom objects are 1. Create a Visualforce page that contains your help content. available in: Contact 2. Edit the custom object definition or external object definition that uses the custom help when Manager, Group, users click the Help for this Page link. Professional, Enterprise, Performance, Unlimited, 3. For Context-Sensitive Help Setting, select Open a window using a Visualforce and Developer Editions page. Salesforce Connect external 4. Select the Visualforce page that contains your help content. objects are available in: 5. Save you work. Developer Edition and for an extra cost in: Enterprise, Performance, and SEE ALSO: Unlimited Editions Object-Level Help in Salesforce Classic Custom Help Content USER PERMISSIONS

To define or change object-level help: • Customize Application

95 Extend Salesforce with Clicks, Not Code Custom Help Content

Create a Custom Object Help Page with Static Content in Salesforce Classic

If you know HTML, it’s easy to add help to your custom objects by writing the content in HTML and EDITIONS saving it in a Visualforce page. No need to learn Visualforce. Just use the template that we provide. 1. From Setup, enter Visualforce Pages in the Quick Find box, then select Visualforce Available in: Salesforce Pages. Classic 2. Click New. Custom objects are The Visualforce page editor opens with a new page. available in: Contact 3. Complete the following fields. Manager, Group, Professional, Enterprise, Performance, Unlimited, Field Description and Developer Editions Label The human-friendly name of the page used to identify the page in Salesforce Connect external Setup tools. objects are available in: Developer Edition and for Tip: It’s a great idea to have a naming convention for your an extra cost in: Enterprise, custom help pages. For example, start all custom help pages Performance, and with “Help_” and then the object name. Unlimited Editions

Name The API name for the page. You can use the auto-filled value. Visualforce is available in: Contact Manager, Group, Description An optional description of the page. Professional, Enterprise, Performance, Unlimited, Available for Select this option if your custom object is available in the Salesforce and Developer Editions Lightning Experience, mobile app. Experience Builder sites, and the mobile USER PERMISSIONS app To define or change object-level help: • Customize Application 4. Click Quick Save. To create or edit Visualforce 5. In the Visualforce Markup tab code editor, select the default code and delete it. pages: 6. Paste the following help template code into the code editor. • Customize Application

Help for {YourObjectName} Object

Your custom help message here.

7. Click Quick Save. 8. Edit the template to add your help content. To add formatting to your page, use HTML markup. You can also use Visualforce markup if you know it.

9. Click Save.

96 Extend Salesforce with Clicks, Not Code Custom Help Content

You can now add this page as custom help. When users click Help for this Page, they see this page in the Help & Training window.

SEE ALSO: Define Object-Level Help in Salesforce Classic Create Custom Object Help with a PDF File in Salesforce Classic Object-Level Help Considerations in Salesforce Classic

Create Custom Object Help with a PDF File in Salesforce Classic

Add help to your custom objects by creating Visualforce pages that redirect to PDF help files or a EDITIONS URL. No need to learn Visualforce. Just use the template that we provide. You can write your help content in an authoring tool such as Microsoft Word and convert it to a Available in: Salesforce PDF file. Classic 1. Upload your PDF file as a static resource. Custom objects are Users see this PDF file when they request help with the custom object. available in: Contact Manager, Group, 2. From Setup, enter Visualforce Pages in the Quick Find box, then select Visualforce Professional, Enterprise, Pages. Performance, Unlimited, 3. Click New. and Developer Editions The Visualforce page editor opens with a new page. Salesforce Connect external objects are available in: 4. Complete the following fields. Developer Edition and for an extra cost in: Enterprise, Field Description Performance, and Label The human-friendly name of the page used to identify the page in Unlimited Editions Setup tools. Visualforce is available in: Contact Manager, Group, Tip: It’s a great idea to have a naming convention for your Professional, Enterprise, custom help pages. For example, start all custom help pages Performance, Unlimited, with “Help_” and then the object name. and Developer Editions

Name The API name for the page. You can use the auto-filled value.

Description An optional description of the page. USER PERMISSIONS

Available for Select this option if your custom object is available in the Salesforce To define or change Lightning Experience, mobile app. object-level help: • Customize Application Experience Builder sites, and the mobile To create or edit Visualforce app pages: • Customize Application

5. Click Quick Save. 6. In the Visualforce Markup tab code editor, select the default code and delete it. 7. Paste the following help template code into the code editor.

97 Extend Salesforce with Clicks, Not Code Custom Help Content

Redirecting to help content...

8. Replace YourCustomHelpResource in the action attribute with the name of the static resource that you uploaded. 9. Click Save. You can now add this page as help. When users click Help for this Page, they’re redirected to the resource you set in the action attribute.

Note: The user’s browser controls the behavior of a PDF link, not your Visualforce page. The PDF content might display in the browser or be downloaded as a PDF file.

SEE ALSO: Define Object-Level Help in Salesforce Classic Create a Custom Object Help Page with Static Content in Salesforce Classic Object-Level Help Considerations in Salesforce Classic

Object-Level Help Considerations in Salesforce Classic

Before defining object-level help text for your custom or external objects, review these best practices EDITIONS and implementation considerations. Available in: Salesforce Best Practices Classic (not available in all orgs) • The window that displays your object-level help has the same height and width dimensions as the standard Salesforce Help & Training window. To increase the usability of your help content, Custom objects are size and style your content appropriately. available in: Contact Manager, Group, • Your Visualforce help content pages can use merge fields or other functions to make the Professional, Enterprise, experience more personalized. For example, you can design the help to add the user’s name Performance, Unlimited, when the help page is displayed. and Developer Editions Salesforce Connect external Advanced Implementation Considerations objects are available in: • Create custom help Visualforce pages without a controller, or use a custom controller. You can’t Developer Edition and for use a standard controller. an extra cost in: Enterprise, Performance, and • If you have defined object-level help for an object that you add to a Salesforce AppExchange Unlimited Editions package, Salesforce adds the Visualforce page or static resource referenced in your Context-Sensitive Help Settings for that object. Visualforce is available in: Contact Manager, Group, • In managed packages, object-level help is locked to the developer, giving installers the ability Professional, Enterprise, to change it if needed. Performance, Unlimited, and Developer Editions SEE ALSO: Define Object-Level Help in Salesforce Classic Object-Level Help in Salesforce Classic

98 Extend Salesforce with Clicks, Not Code Tailor Business Processes to Different Users Using Record Types

Define Org-Level Help in Salesforce Classic

If you rename standard tabs, objects, fields, and other related user interface labels, you can also EDITIONS replace the built-in Salesforce Help with documentation that’s customized specifically for your users. To replace the built-in help, simply provide a URL to your custom help. This feature is available Available in: Salesforce for Salesforce Classic only. Classic (not available in all Users can view this URL whenever they click on any context-sensitive help link on an end-user page orgs) or within their personal settings. After you replace the help, the Help & Training link at the very Available in: All Editions top of every page and all Setup pages will continue to display the Salesforce Help. except Database.com 1. From Setup, enter Help Settings in the Quick Find box, then select Help Settings. 2. Enter the complete URL for your help file that you would like to replace the Salesforce Help. 3. Click Save.

Considerations for Replacing the Salesforce Help • When you replace the Salesforce Help with your own help file, the Help & Training link still displays Salesforce Help. However, other than within Setup, the Help for this Page links on all pages are no longer context-sensitive. That is, your help file will open at the same place regardless of which page the user is viewing when they click the link. • You can make your help context-sensitive by taking advantage of the context-specific parameters that are passed with each help link. For example, the help link from the Opportunities tab home page is constructed as follows (without any line breaks): http://your_help_file.com?loc=help&body=%2Fhelp%2Fdoc%2Fen%2Fhelp2.jsp &target=opp_overview.htm§ion=Opportunities The values of the target and section parameters are unique for every page within the application. You can parse these parameters to display context-sensitive help content for your users.

Tailor Business Processes to Different Users Using Record Types

Record types let you offer different business processes, picklist values, and page layouts to different EDITIONS users. You might create record types to differentiate your regular sales deals from your professional services engagements, offering different picklist values for each. Or you might display different page Available in: both Salesforce layouts for your customer support cases versus your billing cases. Classic and Lightning Example: Here’s an example of how record types can work in your org. Let’s say you have Experience two sales divisions, hardware and consulting, and only your consulting division receives leads Available in: Professional, through seminars. You can choose to display the Seminar contact lead source for the consulting Enterprise, Performance, division only. Unlimited, and Developer Step 1: Manage master picklists Editions Define a list of contact Lead Source picklist values that contains all the values used by both the Hardware and Consulting divisions, including Seminar. USER PERMISSIONS Step 2: Create record types To create or change record Create two contact record types: one called Hardware and another called Consulting. types: This step includes adding master picklist values to the record types. • Customize Application Step 3: Add record types to profiles Add the Hardware record type to the profiles for all users in the hardware sales division. Add the Consulting record type to the profiles of all users in the consulting sales division.

99 Extend Salesforce with Clicks, Not Code Tailor Business Processes to Different Users Using Record Types

Step 4: Set personal options for record types Allow users of both the hardware and consulting sales divisions to bypass the prompt that asks them to select a record type when creating a contact. If you have users that create contact records for both sales divisions, they can customize their personal settings to always prompt them to select a record type.

Considerations for Creating and Updating Record Types and Picklists Keep these considerations in mind when working with record types and business process picklists. Create Record Types Edit Picklists for Record Types and Business Processes Customize the values in record type or business process picklists based on your organization’s unique needs. Limitations for Creating and Updating Record Types and Picklists Keep these limitations in mind when working with record types and business process picklists. Managing Multiple Business Processes Use multiple business processes to display different picklist values according to each user’s profile. Use multiple business processes to track separate sales, support, and lead lifecycles. Create Multiple Business Processes

SEE ALSO: How Is Record Type Access Specified?

Considerations for Creating and Updating Record Types and Picklists

Keep these considerations in mind when working with record types and business process picklists. EDITIONS

General Available in: both Salesforce Classic and Lightning • If each profile is associated with a single record type, users will never be prompted to select a Experience record type when creating records. Available in: Professional, • Don’t name your record type Master because it’s reserved for record types. Enterprise, Performance, • Don’t use record types as an access control mechanism. Profile assignment governs create and Unlimited, and Developer edit access for an object but doesn’t govern read access. For example, a user assigned to a Editions profile that isn't enabled for a particular record type can't create records with that record type, but can access records associated with that record type. Users with access to an object can read all record type information for that object. • We strongly recommend against storing sensitive information in the record type description, name, or label. Instead, store sensitive information in a separate object or fields to which you applied appropriate access controls. • A user can be associated with several record types. For example, a user who creates marketing campaigns for both US and European divisions can have both US and European campaign record types available when creating campaigns. • When creating and editing record types for accounts, opportunities, cases, contacts, or custom objects, check for criteria-based sharing rules that use existing record types as criteria. A record type change may affect the number of records that the rule shares. For example, let's say you have a record type named Service, and you created a criteria-based sharing rule that shares all Service record types with your service team. If you create another record type named Support, and you want these records shared with your service team, update the sharing rule to include Support record types in the criteria. • Deleting a record type also deletes the related path.

100 Extend Salesforce with Clicks, Not Code Tailor Business Processes to Different Users Using Record Types

• Business and person accounts require at least one active record type. • Deleting campaign member record types updates the Campaign Member Type field on campaign and campaign member records. • Person accounts are account records to which a special record type has been assigned. These record types are called person account record types. Person account record types allow contact fields to be available on the account and allow the account to be used as if it were a contact. A default person account record type named Person Account is automatically created when person accounts are enabled for your org. You can change the name of this record type, and you can create more person account record types. • From the UI, you can change an account’s record type from a business account to a business account or from a person account to a person account. However, to change an account’s record type from a business account to a person account, or vice versa, you must use the API. • When users convert, clone, or create records, these special considerations apply. – When a user converts a lead, the new account, contact, and opportunity records use the default record type for the owner of the new records. The user can choose a different record type during conversion. – When a user clones a record, the new record has the record type of the cloned record. If the user’s profile doesn’t have access to the record type of the cloned record, the new record adopts the user’s default record type. – When a user creates a case or lead and applies assignment rules, the new record can keep the creator’s default record type or take the record type of the assignee, depending on the case and lead settings specified by the administrator.

• Changing a record type causes Lightning pages to refresh.

Deactivating Record Types Consider these guidelines if you are deactivating a record type. • Deactivating a record type doesn’t remove it from any user profiles or permission sets. • Deactivating a record type means that no new records can be created with the record type. However, any records that were previously created with the record type are still associated with it and with its associated page layout. • To deactivate all record types from an object, remove all record types from all the profiles and deactivate the record types. Then create one new record type and activate it, but don’t add it to any profiles. One record type must exist to enable existing records that used the deactivated record types to display properly. If you encounter any issues inline editing a record in Lightning Experience after deactivating a record type, edit the Page Layout Assignment so that another layout on the object, such as the default layout, is used for the custom record type. Otherwise, consider reactivating the disabled record type.

Record Types and Picklists • Before creating record types, include all the possible record type values in your master list of picklists. The master picklist is a complete list of picklist values that can be used in any record type. • The master picklist is independent of all record types and business processes. If you add a picklist value to the master picklist, you must manually include the new value in the appropriate record types. If you remove a picklist value from the master, it is no longer available when creating records, but records assigned to that value are unchanged.

101 Extend Salesforce with Clicks, Not Code Tailor Business Processes to Different Users Using Record Types

• When you create a record type without cloning an existing one, the new record type automatically includes the master picklist values for both standard and custom picklists. You can then customize the picklist values for the record type.

SEE ALSO: Tailor Business Processes to Different Users Using Record Types Create Record Types Limitations for Creating and Updating Record Types and Picklists

Create Record Types

Tip: Before creating record types, include all of the possible record type values in your master EDITIONS list of picklists. The master picklist is a complete list of picklist values that can be used in any record type. Available in: both Salesforce 1. From the management settings for the appropriate object, go to Record Types. Classic and Lightning Experience 2. Click New. Available in: Professional, 3. Select Master from the Existing Record Type dropdown list to copy all available picklist values, Enterprise, Performance, or choose an existing record type to clone its picklist values. Unlimited, and Developer Note: When you create a record type without cloning an existing one, the new record Editions type automatically includes the master picklist values for both standard and custom picklists. You can then customize the picklist values for the record type. USER PERMISSIONS

4. Enter a Record Type Label that's unique within the object. To create or change record types: Important: Don’t name your record type Master because it’s reserved for record types. • Customize Application

5. Enter a Record Type Name. The Record Type Name refers to the component when using the Web services API and prevents naming conflicts on package installation in managed packages. 6. For opportunity, case, lead, and solution record types, select a business process to associate with the record type. 7. Enter a description. 8. Select Active to activate the record type. 9. Select Make Available next to a profile to make the record type available to users with that profile. Select the checkbox in the header row to make it available for all profiles.

Tip: If each profile is associated with a single record type, users will never be prompted to select a record type when creating records. Users assigned to a record type can still view and edit records associated with record types not enabled for their profiles.

10. For selected profiles, select Make Default next to a profile to make it the default record type for users of that profile. Select the checkbox in the header row to make it the default for all profiles. 11. Click Next. 12. Choose a page layout option to determine what page layout displays for records with this record type: • To apply a single page layout for all profiles, select Apply one layout to all profiles and choose the page layout from the dropdown list. • To apply different page layouts based on user profiles, select Apply a different layout for each profile and choose a page layout for each profile.

102 Extend Salesforce with Clicks, Not Code Tailor Business Processes to Different Users Using Record Types

13. Click Save to edit the values of the standard and custom picklists available for the record type, or click Save and New to create another record type.

SEE ALSO: Tailor Business Processes to Different Users Using Record Types Considerations for Creating and Updating Record Types and Picklists Limitations for Creating and Updating Record Types and Picklists

Edit Picklists for Record Types and Business Processes

Customize the values in record type or business process picklists based on your organization’s EDITIONS unique needs. 1. Select a record type or business process and click Edit next to the picklist field to change its Available in: both Salesforce values. Classic and Lightning Experience 2. Add or remove values as needed. Users can choose from these values when creating or editing records. Record types are available 3. Optionally, choose a default picklist value. Some picklists require a default value. The default in: Professional, Enterprise, Performance, Unlimited, value in a dependent field is ignored. and Developer Editions 4. Click Save. Business processes are available in: Enterprise, SEE ALSO: Performance, Unlimited, Custom Fields and Developer Editions

USER PERMISSIONS

To create or change record types: • Customize Application To create or change business processes: • Customize Application

Limitations for Creating and Updating Record Types and Picklists

Keep these limitations in mind when working with record types and business process picklists. EDITIONS • These special picklist fields aren’t available for record types because they are used exclusively for sales processes, lead processes, support processes, and solution processes: Available in: both Salesforce Classic and Lightning – Opportunity Stage Experience – Case Status Available in: Professional, – Solution Status Enterprise, Performance, – Lead Status Unlimited, and Developer You can use these fields to provide different picklist values for different record types by assigning Editions a different process to each record type. • These campaign member picklists aren’t available for record types:

103 Extend Salesforce with Clicks, Not Code Tailor Business Processes to Different Users Using Record Types

– Status – Salutation – Lead Source

• You can’t edit or delete a record type for an object if the object is referenced in Apex. • You can’t deactivate a record type if it is in use by an email routing address for Email-to-Case or On-Demand Email-to-Case. • Record types can only be assigned to campaign members using the Campaign Member Type field on new or existing campaigns. To assign record types to campaign members, add the Campaign Member Type field to the campaign page layout. You must have the Marketing User user permission to change the campaign member type. You can also add a read-only Campaign Member Type field to the campaign members page layout. • We recommend creating no more than 200 record types. While there is no limit, orgs may have difficulty managing their record types if they exceed 200.

SEE ALSO: Create Record Types Considerations for Creating and Updating Record Types and Picklists

Managing Multiple Business Processes

Use multiple business processes to display different picklist values according to each user’s profile. EDITIONS Use multiple business processes to track separate sales, support, and lead lifecycles. Sales Processes Available in: both Salesforce Create different sales processes that include some or all of the picklist values available for the Classic and Lightning opportunity Stage field. Experience Lead Processes Available in: Enterprise, Create different lead processes that include some or all of the picklist values available for the Performance, Unlimited, Lead Status field. and Developer Editions Support Processes Create different support processes that include some or all of the picklist values available for USER PERMISSIONS the case Status field. To create or change Solution Processes business processes: Create different solution processes that include some or all of the picklist values available for • Customize Application the Status field. After creating a sales, support, lead, or solution process, assign the process to a record type. The record type determines the user profiles that are associated with the business process. To view a list of business processes, from Setup, enter Processes in the Quick Find box, then select the appropriate link.

SEE ALSO: Edit Picklists for Record Types and Business Processes

104 Extend Salesforce with Clicks, Not Code Manage Your Translations

Create Multiple Business Processes

Follow these steps to create sales processes, support processes, lead processes, and solution EDITIONS processes. 1. From Setup, enter Processes in the Quick Find box, then select the appropriate link. Available in: both Salesforce Classic and Lightning 2. Click New. Experience 3. Choose an existing process to copy its picklist values into the new process. Select Master to copy all available picklist values. Available in: Enterprise, Performance, Unlimited, 4. Enter a name and description for the new process. The name must be unique within the tab. and Developer Editions 5. Click Save. All of the available values in the picklist are displayed. Choose the values that you would like USER PERMISSIONS included in the new business process. To create or change Next, add the new business process to a record type, and then make the record type available to business processes: users based on profile. • Customize Application

Manage Your Translations

If your Salesforce org has multiple languages enabled, manage translations so that your global users EDITIONS can use Salesforce in their language.

Note: Standard objects aren’t available in Translation Workbench. Use the rename tabs and Metadata translation labels interface for standard object translation. available in: Salesforce Classic (not available in all orgs) and Lightning Metadata Translation Experience When you enable multiple languages in your Salesforce org, Salesforce translates some labels Data translation available in: for you, based on the language type. For labels without a default translation, you can localize Lightning Experience your apps and custom functionality for any Salesforce supported language through metadata translation. Available in: Professional, Data Translation Enterprise, Performance, Unlimited, and Developer When data translation is enabled, the data stored in the B2B Commerce Product and Product Editions Category objects’ Name and Description fields is available for translation. You can also enable data translation for custom text and URL fields on those objects. Data translation applies to: B2B Commerce Translation Workbench Use Translation Workbench to maintain translated values for metadata and data labels in your Salesforce org. Specify languages for translation and assign translators for each language. Manage translated values for any Salesforce supported language. Translators can maintain translations directly through the workbench, or you can export translation files for bulk translation imports. Translation Considerations Review considerations for managing your translations and translating flows.

105 Extend Salesforce with Clicks, Not Code Manage Your Translations

Metadata Translation

When you enable multiple languages in your Salesforce org, Salesforce translates some labels for EDITIONS you, based on the language type. For labels without a default translation, you can localize your apps and custom functionality for any Salesforce supported language through metadata translation. Available in: Salesforce Salesforce-provided translations vary by language type. Classic (not available in all orgs) and Lightning Language Type Translations Provided by Salesforce Experience Fully supported languages Metadata labels for all standard features, plus Available in: Professional, Help. Enterprise, Performance, Unlimited, and Developer End-user languages Metadata labels for all standard objects and Editions pages, except admin pages and Setup. No translations for Help.

Platform-only languages None

In situations where Salesforce doesn’t provide default translations, metadata translation allows you to localize apps and custom functionality that you build in Salesforce. You can translate items such as custom labels, custom objects, and field names.

Metadata Available for Translation You can translate metadata labels only for certain Salesforce Setup components. Flow Components for Metadata Translation Flow components are the parts of a flow you can translate.

SEE ALSO: Supported Languages Translation Workbench

Metadata Available for Translation

You can translate metadata labels only for certain Salesforce Setup components. EDITIONS Note: Standard objects aren’t available in Translation Workbench. Use the rename tabs and labels interface for standard object translation. Available in: Salesforce Classic (not available in all To view the translatable metadata labels in your Salesforce organization, first enable Translation orgs) and Lightning Workbench. Then, from the Translate Setup page, select a Setup component. If needed, select Experience Object, Custom Report Type Entity, Flow, Flow Type, Flow Component, or Aspect. Available in: Professional, You can translate the following components. Enterprise, Performance, • Action Unlimited, and Developer • Address Country Editions • Address State • Apex Sharing Reason • App • Button and Link Label

106 Extend Salesforce with Clicks, Not Code Manage Your Translations

• Chatter Extension • Custom Field • Custom Report Type • Data Category • Data Category Group • Division • Feed Filter • Field Set • Flow • Global Value Set • Layout Section • Lookup Filter • Managed Content Node Type • Managed Content Type • Navigation Menu Item (for Experience Cloud sites) • Path Step Rich Text • Picklist Value • Prompt • Prompt Version • Record Type • Reputation Level (for Experience Cloud sites) • S-Control • Solution Category • Stamp • Standard Field Help • Validation Error Message • Web Tab (also includes Lightning component and Visualforce tabs) • Workflow Task

Important: Visualforce pages supersede s-controls. Organizations that haven’t previously used s-controls can’t create them. Existing s-controls are unaffected, and can still be edited.

SEE ALSO: Supported Languages Translation Workbench

107 Extend Salesforce with Clicks, Not Code Manage Your Translations

Flow Components for Metadata Translation

Flow components are the parts of a flow you can translate. EDITIONS

Flow Description Where Translation Appears Available in: Salesforce Component Classic (not available in all Definition The flow name The flow interview’s title bar. orgs) and Lightning Experience Version The version label of a flow The active flow version label is the flow Available in: Professional, definition label by default, so it appears Enterprise, Performance, in the flow interview's title bar. When Unlimited, and Developer you enter the flow definition and its Editions translation manually, the translated definition label overrides the active flow version label. When the flow definition label doesn't have a translation, the translated version label appears as the flow interview's title.

Screen Info Aspect includes help text and paused Help text and paused messages for the messages overall screen.

Screen Field Aspect includes labels, description, help Field-level text on a screen. The text, and error messages for screen description aspect is the text for screen components that don't require output components. Lightning runtime

Choice Aspect includes field labels, help text, Field-level text for choice components. text input labels

Stage Stage labels Screen components that can reference stage labels, including Display Text components and attributes for screen components that require Lightning runtime.

Text Template Aspect includes text in a text template All the pages of a survey. Available only in Salesforce Surveys.

SEE ALSO: Metadata Translation Translation Workbench Considerations for Translating Flows

108 Extend Salesforce with Clicks, Not Code Manage Your Translations

Data Translation

When data translation is enabled, the data stored in the B2B Commerce Product and Product EDITIONS Category objects’ Name and Description fields is available for translation. You can also enable data translation for custom text and URL fields on those objects. Available in: Lightning Note: Data translation requires API version 48.0 or later. Experience Available in: Enterprise, Performance, and Enable Data Translation Developer Editions Allow translation of data stored within the Name and Description fields on the Product and Product Category objects. Applies to: B2B Commerce Enable Data Translation for Custom Fields Allow translation of data stored in custom fields on the Product and Product Category objects. You can enable data translation on custom fields with a type of Text, Text Area, Text Area (Long), Text Area (Rich), and URL.

Enable Data Translation

Allow translation of data stored within the Name and Description fields on the Product and Product EDITIONS Category objects.

Note: Before enabling data translation, note these important considerations: Available in: Lightning Experience • Data translation requires API version 48.0 or later. Available in: Enterprise, • Data translation counts against your Salesforce org’s storage limits. Performance, and 1. From Setup, in the Quick Find box, enter Company Information, and then select Developer Editions Company Information. Applies to: B2B Commerce 2. In the Organization Detail section, click Edit. 3. Select Enable Data Translation. USER PERMISSIONS 4. Click Save. To view company Data translation is now available for the Name and Description fields through the Translation information: tab within Product. You can also manage your data translations through the Export and Import • View Setup and options within Translation Workbench. Configuration

5. Optional: Enable data translation for custom fields. To change company information: • Modify All Data SEE ALSO: Translation Workbench B2B Commerce on Lightning Experience Create Product Data Translations for B2B Stores Data and File Storage Allocations

109 Extend Salesforce with Clicks, Not Code Manage Your Translations

Enable Data Translation for Custom Fields

Allow translation of data stored in custom fields on the Product and Product Category objects. You EDITIONS can enable data translation on custom fields with a type of Text, Text Area, Text Area (Long), Text Area (Rich), and URL. Available in: Lightning Before enabling data translation for custom fields, you must enable data translation. Experience

Note: Data translation requires API version 48.0 or later. Available in: Enterprise, Performance, and 1. From Setup, in the Quick Find box, enter Data Translation Settings, and then Developer Editions select Data Translation Settings. Applies to: B2B Commerce 2. Select an object to enable data translation for its custom fields. Only objects that support data translation are listed. USER PERMISSIONS 3. Select the custom fields that you want to make available for data translation. To change data translation Data translation can only be enabled on custom fields with a type of Text, Text Area, Text Area settings: (Long), Text Area (Rich), and URL. • Customize Application 4. Click Save. AND If your B2B Commerce Store supports multiple languages, data translation is now available for the Modify All Data selected custom fields through the Translation tab within Product and Product Category. You can also manage your data translations through the Export and Import options within Translation Workbench.

SEE ALSO: B2B Commerce on Lightning Experience Create Product Data Translations for B2B Stores Translation Workbench

Translation Workbench

Use Translation Workbench to maintain translated values for metadata and data labels in your EDITIONS Salesforce org. Specify languages for translation and assign translators for each language. Manage translated values for any Salesforce supported language. Translators can maintain translations Metadata translation directly through the workbench, or you can export translation files for bulk translation imports. available in: Salesforce Note: Translation Workbench is only available for multi-language orgs. If you aren’t sure Classic (not available in all orgs) and Lightning whether you have a single-language or multi-language organization, contact Salesforce Experience Customer Support. Data translation available in: Lightning Experience Enable or Disable Translation Workbench Translation Workbench allows you to specify languages for translation, assign translators, and Available in: Professional, manage your translations through the workbench or bulk translation. Enterprise, Performance, Unlimited, and Developer Add Translated Languages and Translators Editions Add languages for translation, assign translators for each language, and activate or deactivate a language’s translations. Data translation applies to: B2B Commerce

110 Extend Salesforce with Clicks, Not Code Manage Your Translations

Translate Metadata Labels Create and update metadata translations for customizations you make to your Salesforce organization, such as custom picklist values and custom field labels. Override Translations in Second-Generation Managed Packages and Unlocked Packages You can override metadata translations for custom objects in namespaced unlocked packages and second-generation managed packages. For example, override the label on a custom field or workflow task. Export Metadata Translation Files Create files for your translators that contain your Salesforce org’s translatable metadata. Examples of translatable metadata include custom field labels, report type names, and picklist values. Export Data Translation Files If data translation is enabled in your Salesforce org, you can create files for your translators that contain your org’s data translations. Examples of translatable data include B2B Commerce Product names and data stored in custom fields. Work with Translation Files Translate metadata labels or data translation text, or review existing translations, with XML Localization Interchange File Format (.xlf) or Salesforce Translation Format (.stf) files. Import Translated Files Import and update the translations for your Salesforce org’s metadata, such as custom fields, report types, and picklist values. Or import and update data translations, such as Product names. Typically, you export translation files from Salesforce, then send them to outside translators or a translation agency for bulk translation activities. You then import the translated files. Common Errors with Exporting and Importing Translation Files Troubleshoot issues you can encounter while exporting and importing files in Translation Workbench.

SEE ALSO: Supported Languages Rename Object, Tab, and Field Labels

Enable or Disable Translation Workbench

Translation Workbench allows you to specify languages for translation, assign translators, and EDITIONS manage your translations through the workbench or bulk translation. Available in: Salesforce Enable Translation Workbench Classic (not available in all orgs) and Lightning Translation Language Settings 1. From Setup, in the Quick Find box, enter , and Experience then select Translation Language Settings. Available in: Professional, 2. On the welcome page, click Enable. Enterprise, Performance, Enabling Translation Workbench makes these changes to your Salesforce org. Unlimited, and Developer • The Manage Translation systems permission is available in permission sets. Editions • You must edit picklist values individually. You can’t mass-edit existing picklist values, but you can still mass-add new values. USER PERMISSIONS

• When picklist values are sorted alphabetically, the values are alphabetical by the org’s default To enable and disable language. Translation Workbench: • Modify All Data

111 Extend Salesforce with Clicks, Not Code Manage Your Translations

• Reports have a Filter Language dropdown list in the Filters pane of the report builder. Selecting a language filters on translated strings for any filter criteria that use the starts with, contains, or does not contain operator. • Import files have a Language dropdown list, and all records and values within the import file must be in the selected language. • Web-to-Lead and Web-to-Case have a Language dropdown list before you generate the HTML. If a customized component doesn’t have a translated value, the component uses the org’s default language. When you deactivate a language, all translations for that language are still available in Translation Workbench. However, users with that language selected see the org’s default language values.

Disable Translation Workbench To disable Translation Workbench, from Setup, in the Quick Find box, enter Translation Language Settings, and then select Translation Language Settings. Click Disable.

Note: In a Developer org with a managed package containing translations, Translation Workbench can’t be disabled after it is enabled.

SEE ALSO: Supported Languages Select Your Language, Locale, and Currency Rename Object, Tab, and Field Labels

Add Translated Languages and Translators

Add languages for translation, assign translators for each language, and activate or deactivate a EDITIONS language’s translations.

Note: The Manage Translation permission is enabled by default in the System Administrator Available in: Salesforce profile. Classic (not available in all orgs) and Lightning Before adding a language for translation, you must select languages for your org and enable Experience Translation Workbench. Available in: Professional, Translation Language Settings 1. From Setup, in the Quick Find box, enter , and Enterprise, Performance, then select Translation Language Settings. Unlimited, and Developer 2. To activate a new language, click Add. Or to change an existing supported language, click Edit. Editions 3. If adding a language, choose a language. 4. To make the entered translations available to your users, select Active. Users can change USER PERMISSIONS their personal language anytime, regardless of whether it's active in the Translation Workbench. To add or edit languages: Active Selecting makes the translations available to the users in that language. • Manage Translation We recommend that you don't make a language active until the translators have translated all To assign translators: values. • Manage Translation Note: If you installed a managed package that includes translations, those translated values appear to users regardless of whether the language is active on the Translation Language Settings Setup page. To override metadata translations delivered by a managed package for custom objects, see Override Translations in Second-Generation Managed Packages and Unlocked Packages.

112 Extend Salesforce with Clicks, Not Code Manage Your Translations

5. To assign translators for this language, select them from the Available List, and click Add. If you don’t see the member that you want to add, enter keywords in the search box, and click Find.

Important: Ensure that all translators have the View Setup and Configuration permission so that they can begin translating. Users can only translate languages that they're assigned to.

6. Save your changes.

SEE ALSO: Select Languages for Your Org Enable or Disable Translation Workbench Override Translations in Second-Generation Managed Packages and Unlocked Packages

Translate Metadata Labels

Create and update metadata translations for customizations you make to your Salesforce EDITIONS organization, such as custom picklist values and custom field labels.

Note: Entering translations through Translation Workbench has limitations, so note the Available in: Salesforce following. Classic (not available in all orgs) and Lightning • Use the rename tabs and labels interface for standard object translation. Standard objects Experience and custom object names aren’t available in Translation Workbench. Available in: Professional, • Manage data translations through the Translation tab within Product or through the Enterprise, Performance, Export and Import options in Translation Workbench. Only metadata translations are Unlimited, and Developer available for translation via the Translate Setup page. Editions Before translating metadata labels, you must select languages for your org, enable Translation Workbench, and add translated languages and translators. USER PERMISSIONS 1. From Setup, in the Quick Find box, enter Translate, and then select Translate. To translate terms: 2. Select the Language you're translating into. • View Setup and 3. Select a Setup Component. See Metadata Available for Translation for a list of translatable Configuration components. AND 4. Depending on the setup component, select the next options. Be designated as a translator The aspect is a part of the setup component that you can translate. For example: • Workflow tasks have an object (for example, Account or Contact) and aspect (Subject or Comment). • Custom Report Types have a custom report type entity (Custom Report Type, Custom Report Type Column, or Custom Report Type Layout Section) and aspect (field label or description). • Flows have a flow type (Flow and Autolaunched Flow), a flow name, and a flow component (Definition, Version, Screen Info, Screen Field, and Choice). Flow components can have a flow version, screen, or aspect. For global value sets and picklist values, you can translate inactive values by selecting Show Inactive Values.

5. To enter new values, double-click in the translation column. You can press Tab to advance to the next editable field or Shift+Tab to go to the previous editable field.

113 Extend Salesforce with Clicks, Not Code Manage Your Translations

Note: The Out of Date column indicates the possibility that the label needs translating because the primary label has been updated. When editing a button or link label, you see the Button or Link Name column, which is used to refer to the component when using SOAP API.

6. Click Save. If a customized component doesn’t have a translated value, the component uses the org’s default language. When you deactivate a language, all translations for that language are still available in Translation Workbench. However, users with that language selected see the org’s default language values.

SEE ALSO: Select Languages for Your Org Translation Workbench Rename Object, Tab, and Field Labels Metadata Available for Translation

Override Translations in Second-Generation Managed Packages and Unlocked Packages

You can override metadata translations for custom objects in namespaced unlocked packages and EDITIONS second-generation managed packages. For example, override the label on a custom field or workflow task. Available in: Salesforce Note: Overriding translations in second-generation managed packages and unlocked Classic (not available in all packages has limitations: orgs) and Lightning Experience • You can’t override translations for standard objects in packages. Available in: Professional, • You can’t override data translations. Enterprise, Performance, If you installed a managed package that includes translations, those translated values appear to Unlimited, and Developer users regardless of whether the language is active on the Translation Language Settings Setup Editions page. Before you can override those translations, you must select languages for your org and enable Translation Workbench. USER PERMISSIONS 1. From Setup, in the Quick Find box, enter Override, and then select Override. To override metadata 2. Select the Package that you’re overriding. translations: 3. Select the Language that you're entering your overrides in. • View Setup and Configuration 4. Select a Setup Component. See Metadata Available for Translation for a list of translatable AND components. Customize Application 5. Depending on the setup component, select the next options. The aspect is a part of the setup component that you can translate. For example: • Workflow tasks have an object (for example, Account or Contact) and aspect (Subject or Comment). • Custom Report Types have a custom report type entity (Custom Report Type, Custom Report Type Column, or Custom Report Type Layout Section) and aspect (field label or description). • Flows have a flow type (Flow and Autolaunched Flow), a flow name, and a flow component (Definition, Version, Screen Info, Screen Field, and Choice). Flow components can have a flow version, screen, or aspect. For global value sets and picklist values, you can translate inactive values by selecting Show Inactive Values.

114 Extend Salesforce with Clicks, Not Code Manage Your Translations

6. To enter new values, double-click in the translation column. You can press TAB to advance to the next editable field or SHIFT-TAB to go to the previous editable field.

Note: The Out of Date column indicates the possibility that the term needs translation because the primary label has been updated. When editing a button or link label, you see the Button or Link Name column, which is used to refer to the component when using SOAP API.

7. Click Save.

SEE ALSO: Select Languages for Your Org Enable or Disable Translation Workbench Metadata Available for Translation

Export Metadata Translation Files

Create files for your translators that contain your Salesforce org’s translatable metadata. Examples EDITIONS of translatable metadata include custom field labels, report type names, and picklist values.

Note: You need the Manage Translation AND Create Documents user permissions to import Available in: Salesforce or export translation files. If you attempt either operation without both user permissions, it’s Classic (not available in all possible to navigate to the import or export page, but the operation itself fails. orgs) and Lightning Experience Before you can export metadata translation files, you must enable Translation Workbench. Available in: Professional, Tip: When exporting metadata translation files, individual uncompressed files are limited to Enterprise, Performance, 5 MB each. If your org’s metadata translations exceed 5 MB, the system exports multiple files. Unlimited, and Developer If multiple .zip files are required, each file name is date-stamped and incremented. For example, Editions Outdated and untranslated 2020–09–20 05:13_part 1 of 2.zip. 1. From Setup, in the Quick Find box, enter Export, and then select Export. USER PERMISSIONS 2. If data translation is enabled in your org, select the Metadata Translation Type. To export or import 3. Select which labels you want to export. translation files • Source–Used as the source for creating translations. • Manage Translation AND Creates a single file that contains a list of all your translatable customizations. Create Documents • Outdated and untranslated–Used to make updates. Creates a set of files that contain only metadata labels that have not been translated, including new and modified labels. One file is created for each language. These files are then compressed into .zip files.

• Bilingual–Used for reference and reviewing all your untranslated and translated customizations. Creates a list of all the translatable metadata labels in their current translated or untranslated state. One file is created for each language. These files are then compressed into .zip files. The content in each file is divided into Untranslated and Translated sections. Each translatable label is in the Untranslated or the Translated section, according to its translation state. The Translated section includes the out-of-date status for each label.

Note: Exported translation file content is in your org's default language.

115 Extend Salesforce with Clicks, Not Code Manage Your Translations

4. Select a format. Salesforce recommends the XML Localization Interchange File Format (XLIFF) because it contains more information than the .stf format, like the field width. 5. Click Export. A status message tells you that the export is being processed. Wait for it to finish before submitting another export request. When the export is complete, an email is sent to the email address specified in your profile.

6. Locate the exported .stf, .xlf, or .zip file. Go to Your name > Documents > Document Folders > My Personal Documents > Go!. All exported files indicate the Export option used to create them and are date and time stamped. Individual files end with the .stf or .xlf extension. Multiple files are grouped into .zip files. If you have many documents in your personal documents area, find the exported files under the sort letter: • B—Bilingual export option, for example: Bilingual_2020-01-23_11:20.zip. • S—Source export option, for example: Source_en_US_2020-01-23_11:20.stf. • O—Outdated and untranslated export option, for example: Outdated_and_untranslated_2020-01-23_11:20.zip.

7. Save the files for translation by your translators or translation agency. Click View > Save File > OK. The file is saved to the location specified by your browser. For example, C:/Users/username/Downloads.

8. Send the files to your outside translators or translation agency for bulk translation activities, then use Import to update your labels.

SEE ALSO: Translation Workbench Salesforce Developer Doc: Translations

Export Data Translation Files

If data translation is enabled in your Salesforce org, you can create files for your translators that USER PERMISSIONS contain your org’s data translations. Examples of translatable data include B2B Commerce Product names and data stored in custom fields. To export or import translation files Available in: Lightning Experience • Manage Translation AND Available in: Enterprise, Performance, and Developer Editions Create Documents Applies to: B2B Commerce

Note: You need the Manage Translation AND Create Documents user permissions to import or export translation files. If you attempt either operation without both user permissions, it’s possible to navigate to the import or export page, but the operation itself fails. Before you can export data translation files, you must enable Translation Workbench and data translation.

Important: Each data translation export request is limited to 1 GB of data and 100,000 records. If your requested export exceeds either of those limits, only a partial file is exported. To reduce the amount of data exported, use the language filter, available for

116 Extend Salesforce with Clicks, Not Code Manage Your Translations

the Outdated and translated and Bilingual export types. If your org’s data translations for a single object and language exceed either of those limits, use BULK API. 1. From Setup, in the Quick Find box, enter Export, and then select Export. 2. Select Data as the Translation Type. 3. Select the objects for data translation. 4. Select which labels you want to export. • Source–Used as the initial source for creating translations. Creates a set of files by object with all translatable text.

• Outdated and untranslated–Used to make updates. Creates a set of files, by language and then by object, including text changed after the last translation and text that is not yet translated. These files are then compressed into .zip files.

• Bilingual–Used for reference and reviewing all your untranslated and translated customizations. Creates a set of files, by language and then by object, including all the translatable text in its current translated or untranslated state. These files are then compressed into .zip files. The content in each file is divided into Untranslated and Translated sections. Each translatable text element is in the Untranslated or the Translated section, according to its translation state. The Translated section includes the out-of-date status for each text element.

5. If you selected the Outdated and untranslated or Bilingual export type, select at least one language. 6. Select a file format. Salesforce recommends the XML Localization Interchange File Format (XLIFF) because it contains more information than the .stf format, like the field width. 7. Click Export. A status message tells you that the export is being processed. Wait for it to finish before submitting another export request. When the export is complete, an email is sent to the email address specified in your profile. The email includes a link to a .zip file with your exported translation files.

Note: When exporting data translation files, individual uncompressed files are limited to 25 MB. If multiple files are required, each file name is date stamped and incremented. For example, Bilingual_de_Product2_2020-10-20 0836_1.xlf and Bilingual_de_Product2_2020-10-20 0836_2.xlf.

8. Send the files to your outside translators or translation agency for bulk translation activities, then use Import to update your data translations.

SEE ALSO: Enable Data Translation Translation Workbench Salesforce Developer Doc: Translations

117 Extend Salesforce with Clicks, Not Code Manage Your Translations

Work with Translation Files

Translate metadata labels or data translation text, or review existing translations, with XML EDITIONS Localization Interchange File Format (.xlf) or Salesforce Translation Format (.stf) files. Translation files can contain metadata translations or data translations. Metadata translations are Metadata translation for customizations that you made to your Salesforce organization, such as custom picklist values available in: Salesforce and custom field labels. Data translations are for the data stored within fields, such as the text in Classic (not available in all the Product object’s Name and Description fields. orgs) and Lightning Experience For metadata and data translation files, there are three file types. Data translation available in: • Source: Use to translate labels for the first time. Lightning Experience • Outdated and untranslated: Use to translate labels after the first translation pass. Available in: Professional, • Bilingual: Use to review and edit translations. Enterprise, Performance, Translation files are identified with either the .xlf or .stf extension. Salesforce recommends the XML Unlimited, and Developer Localization Interchange File Format (.xlf) for translation files. Editions

Data translation applies to: Considerations for Working with Translation Files B2B Commerce Review some important considerations to ensure that your edited translation file can be successfully imported. Source Translation Files Use the Source file to translate an organization's labels or data for the first time. The Source file contains labels for all of a Salesforce org's translatable metadata or data in the org's default language. Outdated and Untranslated Translation Files Use the Outdated and untranslated file to translate labels or data that need translation. The file includes labels or data changed since the last translation and labels that haven't been translated. One Outdated and untranslated file is generated for each language. When multiple files are generated, they're exported to a .zip file containing a file for each translation language. Bilingual Translation Files Use the Bilingual file to review translations, edit existing translations, and add translations for labels or data that haven't been translated. One Bilingual file is generated for each translation language. Translation File IDs and Keys Each translatable item has a unique identifier in the translation file. In .xlf files, it is the id within a trans-unit tag. In .stf files, it is the key. The structure of these identifiers differs for metadata and data translation files. Flow Identifiers in Translation Files In a translation file exported from Translation Workbench, a unique key or trans-unit ID attribute identifies a flow metadata label.

SEE ALSO: Export Metadata Translation Files Export Data Translation Files Import Translated Files

118 Extend Salesforce with Clicks, Not Code Manage Your Translations

Considerations for Working with Translation Files

Review some important considerations to ensure that your edited translation file can be successfully EDITIONS imported. Metadata translation General Considerations available in: Salesforce Classic (not available in all • Translation files are identified with the .stf or .xlf extension. Don't change the file extension. orgs) and Lightning • Salesforce recommends the XML Localization Interchange File Format (.xlf) for translation files. Experience

• All translation files are language-specific. Data translation available in: • A translation file name includes the name of the export option used to create it, the language Lightning Experience code for the file's content, and a date stamp. Data translation file names also include the name Available in: Professional, of the object. Enterprise, Performance, • Deleting a translation value, row, or trans-unit tag in the file doesn't remove the translation Unlimited, and Developer after the file is imported. To delete a translation, replace the translated text with <> in an .stf Editions file or <> in an .xlf file. When the file is imported, the label reverts to its primary label value. See Outdated and Untranslated Translation Files and Bilingual Translation Files in Salesforce Data translation applies to: B2B Commerce Help for examples.

Note: See the following Data Translation File Considerations for important notes about deleting the data translation for a record’s Name field.

Exported Translation File Limits • When exporting metadata translation files, individual uncompressed files are limited to 5 MB each. If your org’s metadata translations exceed 5 MB, the system exports multiple files. If multiple .zip files are required, each file name is date-stamped and incremented. For example, Outdated and untranslated 2020–09–20 05:13_part 1 of 2.zip. • Each data translation export request is limited to 1 GB of data and 100,000 records. If your requested export exceeds either of those limits, only a partial file is exported. To reduce the amount of data exported, use the language filter, available for the Outdated and translated and Bilingual export types. If your org’s data translations for a single object and language exceed either of those limits, use BULK API. • When exporting data translation files, individual uncompressed files are limited to 25 MB. If multiple files are required, each file name is date stamped and incremented. For example, Bilingual_de_Product2_2020-10-20 0836_1.xlf and Bilingual_de_Product2_2020-10-20 0836_2.xlf.

Translation File Import Limits • When importing metadata translation files, individual uncompressed files are limited to 10 MB each. • If data translation isn’t enabled in your org, each imported .zip file is limited to 10 MB. If data translation is enabled, each imported .zip file is limited to 1 GB. • When importing data translation files, individual uncompressed files are limited to 50 MB each. • When zipping data translation files for import, each .zip file can contain up to 100,000 total translation records within up to 2 GB of uncompressed files.

Data Translation File Considerations A translated value for the data in the record’s Name field is required to translate data in other fields for that record. For example, you must provide a German translation for the name of a Product before you can translate its description into German.

119 Extend Salesforce with Clicks, Not Code Manage Your Translations

There are two ways to delete the translated values for all fields related to a record. Because translation files are language-specific, this action is per language. • Delete translated text for all of the record’s fields. For example, a Product has German translated values for its name and description. To remove all German data translations for that Product, replace the translated text for that Product record’s Name and Description fields with <> in an .stf file or <> in an .xlf file. • Delete the translated text for the record’s Name field, and remove the rows or trans-unit tags for the record’s other fields. For example, a Product has German translated values for its name and description. To remove all German data translations for that Product, replace the translated text for that Product record’s Name fields with <> in an .stf file or <> in an .xlf file. Also delete the row or trans-unit tag for that Product’s Description field.

Note: You can restore deleted data translation values through the recycle bin.

If an imported translation file deletes the translated value for a record’s Name and includes a translated value for another field, no action is taken. For instance, you delete the translated value for a Product’s name but leave the translation key for that Product’s description unchanged in a translation file for German. When you import that translation file, no changes are made to that Product’s translated values for German.

XML Localization Interchange File Format (.xlf) File Considerations The .xlf format is the recommended export type because it contains more information than the .stf format, like the field width. • .xlf translation file content is organized into translation units. Translation units for translated labels contain a target tag with the translated value. Untranslated labels have a source tag, but no target tag. • Translators must create a target tag for each untranslated label to store the translated value. Otherwise, don't add tags to or remove tags from the .xlf file. • The file tag’s attributes define details about the translation file , such as the source language, target language, and the translation type. • The trans-unit tags’ attributes define details about the translation unit, such as the id and the field width.

Salesforce Translation Format (.stf) File Considerations The .stf format behaves like a .csv file, with content organized into tab-delimited columns. • If you don’t use a standard translation tool such as Trados, edit the file using an application that supports tabs and word wrap, such as WordPad. • Don't add columns to or remove columns from the translation file. • If you use tabs, new lines, or carriage returns in your text for translation, they are represented with special characters in the .stf file format. Tabs are \t, new lines are \n, and carriage returns are \r. To ensure consistency between your language versions, ensure that these characters are maintained in your translations. • If you use Microsoft Excel to enter translations in an .stf file, your file format can be corrupted. MS Excel automatically adds quotation marks around entries that have commas. We recommend that you open your files in a text editor before importing them and remove these quotation marks. The import fails if these quotation marks are not removed.

Translating Rich Text Fields Fields with a type of Text Area (Rich) allow special formatting, such as bolding text or adding an image. When rich text fields are exported for translation, the translatable text for those fields includes encoded HTML tags.

120 Extend Salesforce with Clicks, Not Code Manage Your Translations

If your translators edit raw translation files, make sure that they understand HTML tags and their encoding. When translating the text, HTML tags are not required. However, if HTML tags are included in a translated value, they must be valid and in the same format as the exported tags. If the tags are incorrect, the translation import fails.

Note: The HTML tags are visible in the raw files. Many translation tools handle the conversion of mark-up languages like HTML for you. All rich text field translations must be contained within an HTML (

) tag with the appropriate HTML encoding for that file type. If the translation value contains only plain text, the required paragraph tag is added upon import. This table provides examples of exported rich text field content.

Rich Text Field Content Format Exported Text Available in women’s shoe sizes .stf

Available in women’s shoe sizes 5-13.

5–13. .xlf <p>Available in women’s shoe sizes 5-13.</p>

15% discount available for .stf

15% discount available for veterans. veterans.

Verification required.

Verification required. .xlf <p>15% discount available for veterans. </p><p><b>Verification required.</b></p>

Features: .stf

Features:

  • Leather
  • LImported
  • Rubber • Leather sole
  • Lightweight
  • Flexible sole

• Imported • Rubber sole .xlf <p>Features: <ul><li>Leather </li><li>Imported </li><li>Rubber • Lightweight sole </li><li>Lightweight • Flexible sole </li><li>Flexible sole </li></ul></p>

See more information at this .stf

See more information at this reference site.

.xlf <p><a href="https://www.example.com">this reference site</a>.</p>

SEE ALSO: Export Metadata Translation Files Export Data Translation Files Import Translated Files View, Restore, and Manage the Recycle Bin in Salesforce Classic

121 Extend Salesforce with Clicks, Not Code Manage Your Translations

Source Translation Files

Use the Source file to translate an organization's labels or data for the first time. The Source file EDITIONS contains labels for all of a Salesforce org's translatable metadata or data in the org's default language.

Note: Salesforce recommends the XML Localization Interchange File Format (.xlf) for Metadata translation translation files. See Considerations for Working with Translation Files for tips on editing available in: Salesforce translation files and how to translate rich text field content. Classic (not available in all orgs) and Lightning To prepare the translation file for your translators: Experience

• Create one copy of the Source file for each language you are translating into. Data translation available in: • In the header of each Source file, change the language code from the organization's default Lightning Experience language to the translation language. For example, replace en_US for English (US) with es Available in: Professional, for Spanish. Enterprise, Performance, Unlimited, and Developer XML Localization Interchange File Format (.xlf) Source Translation Files Editions Source .xlf translation file content is organized into translation units. Translation units for translated Data translation applies to: labels contain a target tag with the translated value. Untranslated labels have a source tag, B2B Commerce but no target tag. Tell your translators to add a target tag containing the translated value after each source tag. If a target tag exists and the translation is out of date, tell them to replace the text in the target tag. Outdated labels have a value of outOfDate="true" within the trans-unit tag.

Important: A translated value for the data in the record’s Name field is required to translate data in other fields for that record. For example, you must provide a German translation for the name of a Product before you can translate its description into German.

Tag Description Edit Options trans-unit Translation unit. Contains unique identifiers Do not edit. for the label, including the label’s id, maximum width, and out-of-date indicator.

source Label or text in the org’s default language. Do not edit.

target The current translation that is visible to end Enter the translated value. Add a target tag users selecting the target language as their if needed. personal language.

note Description of the metadata label, if defined, Do not edit. Translatable field descriptions in the source language. each have a separate trans-unit tag.

For example, if you build a custom Nickname field on the Account object, the original file contains the following trans-unit tag in the exported Source .xlf file.

Nickname The person’s nickname, or what they prefer to be called.

122 Extend Salesforce with Clicks, Not Code Manage Your Translations

To translate this label, add a target tag containing the translated value to the corresponding trans-unit tag after the source tag.

Nickname Apodo The person’s nickname, or what they prefer to be called.

Salesforce Translation Format (.stf) Source Translation Files

Note: Salesforce doesn’t recommend the STF format for translation files. If you choose to use this format, we don’t recommend editing the file with Microsoft Excel. For more information and restrictions, see Considerations for Working with Translation Files. Tell your translators to replace the untranslated values in the LABEL column with translated values.

Important: A translated value for the data in the record’s Name field is required to translate data in other fields for that record. For example, you must provide a German translation for the name of a Product before you can translate its description into German.

Column Description Edit Options KEY Unique identifier for the label. Do not edit.

LABEL Label or text in the org’s default language. Replace untranslated values with translated values.

For example, if you build a custom Nickname field on the Account object, the original file contains the following row in the exported Source .stf file.

# KEY LABEL

CustomField.Account.Nickname.FieldLabel Nickname

To translate this label, replace the LABEL text in that row with the translated value.

# KEY LABEL

CustomField.Account.Nickname.FieldLabel Apodo

Important: Don't add columns to or remove columns from the .stf translation file.

SEE ALSO: Considerations for Working with Translation Files Supported Languages

123 Extend Salesforce with Clicks, Not Code Manage Your Translations

Outdated and Untranslated Translation Files

Use the Outdated and untranslated file to translate labels or data that need translation. The file EDITIONS includes labels or data changed since the last translation and labels that haven't been translated. One Outdated and untranslated file is generated for each language. When multiple files are Metadata translation generated, they're exported to a .zip file containing a file for each translation language. available in: Salesforce Note: Salesforce recommends the XML Localization Interchange File Format (.xlf) for Classic (not available in all orgs) and Lightning translation files. See Considerations for Working with Translation Files for tips on editing Experience translation files and how to translate rich text field content. When working with the Outdated and untranslated translation file, each entry needs a new translated Data translation available in: value. Special values are used to delete an existing translation and revert the label to its original Lightning Experience value. Available in: Professional, Enterprise, Performance, XML Localization Interchange File Format (.xlf) Outdated and Untranslated Translation Unlimited, and Developer Editions Files Data translation applies to: Outdated and untranslated .xlf translation file content is organized into translation units. Translation B2B Commerce units for translated labels contain a target tag with the translated value. Untranslated labels have a source tag, but no target tag. Tell your translators: • For untranslated labels, add a target tag containing the translated value after each source tag. • If the label’s translation is out of date, replace the text in the target tag. Outdated labels have a value of outOfDate="true" within the trans-unit tag. Don’t update the outOfDate value. • To delete a translation, replace the value in the label's target tag with <>. When the Bilingual file is imported, the label reverts to its original value. • A translated value for the data in the record’s Name field is required to translate data in other fields for that record. For example, you must provide a German translation for the name of a Product before you can translate its description into German. • Deleting the data translated value for a record’s Name field can delete all of that record’s other translated values for that language. See Considerations for Working with Translation Files for more information.

Tag Description Edit Options trans-unit Translation unit. Contains unique identifiers Do not edit. for the label, including the label’s id, maximum width, and out-of-date indicator.

source Label or text in the org’s default language. Do not edit.

target The current translation that is visible to end Enter the translated value. Add a target tag users selecting the target language as their if needed. personal language.

note Description of the metadata label, if defined, Do not edit. Translatable field descriptions in the source language. each have a separate trans-unit tag.

124 Extend Salesforce with Clicks, Not Code Manage Your Translations

For example, an existing Nickname field on the Account object has a Spanish translated value of “Apodo.” You change the primary label on the Nickname field from “Nickname” to “Preferred Name.” That label is now outdated. You also build a new custom Business Hours field on the Account object. The exported Outdated and untranslated .xlf translation file contains the following trans-unit tags.

Preferred Name Apodo The name preferred by this person. Business Hours

To update the outdated label, update the text in the corresponding target tag. To translate the new field’s label, add a target tag containing the translated value to the corresponding trans-unit tag after the source tag. Don’t change the outOfDate tag values. When you import the translated file, labels with updated translations are marked as up to date.

Preferred Name Nombre preferido The name preferred by this person. Business Hours Horario de oficina

To delete the Preferred Name label’s translation, update the translation value in the target tag with <>. When the file is imported, the label reverts to its original value.

Preferred Name <> The name preferred by this person.

Salesforce Translation Format (.stf) Outdated and Untranslated Translation Files

Note: Salesforce doesn’t recommend the STF format for translation files. If you choose to use this format, we don’t recommend editing the file with Microsoft Excel. For more information and restrictions, see Considerations for Working with Translation Files. Tell your translators to replace the values in the LABEL column with updated translated values. • To delete a translation, replace the desired value in the TRANSLATION column with a left and right angle bracket pair (<>). When the file is imported, the label reverts to its original value. • A translated value for the data in the record’s Name field is required to translate data in other fields for that record. For example, you must provide a German translation for the name of a Product before you can translate its description into German. • Deleting the data translated value for a record’s Name field can delete all of that record’s other translated values for that language. See Considerations for Working with Translation Files for more information.

125 Extend Salesforce with Clicks, Not Code Manage Your Translations

Column Description Edit Options KEY Unique identifier for the label. Do not edit.

LABEL Label or text in the org’s default language. Replace untranslated values with translated values.

For example, an existing custom Nickname field on the Account object has a Spanish translated value of “Apodo.” You change the primary label on the Nickname field from “Nickname” to “Preferred Name.” That label is now outdated. You also build a new custom Business Hours field on the Account object. The exported Outdated and untranslated .stf translation file contains the following rows.

# KEY LABEL

CustomField.Account.Nickname.FieldLabel Preferred Name

CustomField.Account.Business_Hours.FieldLabel Business Hours

To translate the new field’s label and update the existing label, replace the LABEL text in each row.

# KEY LABEL

CustomField.Account.Nickname.FieldLabel Nombre preferido

CustomField.Account.Business_Hours.FieldLabel Horario de oficina

To delete the Nickname field’s outdated translation of “Apodo,” replace the translation value in the LABEL column with <>. When the file is imported, the label reverts to its primary label value of “Preferred Name.”

# KEY LABEL

CustomField.Account.Nickname.FieldLabel <>

SEE ALSO: Considerations for Working with Translation Files

126 Extend Salesforce with Clicks, Not Code Manage Your Translations

Bilingual Translation Files

Use the Bilingual file to review translations, edit existing translations, and add translations for labels EDITIONS or data that haven't been translated. One Bilingual file is generated for each translation language.

Note: Salesforce recommends the XML Localization Interchange File Format (.xlf) for Metadata translation translation files. See Considerations for Working with Translation Files for tips on editing available in: Salesforce translation files and how to translate rich text field content. Classic (not available in all orgs) and Lightning Experience XML Localization Interchange File Format (.xlf) Bilingual Translation Files Data translation available in: Bilingual .xlf translation file content is organized into translation units. Translation units for translated Lightning Experience labels contain a target tag with the translated value. Untranslated labels have a source tag, but no target tag. Available in: Professional, Enterprise, Performance, Tell your translators: Unlimited, and Developer • For untranslated labels, add a target tag containing the translated value after the source Editions tag. Data translation applies to: • If the label’s translation is out of date, replace the text in the target tag. Outdated labels B2B Commerce have a value of outOfDate="true" within the trans-unit tag. • To delete a translation, replace the value in the trans-unit's target tag with <>. When the Bilingual file is imported, the label reverts to its primary label value. • A translated value for the data in the record’s Name field is required to translate data in other fields for that record. For example, you must provide a German translation for the name of a Product before you can translate its description into German. • Deleting the data translated value for a record’s Name field can delete all of that record’s other translated values for that language. See Considerations for Working with Translation Files for more information.

Tag Description Edit Options trans-unit Translation unit. Contains unique identifiers Do not edit. for the label, including the label’s id, maximum width, and out-of-date indicator.

source Label or text in the org’s default language. Do not edit.

target The current translation that is visible to end Enter the translated value. Add a target tag users selecting the target language as their if needed. Replace a value with <> personal language. to delete the translation.

note Description of the metadata label, if defined, Do not edit. Translatable field descriptions in the source language. each have a separate trans-unit tag.

For example, in an org with English as its default language, you build a new custom Business Hours field on the Account object. This label is untranslated. Nickname, an existing custom field on the Account object, has a Spanish translated value of “Apodo.” You change the primary label on the Nickname field from “Nickname” to “Preferred Name.” This label is outdated. Another existing custom Prior Reference Number field on the Account object has an incorrect Spanish translated value of “Número de consulta previa.” Although the translation isn’t out of date, it must be updated to “Número de referencia precedente.”

127 Extend Salesforce with Clicks, Not Code Manage Your Translations

The Name field on a custom Widget object had a primary label of “SLK.” A translator misinterpreted this acronym and entered a Spanish translation of “Flojo.” Although the translation isn’t out of date, you want to revert the translation to the primary label. Finally, a custom Number field on a custom Widget object had a primary label of “Number” and a Spanish translated value of “Número.” You update the primary label to “#” and want to remove the translated value. The exported Bilingual .xlf translation file contains the following row in the OUTDATED AND UNTRANSLATED section.

Business Hours Preferred Name Apodo The name preferred by this person. Prior Reference Number Número de consulta previa SLK Seda # Número

To make the requested changes: • Add a target tag with the translated value to the new Business Hours field. • Update the translation values in the target tags for the Preferred Name and Prior Reference Number fields. • To delete the translation of the Widget object’s Name and Number fields, update the translation values in those target tags with <>. When this file is imported, those labels revert to the primary label values. • Don’t change the outOfDate tag values. When you import the translated file, labels with updated translations are marked as up to date.

Business Hours Horario de oficina Preferred Name Nombre preferido The name preferred by this person.

128 Extend Salesforce with Clicks, Not Code Manage Your Translations

outOfDate="false"> Prior Reference Number Número de referencia precedente SLK <> # <>

Salesforce Translation Format (.stf) Bilingual Translation Files

Note: Salesforce doesn’t recommend the STF format for translation files. If you choose to use this format, we don’t recommend editing the file with Microsoft Excel. For more information and restrictions, see Considerations for Working with Translation Files. Bilingual .stf translation file content is separated into translated labels and outdated or untranslated labels. The TRANSLATED section of the .stf file contains text that has been translated and is up to date. When importing, four columns are expected for each label in this section: KEY, LABEL, TRANSLATION, and OUT OF DATE. For this section, tell your translators: • To update a current translation, replace the value in the TRANSLATION column. • To delete a translation, replace the value in the TRANSLATION column with a left and right angle bracket pair (<>). When the file is imported, the label reverts to its primary label’s value.

Column Description Edit Options KEY Unique identifier for the label. Do not edit.

LABEL Label or text in the org’s default language. Do not edit.

TRANSLATION The current translation that is visible to end • To edit a translation, replace the users selecting the target language as their translated value. personal language. • To delete a translation, replace the translated value with <>.

OUT OF DATE Indicates whether the source text has Do not edit. changed since the previous translation. A (-) indicates that the translation is current.

The OUTDATED AND UNTRANSLATED section of the file contains labels changed after the label’s translation value was last updated and text that hasn't been translated. When importing, two columns are expected for each label in this section: KEY and LABEL. For this section, tell your translators: • Replace the text in the LABEL column with new or updated translation values.

129 Extend Salesforce with Clicks, Not Code Manage Your Translations

• Delete any values in the TRANSLATED and OUT OF DATE columns. • Delete the corresponding columns in the OUTDATED AND UNTRANSLATED section. • To delete an outdated translation, replace the value in the LABEL column with a left and right angle bracket pair (<>). When the file is imported, the label reverts to its primary label’s value. • A translated value for the data in the record’s Name field is required to translate data in other fields for that record. For example, you must provide a German translation for the name of a Product before you can translate its description into German. • Deleting the data translated value for a record’s Name field can delete all of that record’s other translated values for that language. See Considerations for Working with Translation Files for more information.

Column Description Edit Options KEY Unique identifier for the label. Do not edit.

LABEL Label or text in the org’s default language. Replace label text with new or updated translated values.

TRANSLATION The current translation that is visible to end Delete this column and its contents when users selecting the target language as their updating an out-of-date translation. personal language. Untranslated labels don’t have a value in this column.

OUT OF DATE Indicates whether the source text has Delete this column and its contents when changed since the previous translation. updating an out-of-date translation. An asterisk (*) indicates that the label is out of date. A change was made to the primary label and the translation hasn't been updated. Untranslated labels don’t have a value in this column.

For example, in an org with English as its default language, an existing custom Prior Reference Number field on the Account object has an incorrect Spanish translated value of “Número de consulta previa.” Although the translation isn’t out of date, it must be updated to “Número de referencia precedente.” The Name field on a custom Widget object had a primary label of “SLK.” A translator misinterpreted this acronym and entered a Spanish translation of “Flojo.” Although the translation isn’t out of date, you want to revert the translation to the primary label. You also build a new custom Business Hours field on the Account object. This label is untranslated. Nickname, another existing custom field on the Account object, has a Spanish translated value of “Apodo.” You change the primary label on the Nickname field from “Nickname” to “Preferred Name.” This label is outdated. Finally, a custom Number field on a custom Widget object had a primary label of “Number” and a Spanish translated value of “Número.” You update the primary label to “#” and want to remove the translated value. The exported Bilingual .stf translation file contains the following row in the OUTDATED AND UNTRANSLATED section.

------TRANSLATED------

130 Extend Salesforce with Clicks, Not Code Manage Your Translations

# KEY LABEL TRANSLATION OUT OF DATE

CustomField.Account.Prior_Ref_No.FieldLabel Prior Reference Número de consulta – Number previa

CustomField.Widget__c.Name.FieldLabel SLK Seda –

------OUTDATED AND UNTRANSLATED------

# KEY LABEL TRANSLATION OUT OF DATE

CustomField.Account.Business_Hours.FieldLabel Business Hours

CustomField.Account.Nickname.FieldLabel Preferred Name Apodo *

CustomField.Widget__c.Number.FieldLabel # Número *

To make the requested changes: • In the TRANSLATED section, update translations by replacing the value in the TRANSLATION column. To delete the translation of the Widget object’s Name field, replace the TRANSLATION value with <>. When this file is imported, the label for that Number field reverts to its primary label value of SLK. • In the OUTDATED AND UNTRANSLATED section, replace the value in the LABEL column. Then remove the TRANSLATION and OUT OF DATE columns and their content for the Nickname field. To delete the translation of the Widget object’s Number field, replace the TRANSLATION value with <>. When this file is imported, the label for that Number field reverts to its primary label value of #.

------TRANSLATED------

# KEY LABEL TRANSLATION OUT OF DATE

CustomField.Account.Prior_Ref_No.FieldLabel Prior Reference Número de – Number referencia precedente

CustomField.Widget__c.Name.FieldLabel SLK <> –

------OUTDATED AND UNTRANSLATED------

# KEY LABEL

CustomField.Account.Business_Hours.FieldLabel Horario de oficina

CustomField.Account.Nickname.FieldLabel Nombre preferido

CustomField.Widget__c.Number.FieldLabel <>

131 Extend Salesforce with Clicks, Not Code Manage Your Translations

Important: Delete the TRANSLATION and OUT OF DATE columns only in the OUTDATED AND UNTRANSLATED section. Rows in that section must have exactly two columns of data to be imported. Rows in the TRANSLATED section must have exactly four columns of data to be imported.

SEE ALSO: Considerations for Working with Translation Files

Translation File IDs and Keys

Each translatable item has a unique identifier in the translation file. In .xlf files, it is the id within a EDITIONS trans-unit tag. In .stf files, it is the key. The structure of these identifiers differs for metadata and data translation files. Metadata translation Note: Translation file keys and ids aren’t edited during translation. The text to be translated available in: Salesforce is in the translation file in the source tag for .xlf files or the label column for .stf files. For Classic (not available in all orgs) and Lightning admins, knowing how the id or key work can help them understand how these identifiers Experience are structured. Data translation available in: Lightning Experience Metadata Translation File IDs and Keys All translatable metadata has a setup component. Depending on the setup component, the Available in: Professional, translatable metadata can have an object, aspect, custom report type entity, flow type, flow name, Enterprise, Performance, Unlimited, and Developer and flow component. Editions • Metadata label translation file IDs and keys follow the format: SetupComponentName.ObjectName.AspectName. Data translation applies to: B2B Commerce • Metadata label translation file IDs and keys for custom report types contain the report type entity in place of the object name. The format is: SetupComponentName.CustomReportEntityName.AspectName. • Metadata translation file IDs and keys for flows can also contain the flow component, flow type, flow name, flow version, flow screen, or flow aspect. See Flow Identifiers in Translation Files for detailed examples. This table provides examples of metadata translation IDs and keys.

Translation Label or Text id (in .xlf Files) or Key (in .stf Files) Country “Spain” in address AddressCountry.ES

“Billing” button or link on the Account object ButtonOrLink.Account.Billing

Label of the “Active” field on the Account object CustomField.Account.Active.FieldLabel

Description of the “Active” field on the Account object CustomField.Account.Active.Description.FieldLabel

Help text of the “Active” field on the Account object CustomField.Account.Active.Description.HelpText

“Low” picklist entry in the Customer Priority picklist on the Account PicklistValue.Account.CustomerPriority.Low object

Description of the “East Accounts” Custom Report Type CustomReportType.East_Accounts.Description

“Accounts” Custom Report Type Layout Section on the “Accounts” CrtLayoutSection.Custom_Accounts_Reports_1 Custom Report Type

132 Extend Salesforce with Clicks, Not Code Manage Your Translations

Translation Label or Text id (in .xlf Files) or Key (in .stf Files) Description of the “Goal Layout” Custom Report Type Layout on LayoutSection.Goal.Goal the “Goals” Custom Report Type Layout.Description_1

“Survey Customers” flow name Flow.Flow.Survey_customers.FieldLabel

“Customer Name” screen input field on version 2 of the “Survey Flow.Flow.Survey_customers.2.Survey_ Customer” flow Customer.Field.Customer_Name.FieldLabel

Data Translation File IDs and keys If data translation is enabled in your Salesforce org, the record ID is used to identify the translatable text in an exported data translation file. Data translation IDs and keys follow the format ObjectName.recordUniqueIdentifier.FieldName. This table provides examples of data translation IDs and keys.

Translation Label or Text id (in .xlf Files) or Key (in .stf Files) Name of the product with record ID 01txx0000006yvEAAQ Product2.01txx0000006yvEAAQ.Name

Description of the product with record ID Product2.01txx0000006yvEAAQ.Description 01txx0000006yvEAAQ

Text stored in a custom “Discount Notes” field for the product Product2.01txx0000006yvEAAQ.Discount_Notes__c record ID 01txx0000006yvEAAQ

SEE ALSO: Flow Components for Metadata Translation

Flow Identifiers in Translation Files

In a translation file exported from Translation Workbench, a unique key or trans-unit ID attribute EDITIONS identifies a flow metadata label. Flows follow a convention based on the flow label. Available in: Salesforce Classic (not available in all Flow Key or Trans-Unit ID Example orgs) and Lightning Component Experience Flow Flow.flowType. Flow.Flow.Survey_customers.FieldLabel Available in: Professional, Definition flowUniqueName.FieldLabel Enterprise, Performance, Name Unlimited, and Developer Editions Flow Version Flow.flowType. Flow.Flow.Survey_customers.1.Name Name flowUniqueName. versionNumber.Name

Screen

133 Extend Salesforce with Clicks, Not Code Manage Your Translations

Flow Component Key or Trans-Unit ID Example

Paused Message Flow.flowType.flowUniqueName. Flow.Flow.Survey_customers.1.Screen.Greet_Customer. versionNumber.Screen.screenUniqueName. PausedText PausedText

Help Text Flow.flowType.flowUniqueName. Flow.Flow.Survey_customers.1.Screen.Greet_Customer. versionNumber.Screen.screenUniqueName. HelpText HelpText

Screen Input Field

Label Flow.flowType.flowUniqueName. Flow.Flow.Survey_customers.2.Survey_Customer.Field. versionNumber.screenUniqueName.Field. Customer_Name.FieldLabel fieldUniqueName.FieldLabel

Help Text Flow.flowType.flowUniqueName. Flow.Flow.Survey_customers.2.Survey_Customer.Field. versionNumber.screenUniqueName.Field. Customer_Name.HelpText fieldUniqueName.HelpText

Error Message Flow.flowType.flowUniqueName. Flow.Flow.Survey_customers.2.Survey_Customer. versionNumber.screenUniqueName.Field. Field.Customer_Name.ErrorMessage fieldUniqueName.ErrorMessage

Screen Output Field

Display Text Flow.flowType.flowUniqueName. Flow.Flow.Survey_customers.2.Greet_Customer.Field. versionNumber.screenUniqueName.Field. WelcomeMessage.Description fieldUniqueName.Description

Choice

Label Flow.flowType.flowUniqueName. Flow.Flow.Survey_customers.2.Choice.Participate_No. versionNumber.Choice.choiceUniqueName. FieldLabel FieldLabel

Error Message Flow.flowType.flowUniqueName. Flow.Flow.Survey_customers.2.Choice.Participate_No. versionNumber.Choice.choiceUniqueName. ErrorMessage ErrorMessage

Input Label Flow.flowType.flowUniqueName. Flow.Flow.Survey_customers.2.Choice.Participate_No. versionNumber.Choice.choiceUniqueName. InputLabel InputLabel

Stages

Stage Label Flow.flowType.flowUniqueName. Flow.Flow.Stages_Online_Purchase_Breadcrumbs.1. versionNumber.Stage.stageUniqueName. Stage.Billing_Details.FieldLabel FieldLabel

Text Template

134 Extend Salesforce with Clicks, Not Code Manage Your Translations

Flow Component Key or Trans-Unit ID Example

Label Flow.flowType.flowUniqueName. Flow.Flow.Survey_customers.2.TextTemplate. versionNumber.TextTemplate. ParticipantCity_FieldLabel texttemplateUniqueName.FieldLabel

SEE ALSO: Work with Translation Files Considerations for Translating Flows

Import Translated Files

Import and update the translations for your Salesforce org’s metadata, such as custom fields, report EDITIONS types, and picklist values. Or import and update data translations, such as Product names. Typically, you export translation files from Salesforce, then send them to outside translators or a translation Metadata translation agency for bulk translation activities. You then import the translated files. available in: Salesforce Note: You need the Manage Translation AND Create Documents user permissions to import Classic (not available in all orgs) and Lightning or export translation files. If you attempt either operation without both user permissions, it’s Experience possible to navigate to the import or export page, but the operation itself fails. Data translation available in: Lightning Experience Prepare Your Translated Files 1. Create a separate file for each language. Available in: Professional, Enterprise, Performance, Salesforce recommends the XML Localization Interchange File Format (.xlf) for translation files. Unlimited, and Developer Editions 2. Specify the language for this translation import. When you export a translation file with the Bilingual or Outdated and untranslated export type, Data translation applies to: B2B Commerce the language is already specified. If you’re importing a Source file or importing translations for different language than the original file, update the language code. • For .xlf files, use the target-language attribute on the file tag. For example, . translation files • For .stf files, use the language code attribute at the top of the file. For example: • Manage Translation AND Create Documents

# Language: Spanish Language code: es Type: Source

Translation for the specified language must be supported for your org. For a full list of Salesforce supported languages and their language codes, see Supported Languages in Salesforce Help.

3. If data translation is enabled in your Salesforce org, include a translation type attribute. For .xlf files, include the translation-type attribute on the file tag. For .stf files, include the translation type on its own line after the language code and type.

135 Extend Salesforce with Clicks, Not Code Manage Your Translations

Note: If you export a translation file after data translation is enabled in your org, the resulting file includes this attribute.

File Type Metadata Translation Attribute Data Translation Attribute XML Localization translation-type="metadata" translation-type="data" Interchange File Format (.xlf)

Salesforce Translation Type: Metadata Translation Type: Data Translation Format (.stf)

4. Save import files in UTF-8 encoding. 5. Size your files. When importing metadata translation files, individual uncompressed files are limited to 10 MB each. When importing data translation files, individual uncompressed files are limited to 50 MB each.

6. Bundle multiple files into .zip files. If data translation isn’t enabled in your org, each imported .zip file is limited to 10 MB. If data translation is enabled, each imported .zip file is limited to 1 GB. When zipping data translation files for import, each .zip file can contain up to 100,000 total translation records within up to 2 GB of uncompressed files. Create multiple .zip files as needed.

Important: Each .zip file can only contain metadata or data translation. If data translation is enabled in your org, import metadata and data translations separately. The zipped files don't have to be in the same order or grouping as the exported .zip files. For example, you start with two exported .zip files. The first file includes French, Italian, and Japanese. The second file includes Russian, Simplified Chinese, and Greek. You can create: • One .zip file with French, Greek, and Italian. • One .zip file with Russian and Greek. • One .zip file with Simplified Chinese.

Import Your Prepared Translated Files 1. From Setup, in the Quick Find box, enter Import, and then select Import under Translation Workbench. 2. Click Choose File, and select the file you want to import. 3. Click Import. After the import is complete, a confirmation email is sent to the email address specified in your profile. Wait for each import to finish before submitting another translation file for import. If any portion of the import fails, the email includes details about what went wrong. If the imported zip file exceeds translation import limits, the email lists the files that were imported before the limit was reached. If records within the imported translation files weren’t processed, the email lists those files and includes an error log.

Verify Your Translations There are multiple ways to view the imported translations:

136 Extend Salesforce with Clicks, Not Code Manage Your Translations

• Check metadata labels and data translations in your Salesforce org. • Check metadata labels through Translation Workbench. • Check data translations through the Translation tab within Product. • Export data translations and verify your updated text. Check labels in your Salesforce org.

Note: Labels that are exported and left unchanged in the translation file aren’t saved as translations on import.

SEE ALSO: Supported Languages Work with Translation Files Common Errors with Exporting and Importing Translation Files Documents Home

Common Errors with Exporting and Importing Translation Files

Troubleshoot issues you can encounter while exporting and importing files in Translation Workbench. EDITIONS

Error Message What It Means Troubleshooting Steps Metadata translation Bilingual file section starts with The header rows of the file Export your file again Make sure available in: Salesforce non header row: missing. Or there is extraneous all sections, and that all orgs) and Lightning Experience text, such as notes that aren't extraneous text has been commented out, in those rows. commented out or removed Data translation available in: from the header rows. Lightning Experience

Data translation import for key This error message only applies Provide a translated value for Available in: Professional, failed. A translated value to data translation files. A the data stored in the Name Enterprise, Performance, for the translated value for a record field for that record ID, then Unlimited, and Developer record ID’s ID’s Name field is required to import again. Editions Name field is required to translate data in other fields for Data translation applies to: translate data for the field.

Data translation isn’t enabled This error message only applies Enable data translation, and for this org. to data translation files. Data then import the file again. translation isn’t enabled or was disabled after the data translation file was exported.

Duplicate key: exists in The specified key appears in Export your file again, and import file, please re-export. your imported file more than make sure that each key in it is once. Each translated item unique. Then import the file must have its own unique key, again. and each key can only appear in the file one time.

137 Extend Salesforce with Clicks, Not Code Manage Your Translations

Error Message What It Means Troubleshooting Steps File contains translation keys that don't The file contains at least one key with a Create separate import files for metadata match the translation type specified in the translation type that doesn’t match the file and data translation. file header. Create separate import files for type in the header. metadata and data translation.

Invalid Key During translation, Salesforce generates Export your file again, and make sure the unique keys, or identifiers, for each object, keys in it match the keys in the file that picklist value, or page element that you’re you’re trying to import. translating. If these names or keys are changed after you export your file, Salesforce can’t match the correct key with the correct name.

Invalid key: . Data translation isn’t This error message only applies to data Enable data translation on the field through enabled for the field on the translation files. Data translation was the Data Translation Settings Setup page, object. disabled on the field after the translation file or delete references to the key from the was exported. translation file.

Invalid key: . The field This error message only applies to data Export your file again, and compare it with on the object doesn’t translation files. The key includes a field that the identified key. If the identified key was support data translation. doesn’t support data translation. Either an modified, use the newly exported key. If it exported key was changed after the export doesn’t exist in the exported translation file, or the key was manually added. delete the identified key from the translation file.

Invalid key: . The key's translation type Imported translation files must contain Update the file’s translation type in the file must match the file's translation type. either metadata keys or data translation header. keys. This key doesn’t match the file’s Create separate import files for metadata translation type. and data translation as needed.

Invalid key: . The This error message only applies to data Export your file again, and compare it with object doesn’t support data translation. translation files. The key includes an object the identified key. If the identified key was that doesn’t support data translation. Either modified, use the newly exported key. If it an exported key was changed after the doesn’t exist in the exported translation file, export or the key was manually added. delete the identified key from the translation file.

Invalid key: . You can't delete the data This error message only applies to data Edit your file. To delete all data translations translation value for a record's name and translation files. The file includes a key to associated with this record, remove all keys update the value for another of that record's delete the data translation for this record’s related to this record except the key fields at the same time. Name. The file also includes a data deleting the translated value for the record’s translation value for another of the record’s Name. To update other fields, remove the fields. Because deleting the translated value key deleting the translated value for the of a record’s Name deletes the translated record’s Name. values for all fields related to that record, See Considerations for Working with the translation keys conflict. Translation Files for more information.

Key: could not be uniquely resolved. One of the keys in your Custom Report Type Export your file again, and make sure that This is caused by a change to our Custom (CRT) column is in the wrong format. you’re using the correct CRT key format.

138 Extend Salesforce with Clicks, Not Code Manage Your Translations

Error Message What It Means Troubleshooting Steps Report Type Column key format. Please re-export and use the new key format for those keys.

Maximum character limit for translation exceeded in line: can only have a certain number of within the character limit listed for the field characters. Your translated labels for the type, and import your file again. type of field at the line specified in the error message are too long.

No data to import The file that you’re trying to import is empty Make sure that you’re importing the correct or does not contain any translation changes. file and that it contains translated data.

No language code specified in file header The file that you’re trying to import doesn’t Make sure that your language code is valid have a valid language code, or the language and isn't missing or commented out. code is in the wrong place.

No translated or untranslated section header The file that you’re trying to import is Make sure that your file has section headers, found in the bilingual file missing section headers. and import it again.

No valid file type specified in file header The file that you’re trying to import doesn’t Make sure that your file has a valid have a valid import/export type (Source, import/export type in the file header and Outdated and untranslated, or Bilingual) that the header isn’t translated. specified in the file header. The file type attribute must be in the default language for your org.

No valid translation type specified in file The file that you’re trying to import doesn’t Make sure that your file has a valid header have a valid translation type specified in the translation type in the file header and that file header. The translation type is only the header isn’t translated. required if data translation is enabled. The attributes for metadata translation are: • Translation Type: Metadata for .stf files and • translation-type="metadata" for .xlf files The attributes for data translation are: • Translation Type: Data for .stf files and • translation-type="data" for .xlf files The translation type attribute must be in the default language for your organization.

Not a valid file to import. Please select a .stf, You can import files in .stf or .xlf formats, or Make sure that your file is a .stf, .xlf, or .zip .xlf, or a .zip file for import. .zip files that contain .stf or .xlf files. file, and try importing it again.

139 Extend Salesforce with Clicks, Not Code Manage Your Translations

Error Message What It Means Troubleshooting Steps Some keys are appended with their sort The order of the picklist values in your Export your source file, match the order of order for uniqueness. Re-export your file and source file doesn’t match your setup. the picklist values to your import file, and ensure that the keys in both files match. then import again.

There were issues with import of file: The file that you’re importing has invalid or Export your file again, and identify the fields importFileName.xlf [Your import request missing HTML tags. HTML tags are used in with HTML tags in the exported source text. failed. Please retry or contact support.] translations for rich text area fields. Edit your translation values for these rich text area fields with the correct HTML tags. See Considerations for Working with Translation Files for more information on translating rich text fields.

Wrong number of columns in line: . Check that you have escaped new lines, or carriage returns in the line tabs, newlines, or carriage returns. Make sure tabs (\\t), new lines (\\n), and carriage specified in the error message. that the translated file has the same number returns (\\r) in your files. of columns as the file you exported.

Your export request failed. Please retry or Salesforce had an unexpected problem Contact Salesforce Customer Support. contact support. while exporting your file.

Your import request failed. Please retry or Salesforce had an unexpected problem Contact Salesforce Customer Support. contact support. while importing your file.

Your organization does not have language The file that you’re trying to import is in a Add the language you want to use to permissions for . language you haven’t yet added to Translation Workbench through the Translation Workbench. Translation Language Settings Setup page. Then import your file again.

SEE ALSO: Export Metadata Translation Files Export Data Translation Files Import Translated Files Considerations for Working with Translation Files

140 Extend Salesforce with Clicks, Not Code Manage Your Translations

Translation Considerations

Review considerations for managing your translations and translating flows. EDITIONS

Considerations for Managing Translations Metadata translation Keep these tips in mind when creating custom labels, working with translators, and maintaining available in: Salesforce translations. Classic (not available in all orgs) and Lightning Considerations for Translating Flows Experience When you use Translation Workbench to translate flows, note these considerations. Data translation available in: Lightning Experience

Available in: Professional, Enterprise, Performance, Unlimited, and Developer Editions

Data translation applies to: B2B Commerce

Considerations for Managing Translations

Keep these tips in mind when creating custom labels, working with translators, and maintaining EDITIONS translations. • Salesforce assumes that all customizations are entered in the Salesforce org’s default language. Metadata translation We recommend that global administrators work together in the org’s default language. available in: Salesforce • Salesforce recommends the XML Localization Interchange File Format (.xlf) for translation files. Classic (not available in all orgs) and Lightning • When creating a custom report type for translation into multiple languages via Translation Experience Workbench, we recommend that you set your personal language to match your org’s default language. This ensures that translated words display in the correct language for translators. Data translation available in: Lightning Experience • Advise users customizing reports or list views to use filter criteria values in their personal language. However, if they use the starts with or containscontains operators, advise Available in: Professional, them to choose the language of the filter criteria values they entered. Enterprise, Performance, • If you installed a managed package that includes translations, those translated values appear Unlimited, and Developer to users regardless of whether the language is active on the Translation Language Settings Editions Setup page. To override metadata translations delivered by a managed package for custom Data translation applies to: objects, see Override Translations in Second-Generation Managed Packages and Unlocked B2B Commerce Packages. • Let translators know which languages they are responsible for translating. • Notify all translators when you add new translated components to your org. For best results, have your translators check their translations frequently, and be sure to notify them when changes occur. • Periodically review outdated translations by exporting your translations. To generate a list of all the translatable customizations and the associated Out of Date states, use the Outdated and Untranslated export type or Bilingual export type.

SEE ALSO: Work with Translation Files Override Translations in Second-Generation Managed Packages and Unlocked Packages

141 Extend Salesforce with Clicks, Not Code Manage Your Translations

Considerations for Translating Flows

When you use Translation Workbench to translate flows, note these considerations. EDITIONS

Translating Flows Available in: Salesforce Classic (not available in all • To check which flow types are translatable, see Flow Types in Salesforce Help. orgs) and Lightning • A translation can only reference a merge field (like {!myVar}) if the field is referenced in the first Experience 1,000 characters of the primary label. Available in: Professional, • Translations for flow definition name and version name each have a maximum limit of 255 Enterprise, Performance, characters. Other translations for flow labels have a maximum of 1,000 characters. Unlimited, and Developer • Text templates and merge field values aren’t supported for translation. Editions • Right-to-left languages aren’t supported. • When a flow label isn’t translated for a language, Salesforce uses the translation for the appropriate fallback language. If the fallback language has no translated label, the primary label is used.

Updating Flow Translations When you change a flow that you translated, Salesforce copies as much information as it can when you create a new version or save changes to the translated version. For example, version 1 of the Survey Customers flow has a translation for the WelcomeMessage field. When you save another version of the flow, Salesforce copies all the latest translations from version 1 to version 2. The same happens if you save it as a new flow. When you remove a label from a flow, translations aren’t copied. Salesforce uses the label’s Unique Name to copy translations to another version. When you change the label’s unique name, Salesforce treats it as a new label. When you delete a flow, its translations are also deleted. When you translate a flow from a managed package, the flow’s Master Definition Name doesn’t appear on the Translate page or the Override page. To update the translation for the Master Definition Name, edit the flow label and then update the translation from the Translate page.

Exporting and Importing Flow Translations • You can export and import translation files to send to translators or to help you translate lengthy text. • When you export translations, the primary labels are truncated after 1,000 characters.

SEE ALSO: Translation Considerations for Flows

142 Extend Salesforce with Clicks, Not Code Set Up Your Data Your Way

Set Up Your Data Your Way

Optimize your Salesforce data to fit the unique needs of your users. You can create your own objects EDITIONS with data that fits together in the ways that make the most sense for you. Available in: both Salesforce Store Information That’s Unique to Your Organization Classic and Lightning Create custom objects to store information that’s unique to your organization. Choose whether Experience your custom objects are searchable, support sharing, or include access to the Bulk API and The available customization Streaming API. options vary according to Store Customers’ Data Privacy Preferences which Salesforce Edition you Store certain data privacy preferences for your customers. have. Classify Sensitive Data to Support Data Management Policies Record data sensitivity and compliance categorization at the field level. Data classification can USER PERMISSIONS be used to guide decisions around access, reporting, and data compliance. To view setup options: Design Your Own Data Model • View Setup and Schema Builder provides a dynamic environment for viewing and modifying all the objects and Configuration relationships in your app. This greatly simplifies the task of designing, implementing, and To customize your org: modifying your data model, or schema. Schema Builder is enabled by default. • Customize Application Create Custom Settings Use custom settings to create custom sets of data, or to create and associate custom data for an org, profile, or user. Customize Fields Customize standard and custom fields to tailor your org to your own unique requirements. Calculate Field Values With Formulas A formula is an algorithm that derives its value from other fields, expressions, or values. Formulas can help you automatically calculate the value of a field based on other fields. Generate Emails From Records A merge field is a field you can put in an email template, mail merge template, custom link, or formula to incorporate values from a record. For example, you can place a merge field in an email template so that the greeting includes the recipient’s name rather than a generic “Hello!”.

Store Information That’s Unique to Your Organization

Create custom objects to store information that’s unique to your organization. Choose whether EDITIONS your custom objects are searchable, support sharing, or include access to the Bulk API and Streaming API. Available in: both Salesforce Every custom object is classified as either an Enterprise Application object or a Light Application object. Classic and Lightning The difference between these two categories is that Light Application objects don’t support sharing, Experience access to the Bulk API, or access to the Streaming API. Available in: Contact If you need to track your organization’s usage of each category, create a custom report type with Manager, Group, a primary object of User Licenses and a child object of Custom Object Usage by User License Metrics. Professional, Enterprise, Performance, Unlimited, and Developer Editions

143 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

By default, all custom objects are Enterprise Application objects. To make your custom object a Light Application object, disable Allow Sharing, Allow Bulk API Access, and Allow Streaming API Access on the object’s detail page.

Manage Custom Objects Create, customize, edit, delete, or truncate custom objects to extend the functionality that standard objects, like accounts and contacts, provide. Track Your Organization’s Custom Object Usage by User License Type To keep track of how many custom objects your users are assigned to, create a custom report type with the User Licenses and Custom Object Usage by User License Metrics objects. Manage Big Objects A big object stores and manages massive amounts of data on the Salesforce platform. You can archive data from other objects or bring datasets from outside systems into a big object to get a full view of your customers. From Setup, you can create a custom big object and define its fields and index. Object Relationships Overview Create relationships to link objects with each other, so that when your users view records, they can also see related data. For example, link a custom object called Bugs to cases to track product defects that are associated with customer cases. Create Record Types for Custom Objects Custom Object Security Learn how security settings work together so you can control access to your custom objects with great flexibility. Notes on Enabling Activities for Custom Objects

SEE ALSO: Track Your Organization’s Custom Object Usage by User License Type

144 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Manage Custom Objects

Create, customize, edit, delete, or truncate custom objects to extend the functionality that standard EDITIONS objects, like accounts and contacts, provide.

Note: Your administrator may have created a tab without any help. If you need help to Available in: both Salesforce understand how a tab for a custom object works, contact your administrator. Classic (not available in all orgs) and Lightning Your object management settings list the custom objects that are defined for your organization. Experience From this list, you can: Available in: Contact • Define a custom object. Manager, Group, • Display detailed information about a custom object. Professional, Enterprise, Optional features you can customize include enabling search and reports, tracking activities, Performance, Unlimited, tracking field history, and making the object available for the Salesforce Customer Portal. Developer, and Database.com Editions • To update the custom object definition, click Edit and update the desired fields. Managed Packages are not Note: The Allow Reports, Allow Activities, and Allow Search fields available in Database.com. are not locked in Managed - Released and can be changed by the developer in future releases of a managed package. USER PERMISSIONS • To delete a custom object, click Del. To create and edit custom • To truncate a custom object, click Truncate. objects: • To view deleted custom objects, click the Deleted Objects link. The total number of deleted • Customize Application custom objects for your organization is listed in parentheses. The detail page of the custom object provides information about various characteristics of the object, including standard fields, custom fields, field history tracking, relationships, custom links, search layouts, page layouts, and object limits. You can: • Click individual items to display additional detail. • To delete a custom field, click Del next to its name in the Custom Fields & Relationships section. • Click More at the bottom of the page or View More below a related list to display more items. • Click New to directly add new items.

Note: The object limit percentages are truncated, not rounded. For example, if your org uses 95.55% of the limit for a particular customization, the object limit displays 95%.

Deployment Status for Custom Objects and External Objects Create a Custom Object Track and store data that’s unique to your organization. Follow different steps, depending on which Salesforce experience you’re using. Modify Custom Objects Custom Object Standard Fields When you create a custom object, these default fields are automatically assigned to the object. Delete Custom Objects Manage Deleted Custom Objects Truncating Custom Objects It’s important to understand what truncating an object does before using it to remove records.

145 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Truncate Custom Objects Truncating custom objects allows you to delete all of the object’s records permanently, but preserve the empty object and its metadata.

SEE ALSO: Make Search Faster Store Information That’s Unique to Your Organization Find Object Management Settings

Deployment Status for Custom Objects and External Objects

While developing a custom object or external object, you might not want users to see and interact EDITIONS with it. Because users can get frustrated with changes in layout or lose data when you delete custom fields, control visibility of the new object until you’re finished. Available in: both Salesforce Use the Deployment Status setting in the object definition to control when users can see and use Classic (not available in all the object and its associated custom tab, related lists, and reports. orgs) and Lightning Experience • Set the deployment status to In Development when first creating your custom object or external object. Doing so hides it from users while you are designing and testing it. Only users with the Available in: Contact Customize Application permission can see the object tab, search results, related lists, and report Manager, Group, data types. Professional, Enterprise, Performance, Unlimited, • Change the deployment status to Deployed when you want to allow all users to use the object Developer, and and the associated custom tab, related lists, and reports. Database.com Editions • If you make more enhancements after deploying a custom object or external object, you can Salesforce Connect external change the deployment status back to In Development. objects are available in: Note: A custom report type’s deployment status changes from Deployed to In Development Developer Edition and for if its primary object is a custom or external object whose deployment status similarly changes. an extra cost in: Enterprise, Performance, and Note: When you create a big object, the status is set to In Development. You can't deploy Unlimited Editions a big object until it includes an index that contains at least one custom field. Only required custom fields are allowed in an index. After you create an index, you see a second status of Deployed. Once you’re ready to grant users access, change the status to Deployed. USER PERMISSIONS

To deploy custom objects SEE ALSO: and external objects: Make Search Faster • Customize Application

Create a Custom Object Track and store data that’s unique to your organization. Follow different steps, depending on which Salesforce experience you’re using.

Create a Custom Object in Lightning Experience Track and store data that’s unique to your organization. If you see the App Launcher icon ( ) on the left side of the navigation bar at the top of your screen, you're in Lightning Experience. If not, you're in Salesforce Classic. Create a Custom Object from a Spreadsheet in Lightning Experience Use custom objects to track and store data that’s unique to your organization. If you prefer not to create a custom object and its fields manually, you can use a spreadsheet to add the object and its fields and populate all its record data.

146 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Create a Custom Object in Salesforce Classic Track and store data that’s unique to your org. Fields for Creating Custom Objects When you create a custom object, several fields are required to define how you can access the object. Considerations for Creating Custom Objects Before you create a custom object, make sure that you’ve reviewed the considerations.

SEE ALSO: Make Search Faster Object Relationships Overview Define Object-Level Help in Salesforce Classic

Create a Custom Object in Lightning Experience

Track and store data that’s unique to your organization. If you see the App Launcher icon ( ) on EDITIONS the left side of the navigation bar at the top of your screen, you're in Lightning Experience. If not, you're in Salesforce Classic. Available in: Lightning 1. From the top-right corner of any page in Setup, click Create > Custom Object. Experience 2. Complete the fields for your custom object and configure its features. Available in: Contact Manager, Group, 3. If you want to create a custom tab for the object immediately after you save it, select Launch Professional, Enterprise, New Custom Tab Wizard after saving this custom object. Performance, Unlimited, You can also create the custom object tab later in Setup by entering Tabs in the Quick Find and Developer Editions box, and clicking Tabs.

4. Save the new object. USER PERMISSIONS

5. In the Object Manager, click Fields & Relationships, and create the custom fields that your To create and edit custom object needs. objects: • Customize Application Tip: If you don’t want your users to see the new custom object right away, set its deployment status to In Development. This setting hides the object from users while you’re designing and testing it.

SEE ALSO: Create a Custom Object from a Spreadsheet in Lightning Experience Fields for Creating Custom Objects Considerations for Creating Custom Objects Create a Custom Object

147 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Create a Custom Object from a Spreadsheet in Lightning Experience

Use custom objects to track and store data that’s unique to your organization. If you prefer not to EDITIONS create a custom object and its fields manually, you can use a spreadsheet to add the object and its fields and populate all its record data. Available in: Lightning Note: Although it’s available in Professional Edition, this feature uses API. To use this feature, Experience Professional Edition orgs must have the API add on enabled. To enable the API add on, contact Available in: Contact your Account Executive. Manager, Group, You can create a custom object from a spreadsheet in two places: in Setup, or from the Navigation Professional, Enterprise, Items tab inside a Lightning app’s settings. Performance, Unlimited, and Developer Editions 1. In Setup, go to Object Manager, then click Create > Custom Object from Spreadsheet.

2. Alternatively, navigate to the Navigation Items tab inside a Lightning app. USER PERMISSIONS a. In Setup, enter App in the Quick Find box, then select App Manager. To create and edit custom b. Next to the app you want to add the custom object to, click , and select Edit. objects: • Customize Application c. Click Navigation Items. d. From the Available Items list, click Create > Custom Object from Spreadsheet.

3. Follow the wizard steps to import your custom object data from an .xlsx file, a .csv file, or a Google sheet. Salesforce detects object field labels from the spreadsheet row that you specify. All fields must be mapped to create the custom object. Skipping the import step creates an empty custom object that uses the fields in the spreadsheet as a template. When you finish creating the object, a custom tab is created for it. The object appears in the list of available items for your app. If you imported field data, your object is ready to go with fully populated records. 4. If you don’t want your users to see the new custom object right away, in the Object Manager in Setup, set its deployment status to In Development. This setting hides the object from users while you’re designing and testing it. 5. When you’re ready for your users to see the new custom object, add it to your app’s Selected Items list.

SEE ALSO: Fields for Creating Custom Objects Create a Custom Object in Lightning Experience Considerations for Creating Custom Objects Create a Custom Object

148 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Create a Custom Object in Salesforce Classic

Track and store data that’s unique to your org. EDITIONS 1. From Setup, enter Objects in the Quick Find box, then select Objects. 2. Click New Custom Object. Available in: Salesforce Classic (not available in all 3. Follow the wizard to complete the fields for your custom object. orgs)

4. Save the new object. Available in: Contact Manager, Group, SEE ALSO: Professional, Enterprise, Performance, Unlimited, Fields for Creating Custom Objects and Developer Editions Considerations for Creating Custom Objects Create a Custom Object USER PERMISSIONS

To create and edit custom objects: • Customize Application

Fields for Creating Custom Objects

When you create a custom object, several fields are required to define how you can access the EDITIONS object.

Note: If an administrator created a tab without including help, contact your administrator Available in: Lightning if you need help with how a custom object works. Experience and Salesforce Classic

Field Description Available in: Contact Manager, Group, Label This name is used to refer to the object in a user Professional, Enterprise, interface page. Performance, Unlimited, Plural Label The plural name of the object. If you create a and Developer Editions tab for this object, this name is used for the tab.

Gender If it is appropriate for your organization’s default language, specify the gender of the label. This field appears if the organization-wide default language expects gender. Your personal language preference setting does not affect whether the field appears. For example, if the organization’s default language is English and your personal language is French, you aren’t prompted for gender when creating a custom object.

Starts with a vowel sound If it’s appropriate for your organization’s default language, indicate whether “an” or “a” precedes the label.

Object Name A unique name used to refer to the object when using the API. In managed packages, this name

149 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Field Description prevents naming conflicts with package installations. Use only alphanumeric characters and . The name must begin with a letter and have no spaces. It cannot end with an nor have two consecutive underscores.

Description An optional description of the object. A meaningful description helps you remember the differences between objects when you are viewing them in a list.

Context-Sensitive Help Setting Defines the URL that displays when a user clicks Help for this Page from the object record’s home (overview), edit, and detail pages, list views, and related lists. This setting doesn’t affect the Help link at the top of a page. That link always opens the Help window. • To display the standard Salesforce Help available for any custom object record, select Open the standard Salesforce Help & Training window. • To display custom object-level help for your custom object, select Open a window using a Visualforce page and then select the Visualforce page to use as the target of the context-sensitive help link from that custom object’s pages.

Record Name The name used in page layouts, list views, related lists, and search results.

Data Type The type of field (text or auto-number) for the record name. Records that have unique IDs instead of names are auto-numbered and always a read-only field.

Display Format For an auto-numbered record name, enter the display format. You can have up to two sets of curly braces. For more information, see Custom Field Attributes on page 234.

Starting Number For an auto-numbered record name, enter the number to use when creating your first record for this custom object.

Allow Reports Makes the data in the custom object records available for reporting purposes. To create reports on custom objects, choose the Other Reports report type category, unless the custom object has a relationship with a standard object. When the custom object has a master-detail relationship with a standard object or is a lookup object on a standard object, select the standard object for the report type category instead. You can still create and run reports without selecting Allow Reports; however, the custom report type is not visible.

Allow Activities Allows users to associate tasks and scheduled calendar events related to the custom object records.

150 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Field Description Allow in Chatter Groups Allows users to add records of this custom object type to Chatter groups. When true, users with permissions can create records of this object type using the group publisher. The created record is associated with the group and appears in the group record list. When false, users with permissions can use the group publisher to create records of this object type, but the record is not associated with the group.

Enable Divisions If your organization has divisions enabled, select this option to enable the custom object for divisions. Divisions group records for simplified search results, list views, reports, and other areas within Salesforce. Salesforce adds a Division field to the custom object. If the custom object is the master in a master-detail relationship, custom objects on the detail side also get the Division field and inherit their division from the master record.

Available for Customer Portal Makes the custom object available to all portal users. This option is available only if your organization has a customer portal. If you enable Digital Experiences in your organization, this option no longer appears, and all custom objects are available in your Experience Cloud sites. If, before enabling , you had a Customer Portal and custom objects without this option selected, those objects become available in your Customer Portal.

Track Field History Enables your organization to track changes to fields on the custom object records. For example, it tracks who changed the field value and when, what the value was before the edit, and what it was changed to. History data is available for reporting, so users can easily create audit trail reports when this feature is enabled.

Allow Sharing When this setting is enabled, the custom object is an Enterprise Application object. When this setting isn’t enabled, the custom object is a Light Application object. When this setting is enabled, you must also enable Allow Bulk API Access and Allow Streaming API Access.

Allow Bulk API Access When this setting is enabled, the custom object is an Enterprise Application object. When this setting isn’t enabled, the custom object is a Light Application object. When this setting is enabled, you must also enable Allow Sharing and Allow Streaming API Access.

151 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Field Description

Allow Streaming API Access When this setting is enabled, the custom object is an Enterprise Application object. When this setting isn’t enabled, the custom object is a Light Application object. When this setting is enabled, you must also enable Allow Bulk API Access and Allow Sharing.

Deployment Status Indicates whether the custom object is visible to other users.

Allow Search To allow your users to find a custom object’s records when they search, create a custom tab set to Default On or Default Off. Creating a custom tab enables the custom object's Allow Search setting. A custom object that's associated with a custom tab is searchable (by default), even if users don't add the tab for display.

Add Notes & Attachments... Allows users to attach notes and attachments to custom object records. You can attach external documents to any object record in much the same way that you can add a PDF file or photo as an attachment to an email. This option is available only when you are creating an object.

Launch the New Custom Tab Wizard Starts the custom tab wizard after you save the custom object.

SEE ALSO: Create a Custom Object

Considerations for Creating Custom Objects

Before you create a custom object, make sure that you’ve reviewed the considerations. EDITIONS Object Creation • Establish object relationships first before adding all custom fields, page layouts, and related Available in: both Salesforce Classic (not available in all lists. orgs) and Lightning • The standard Name field is required on custom object related lists and page layouts. Experience • Provide meaningful names for your custom objects. The plural label of the custom object Available in: Contact is used as the label of the custom tab based on that object. Manager, Group, • When creating an object from a spreadsheet: Professional, Enterprise, – Skipping the import step creates an empty custom object that uses the fields in the Performance, Unlimited, spreadsheet as a template. and Developer Editions – You can click to preview the object data. Only the first 24 rows of data are displayed in preview. – These field types aren’t supported: • Auto Number

152 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

• Formula • Roll-Up Summary • Lookup Relationship • Master-Detail Relationship • External Lookup Relationship • Text Area (Rich) • Text (Encrypted) • Time

Object Permissions In Enterprise, Unlimited, Performance, Professional, and Developer editions, when you create a custom object, the Read, Create, Edit, and Delete permissions for that object are disabled for profiles that have View All Data or Modify All Data disabled. Enable access to custom objects in permission sets or custom profiles, and assign them to the users who need access. In Contact Manager and Group editions, when you create a custom object, the Read, Create, Edit, and Delete permissions for that object are enabled for all profiles. Sharing Model An org-wide default setting controls the data sharing model for custom objects. For more information, see Custom Object Security. Delegating Custom Object Administration After you create a custom object, you can delegate its administration to non-admin users. Queues After you create a custom object, you can define queues to distribute ownership of custom object records to your users.

SEE ALSO: Create a Custom Object

Modify Custom Objects

Customize the user interface for your custom objects by: EDITIONS • Creating a custom tab (see Custom Tabs) • Creating custom fields and relationships (see Custom Object Standard Fields on page 154) Available in: both Salesforce Classic and Lightning • Adding customized buttons and links to perform actions or link to other pages or websites (see Experience Define Custom Buttons and Links on page 775) • Defining which fields display for users on record detail and edit pages (see Build Page Layouts Available in: Contact for Custom Objects on page 33) Manager, Group, Professional, Enterprise, • Specifying which fields display for users in search results, lookup dialogs, and in the key lists on Performance, Unlimited, custom object tabs (see Customize Search Layouts for Custom Objects) and Developer Editions • Creating record types to display different picklist values and page layouts to different users based on their profiles (see Create Record Types for Custom Objects on page 176) USER PERMISSIONS

To customize custom objects: • Customize Application

153 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Custom Object Standard Fields

When you create a custom object, these default fields are automatically assigned to the object. EDITIONS Custom object fields store the data for your custom object records. Custom Fields for Custom Objects Available in: both Salesforce Classic (not available in all You can create custom fields to store information unique to your organization. You can also orgs) and Lightning create custom relationship fields to associate your custom object with another object in Experience Salesforce. Standard Fields for Custom Objects Available in: Contact Manager, Group, Custom objects automatically include the following standard fields. Click Edit to modify any Professional, Enterprise, of the editable fields. Performance, Unlimited, Developer, and Field Name Description Database.com Editions CreatedById ID of the user who created the record. Divisions are not available in Database.com. Currency Currency of the record if multicurrency is enabled.

Division Division to which the custom object record USER PERMISSIONS belongs. Custom objects that are “detail” objects To view and edit standard in a master-detail relationship inherit their fields: division from the master object. Custom objects • Customize Application that are not related to other records are To create custom fields: automatically in the global division. Available • Customize Application only in organizations that use divisions to segment their data.

LastModifiedById ID of the user who most recently changed the record.

Name Identifier for the custom object record. This name appears in page layouts, related lists, lookup dialogs, search results, and key lists on tab home pages. By default, this field is added to the custom object page layout as a required field.

OwnerId ID of the assigned owner of the custom object record. If the custom object becomes the detail side of a master-detail relationship, this field is removed, as ownership of the data is controlled by the master object, or by the primary master object for a custom object with two master-detail relationships.

Note: Custom objects on the detail side of a master-detail relationship can't have sharing rules, manual sharing, or queues, as these require the Owner field.

154 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Delete Custom Objects

When you delete a custom object, Salesforce does not add it to the Recycle Bin. Instead, deleted EDITIONS objects appear in the Deleted Objects list for 15 days. During this time, the object and its data are soft deleted, meaning you can restore or permanently erase (hard delete) the object and its data. Available in: Salesforce After 15 days, the object and its data are automatically hard deleted. Classic (not available in all Soft-deleted custom objects and their data count against your organization’s limits; hard-deleted orgs) items do not. Available in: Contact To delete a custom object: Manager, Group, Professional, Enterprise, 1. From the object management settings for custom objects, click Del next to object that you Performance, Unlimited, want to delete. Developer, and 2. When prompted, select the Yes, I want to delete the custom object Database.com Editions checkbox to confirm and click Delete. USER PERMISSIONS Why Can’t I Delete a Certain Custom Object? To delete custom objects: You can’t delete a custom object if it: • Customize Application • Is on the master side of a master-detail relationship. • Contains custom fields that are used in a roll-up summary field on another object. • Is referenced in Apex, a Visualforce page, or an reporting snapshot. • Is referenced by a duplicate rule or a matching rule. • Contains more than 100,000 records. If the object you want to delete has more than 100,000 records, first delete an appropriate number of records and then delete the object.

Results of Deleting Custom Objects When you delete a custom object, Salesforce: • Displays an Insufficient Privileges message if someone clicks a bookmark to a deleted custom object record’s URL. • Removes the object from Salesforce AppExchange packages. • Changes the master-detail relationship to a lookup relationship, if the deleted object is on the detail side of a master-detail relationship. • Removes or erases: – The object’s custom tab – List views and workflow rules for the object – Mobile configuration settings, including data sets, mobile views, and excluded fields – Standard report types associated with the object, and reports based on standard report types if the deleted object is on the detail side of a master-detail relationship

• Hides, inactivates, or disables: – The custom object definition and related definitions – The object’s records and related records, including any records in the Recycle Bin – Custom report types for which the deleted object is the main object – Custom reports for which the deleted object is the main object – Custom formula fields on the object – Custom validation rules and approval processes on the object

155 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Note: Many removed, hidden, inactive, or disabled items can be restored if you undelete the custom object. See Manage Deleted Custom Objects for information about restoring deleted custom objects.

Results of Hard Deleting Custom Objects When a custom object is hard deleted, either manually, or automatically after 15 days: • The custom object’s definition and data are permanently deleted, and can’t be restored. • The custom object and its data no longer count against your organization’s limits. • If the deleted object is on the detail side of a master-detail relationship, master records currently in the Recycle Bin aren’t restorable if one or more detail records were automatically deleted as a result of the master record being deleted. Attempting to undelete the master record results in an error.

Note: This only happens when the deleted detail records have their custom object definition hard deleted while the master record is in the Recycle Bin.

SEE ALSO: Manage Deleted Custom Objects Find Object Management Settings Delete a Big Object

Manage Deleted Custom Objects

Deleted custom objects appear in the Deleted Objects list for 15 days. During this time, you can EDITIONS choose to permanently delete the object and its data, or you can undelete them. If you undelete a custom object, you might need to do some manual cleanup to restore list views and other Available in: Salesforce customizations that use the object. Classic (not available in all • To view a list of deleted custom objects: orgs) 1. Go to the object management settings for custom objects. Available in: Contact 2. Click Deleted Objects at the bottom of the list. Manager, Group, Professional, Enterprise, The Deleted Objects link appears only when you have at least one deleted custom object in Performance, Unlimited, your organization. The number in parentheses indicates the total number of deleted custom Developer, and objects. Database.com Editions • In the Deleted Objects list, you can do any of the following: – Click the object’s label to view details about it USER PERMISSIONS – Click Erase to permanently remove the object and its data To restore deleted custom – Click Undelete to restore the object and its data objects: • Customize Application To permanently delete Results of Hard Deleting Custom Objects custom objects: When a custom object is hard deleted, either manually, or automatically after 15 days: • Customize Application • The custom object’s definition and data are permanently deleted, and can’t be restored. • The custom object and its data no longer count against your organization’s limits.

156 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

• If the deleted object is on the detail side of a master-detail relationship, master records currently in the Recycle Bin aren’t restorable if one or more detail records were automatically deleted as a result of the master record being deleted. Attempting to undelete the master record results in an error.

Note: This only happens when the deleted detail records have their custom object definition hard deleted while the master record is in the Recycle Bin.

Limitations for Restoring Truncated Custom Objects Copies of truncated custom objects also appear in the list of deleted objects. Truncated custom objects can’t be restored to their original state. Undeleted copies of truncated objects have a new name and new URL, and some fields and data cannot be manually restored.

Restoring a Custom Object to Its Predeleted State When you restore a deleted custom object, its records are also undeleted, including any that were in the Recycle Bin.

Note: It might take several hours before you can search the undeleted object’s records.

To ensure that you return the object to its fully functional, predeleted state, check all affected conditions and customizations, and manually fix them if necessary. AppExchange packages Add the custom object to any appropriate Salesforce AppExchange packages. Custom tabs Re-create a custom tab for the object and add it to any custom apps that use it. List views, reports, and workflow rules Re-create them. Validation rules and approval processes Re-activate them. Formula fields Open and save any custom formula fields on the object to re-enable them. Page layouts Page layouts are restored automatically on the undeleted object. Page layouts are also restored automatically on other objects that use the page layout in a related list—as long as the page layout wasn’t edited while the object was deleted. Otherwise, you have to add the related list back to the other object. Custom report types For custom report types where the deleted object was not the main object, add the reference back to the restored object. Reports based on the custom report type are automatically restored if they weren’t edited while the object was deleted. Re-create any reports that have been edited. Relationships If the deleted custom object was on the detail side of a master-detail relationship, Salesforce converted it to a lookup relationship. Change it back to master-detail. Developer name The developer name for the object was changed to objectname_del. Change it back to the original name, objectname_c, so that customizations using the name will work properly.

157 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Deployment status When the custom object was deleted, its Deployment Status field was set to In Development. When you’ve restored all affected customizations to the undeleted object, change its status back to Deployed.

SEE ALSO: Delete Custom Objects Truncating Custom Objects Find Object Management Settings

Truncating Custom Objects

It’s important to understand what truncating an object does before using it to remove records. EDITIONS Truncating a custom object lets you remove all of the object’s records, while keeping the object and its metadata. Truncating custom objects is similar to the mass delete option available for Available in: both Salesforce standard objects. Classic (not available in all orgs) and Lightning Truncating a custom object permanently removes all of its records. You can’t recover the records Experience from the Recycle Bin. A copy of the truncated object appears in the Deleted Objects list for 15 days—during this period the object and its records continue to count toward your organization’s Available in: Contact limits—and then the copied object and its records are permanently deleted. Manager, Group, Professional, Enterprise, In contrast, if you delete a custom object, the object moves to the Deleted Objects list for 15 days. Performance, Unlimited, After that the object and its records are permanently deleted. Developer, and Important: Truncated custom objects can’t be restored to their original state. Database.com Editions

You can’t truncate standard objects or custom objects that: • Are referenced by another object through a lookup field or that are on the master side of a master-detail relationship • Are referenced in a reporting snapshot • Have a custom index or an external ID • Have activated skinny tables In addition, you can’t truncate custom objects when your org has reached its limit on allowed custom objects. Truncating a custom object erases: • All records currently sitting in the custom object’s Recycle Bin • The custom object’s history • Related events, tasks, notes, and attachments for each deleted record Truncating a custom object breaks: • Bookmarks to the truncated objects and its records. If someone clicks a bookmark to the truncated custom object or to a deleted record’s URL, Salesforce displays an Insufficient Privileges message. • Apex scripts and Visualforce pages with references to a truncated object or record. After truncating a custom object, you can continue to use the custom object and add new records. Salesforce preserves: • The custom object definition and all related definitions • Workflow rules, actions, and triggers • Sharing rules associated with the custom object • Validation rules and approval processes

158 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

• Master-detail relationships and formula fields • Translations • Mobile configuration settings When working with truncated objects, keep in mind: • The truncated object tab has a new URL, so new bookmarks need to be created. • List views and reports need to be refreshed after truncation. • Roll-up summary fields need to be recalculated after truncation. • There is no support for truncation in the API. • To truncate objects that contain master-detail relationships, first truncate the detail (child) objects and then the (master) parent objects, working your way up the relationship tree.

SEE ALSO: Truncate Custom Objects Manage Deleted Custom Objects

Truncate Custom Objects

Truncating custom objects allows you to delete all of the object’s records permanently, but preserve EDITIONS the empty object and its metadata.

Important: Truncating custom objects causes some irreversible changes to the truncated Available in: Salesforce object and its records. Before truncating, see Truncating Custom Objects. Then, enable it for Classic (not available in all your organization by entering User Interface in the Quick Find box, selecting orgs) User Interface, and then selecting the permission. Available in: Contact Truncating custom objects is a way to permanently remove all of the records from a custom object, Manager, Group, while keeping the object and its metadata intact for future use. Truncating is useful, for example, Professional, Enterprise, if you have created a custom object and filled it with test records. When you’re done with the test Performance, Unlimited, Developer, and data, you can truncate the object to purge the test records, but keep the object and put it into Database.com Editions production. This is much faster than batch-deleting records and possibly recreating the object. 1. Go to the object management settings for custom objects. USER PERMISSIONS 2. Click an object name to go to the object’s detail page, and then click Truncate. 3. In the Confirm Custom Object Truncate window, review the warning and then enter the name To truncate custom objects: of the object to truncate in the empty field. • Customize Application 4. Click Truncate.

SEE ALSO: Manage Deleted Custom Objects Find Object Management Settings

159 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Track Your Organization’s Custom Object Usage by User License Type

To keep track of how many custom objects your users are assigned to, create a custom report type EDITIONS with the User Licenses and Custom Object Usage by User License Metrics objects. 1. From Setup, enter Report Types in the Quick Find box, then select Report Types. Available in: both Salesforce Classic (not available in all 2. Click New Custom Report Type. orgs) and Lightning 3. Fill out the fields. Experience

Custom objects are For this field... Enter or select... available in: Contact Primary Object User Licenses Manager, Group, Professional, Enterprise, Report Type Label A label for this report type. The label appears Performance, Unlimited, when users create a report. and Developer Editions For example, Custom Object Usage Custom report types are by User License. available in: Professional, Enterprise, Performance, Report Type Name A unique name for this report type. Unlimited, and Developer Editions Description A description for this report type. This description appears when users create a report. USER PERMISSIONS Store in Category Other Reports To create or update custom report types: • Manage Custom Report 4. (Optional) To make this report type available to other users, select a Deployment Status Types of Deployed. To delete custom report types: 5. Click Next. • Modify All Data 6. Click the box under the primary object. 7. Select Custom Object Usage by User License Metrics. 8. Click Save. 9. Create a report using the new report type.

Manage Big Objects A big object stores and manages massive amounts of data on the Salesforce platform. You can archive data from other objects or bring datasets from outside systems into a big object to get a full view of your customers. From Setup, you can create a custom big object and define its fields and index.

Available in: both Salesforce Classic and Lightning Experience

Available in: Enterprise, Performance, Unlimited, and Developer Editions for up to 1 million records Additional record capacity and Async SOQL query available as an add-on license.

From Setup, enter Big Objects in the Quick Find box, then select Big Objects. From this page you can:

160 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

• Create a big object. • View and update details about a big object. • Delete a big object or view any big objects that were deleted in the last 15 days.

Create or Edit a Big Object Track and store big data that’s unique to your org. For existing big objects, a details page displays information about the big object’s fields and index.

SEE ALSO: Salesforce Developers: Big Objects Implementation Guide

Create or Edit a Big Object Track and store big data that’s unique to your org. For existing big objects, a details page displays information about the big object’s fields and index. 1. From Setup, enter Big Objects in the Quick Find box, then select Big Objects. 2. Click New or click an existing big object. 3. Add or edit details about the big object. 4. Add or edit custom fields. Custom fields store the data for your big object records. 5. Add an index. The index defines the composite primary key for a big object and is used for querying and filtering the big object data. 6. Save the big object. Once you’ve created an index and deployed a big object, you can’t edit or delete the index. To change the index, you must start over with a new big object.

Big Object Definition Details When you create a custom big object, several required fields define how you can access the big object. Custom Big Object Fields Custom fields store the data for your custom big object records. Considerations When Creating an Index Plan carefully when creating an index for your custom big object. The index is used for querying and filtering the big object data and must be designed properly. Add an Index to a Big Object The index defines the composite primary key for a custom big object and is used for querying and filtering the big object data. Each big object requires an index. Delete a Big Object When you delete a custom big object, Salesforce doesn’t add it to the Recycle Bin. Instead, deleted big objects appear in the Deleted Objects list for 15 days. During this time, the big object and its data are soft deleted, meaning you can restore or permanently erase (flag for hard delete) the big object and its data. After 15 days, the big object and its data are automatically flagged for hard delete.

Big Object Definition Details When you create a custom big object, several required fields define how you can access the big object. The big object definition details page displays information about the big object’s fields and index.

161 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Field Name Description Label This name is used to refer to the object in a user interface page.

Plural Label The plural name of the object.

Starts with a vowel sound If it’s appropriate for your organization’s default language, indicate whether “an” or “a” precedes the label.

Object Name A unique name used to refer to the object when using the API. In managed packages, this name prevents naming conflicts with package installations. Use only alphanumeric characters and underscores. The name must begin with a letter and have no spaces. It cannot end with an underscore nor have two consecutive underscores. In the API, the names of custom big objects have a suffix of two underscores immediately followed by a lowercase “b” (__b). For example, a big object named “HistoricalInventoryLevels” is seen as HistoricalInventoryLevels__b in that organization's WSDL.

Description An optional description of the object. A meaningful description helps you remember the differences between objects when you are viewing them in a list.

Context-Sensitive Help Setting Defines the URL that displays when a user clicks Help for this Page from the object record’s home (overview), edit, and detail pages, list views, and related lists. This setting doesn’t affect the Help link at the top of a page. That link always opens the Help window. • To display the standard Salesforce Help available for any custom object record, select Open the standard Salesforce Help & Training window. • To display custom object-level help for your custom object, select Open a window using a Visualforce page and then select the Visualforce page to use as the target of the context-sensitive help link from that custom object’s pages.

Deployment Status When you create a big object, the status is set to In Development. You can't deploy a big object until it includes an index that contains at least one custom field. Only required custom fields are allowed in an index. After you create an index, you see a second status of Deployed. Once you’re ready to grant users access, change the status to Deployed.

Custom Big Object Fields Custom fields store the data for your custom big object records.

Custom Fields for Big Objects Create custom fields to store information unique to your org. You can also create custom relationship fields to associate your big object with another object in Salesforce. Big objects support these field types: • Lookup Relationship • Date/Time • Email • Number • Phone • Text

162 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

• Text Area (Long) • URL To create an index for your big object, at least one custom field must be marked as required.

Standard Fields for Big Objects Currently, big objects don’t include standard fields.

SEE ALSO: Create Custom Fields

Considerations When Creating an Index Plan carefully when creating an index for your custom big object. The index is used for querying and filtering the big object data and must be designed properly. Keep these considerations in mind when creating the index. • An index must include at least one custom field and can have up to five custom fields total. • All custom fields that are part of the index must be marked as required. • You can’t include Long Text Area and URL fields in the index. • The total number of characters across all text fields in an index can’t exceed 100.

Note: Email fields are 80 characters. Phone fields are 40 characters. Keep these lengths in mind when designing your index because they count toward the 100 character limit.

• After you’ve created the index, you can’t edit or delete it. To change the index, you must start over with a new big object. • Design your index so that you assign the most frequently used field in a query filter to Index Position 1. The order in which you define the fields determines the order that they’re listed in the index.

Add an Index to a Big Object The index defines the composite primary key for a custom big object and is used for querying and filtering the big object data. Each big object requires an index. To create an index, you must have at least one required custom field defined on the big object. See Considerations When Creating an Index on page 163 for more details. 1. From the Index section of a big object detail page, click New. This button displays only if the big object has at least one required custom field. 2. Add a Label and Name for the index.

Warning: When querying a big object record via SOQL and passing the results as arguments to the delete API, if any index field name has a or trailing white space, you can't delete the big object record.

3. For each custom field listed, set the Index Position and Index Direction. The order in which you define the fields determines the order that they’re listed in the index. Set the Index Position to 1 for the most frequently used filter parameter.

163 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

4. Save the index.

Delete a Big Object When you delete a custom big object, Salesforce doesn’t add it to the Recycle Bin. Instead, deleted big objects appear in the Deleted Objects list for 15 days. During this time, the big object and its data are soft deleted, meaning you can restore or permanently erase (flag for hard delete) the big object and its data. After 15 days, the big object and its data are automatically flagged for hard delete. Salesforce runs a background job to completely remove big objects that have been flagged for hard-delete from your org. The job doesn’t run immediately, but you can’t access these large objects because they no longer appear in the Deleted Objects list. Soft-deleted big objects and their data always count against your org’s limits. Big objects that are flagged for hard delete, but the background job hasn’t yet removed, also count. After the background job removes these big objects, they no longer count against your org’s limit. 1. From Setup, enter Big Objects in the Quick Find box, then select Big Objects. 2. Click Del next to the object that you want to delete. 3. When prompted, select the Yes, I want to delete the Big Object checkbox to confirm and click Delete. The big object is soft deleted and remains in the Deleted Objects list for 15 days. 4. To permanently erase (flag for hard-delete) the big object, click Deleted Big Object. 5. Click Erase next to the big object you want to permanently erase. 6. When prompted, select the Yes, I want to permanently delete the Big Object checkbox to confirm and click Delete. The big object is flagged for hard-delete and can no longer be restored.

164 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Object Relationships Overview

Create relationships to link objects with each other, so that when your users view records, they can EDITIONS also see related data. For example, link a custom object called Bugs to cases to track product defects that are associated with customer cases. Available in: Salesforce You can define different types of relationships by creating custom relationship fields on an object. Classic (not available in all Before you begin creating relationships, determine the type of relationship that suits your needs. orgs) and Lightning Experience Different types of relationships between objects in Salesforce determine how they handle data deletion, sharing, and required fields in page layouts. Let’s review the types of relationships. Available in: Contact Manager, Group, Master-detail Professional, Enterprise, Closely links objects together such that the master record controls certain behaviors of the Performance, Unlimited, detail and subdetail record. For example, you can define a two-object master-detail relationship, Developer, and such as Account—Expense Report, that extends the relationship to subdetail records, such as Database.com Editions Account—Expense Report—Expense Line Item. You can then perform operations across the master—detail—subdetail relationship.

Tip: Create a master-detail relationship before a custom object contains data.

Behaviors of master-detail relationships: • Deleting a detail record moves it to the Recycle Bin and leaves the master record intact; deleting a master record also deletes related detail and subdetail records. Undeleting a detail record restores it, and undeleting a master record also undeletes related detail and subdetail records. However, if you delete a detail record and later separately delete its master record, you can’t undelete the detail record, as it no longer has a master record to relate to. • By default, records can’t be reparented in master-detail relationships. Administrators can, however, allow child records in master-detail relationships on custom objects to be reparented to different parent records by selecting the Allow reparenting option in the master-detail relationship definition. • The Owner field on the detail and subdetail records isn’t available and is automatically set to the owner of the master record. Custom objects on the detail side of a master-detail relationship can't have sharing rules, manual sharing, or queues, as these require the Owner field. • Detail and subdetail records inherit security settings and permissions from the master record. You can’t set permissions on the detail record independently. • The master-detail relationship field (which is the field linking the objects) is required on the page layout of the detail and subdetail records. • The master object can be a standard object, such as Account or Opportunity, or a custom object. • As a best practice, don't exceed 10,000 child records for a master-detail relationship. • Each custom object can have up to two master-detail relationships and up to 25 total relationships. • The Related To entry can’t be changed after you save the relationship. • A profile or a permission set can have an entity, such as Account, with a master-detail relationship. A broken permission dependency exists if the child entity has permissions that the parent should have. Salesforce updates the parent entity for a broken permission dependency on the first save action for the profile or permission set.

If the child entity has these permissions These permissions are enabled on the parent entity Modify All OR View All View All

View All OR Read Read

165 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Many-to-many You can use master-detail relationships to model many-to-many relationships between any two objects. A many-to-many relationship allows each record of one object to be linked to multiple records from another object and vice versa. For example, you create a custom object called Bug that relates to the standard case object such that a bug could be related to multiple cases and a case could also be related to multiple bugs. Lookup Links two objects together. Lookup relationships are similar to master-detail relationships, except they don’t support sharing or roll-up summary fields. With a lookup relationship, you can: • Link two different objects. • Link an object with itself (except for the user object; see Hierarchical on page 167). For example, you might want to link a custom object called Bug with itself to show how two different bugs are related to the same problem.

Note: Lookup relationships from objects related to the campaign member object aren’t supported; however, you can create lookup relationships from the campaign member object related to other objects. When you create a lookup relationship, you can set these options: • Make the lookup field required for saving a record, requiring it on the corresponding page layout as well. • If the lookup field is optional, you can specify one of three behaviors to occur if the lookup record is deleted: – Clear the value of this field This is the default. Clearing the field is a good choice when the field doesn’t have to contain a value from the associated lookup record. – Don’t allow deletion of the lookup record that’s part of a lookup relationship If you have dependencies built on the lookup relationship, such as a workflow rule, this option doesn’t allow the lookup record to be deleted.

Note: Deleting a record that has child records isn’t allowed, except when the child records are soft-deleted (sent to the Recycle Bin). If all the child records of a parent record are soft-deleted, then the parent record is deleted. Furthermore, any soft-deleted children are then removed from the recycle bin and permanently deleted.

– Delete this record also Available only if a custom object contains the lookup relationship, not if it’s contained by a standard object. However, the lookup object can be either standard or custom. Choose when the lookup field and its associated record are tightly coupled and you want to completely delete related data. For example, say that you have an expense report record with a lookup relationship to individual expense records. When you delete the report, you probably want to delete all the expense records, too.

Warning: Choosing Delete this record also can result in a cascade-delete. A cascade-delete bypasses security and sharing settings, which means users can delete records when the target lookup record is deleted even if they don’t have access to the records. To prevent records from being accidentally deleted, cascade-delete is disabled by default. Contact Salesforce to get the cascade-delete option enabled for your organization. Cascade-delete and its related options aren’t available for lookup relationships to business hours, network, lead, price book, product, or user objects.

When you define a lookup relationship, you can include a lookup field on the page layouts for that object and create a related list on the associated object's page layouts. For example, if you have a custom object called PTO Requests and you want your users to link a PTO request with the employee submitting the request, create a lookup relationship from the PTO Request custom object with the user object. If the parent record in a lookup relationship is deleted, the field history tracking for the child record doesn't record the deletion. For example, if a parent account is deleted, the Account History related list for the child account doesn’t show the deletion.

166 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

You can't delete an object or record in a lookup relationship if the combined number of records between the two linked objects is more than 100,000. To delete an object or record in a lookup relationship, first delete an appropriate number of its child records. When you delete an object used by a lookup field, delete the field, too. To delete both the object and the field, use the Metadata API with a delete manifest that uses purgeOnDelete. Or, use Setup in the UI to delete the field first. Otherwise, the object can’t be deleted. External lookup An external lookup relationship links a child standard, custom, or external object to a parent external object. When you create an external lookup relationship field, the standard External ID field on the parent external object is matched against the values of the child’s external lookup relationship field. External object field values come from an external data source. Indirect lookup An indirect lookup relationship links a child external object to a parent standard or custom object. When you create an indirect lookup relationship field on an external object, you specify the parent object field and the child object field to match and associate records in the relationship. Specifically, you select a custom unique, external ID field on the parent object to match against the child’s indirect lookup relationship field, whose values come from an external data source. Hierarchical A special lookup relationship available for only the user object. It lets users use a lookup field to associate one user with another that does not directly or indirectly refer to itself. For example, you can create a custom hierarchical relationship field to store each user's direct manager.

Tip: When creating a hierarchical field in Personal, Contact Manager, Group, and Professional Editions, you can select the Restricted Field checkbox so that only users with the Manage Internal Users permission can edit it. In Professional, Enterprise, Unlimited, Performance, and Developer Edition, use field-level security instead.

Create a Many-to-Many Relationship Considerations for Relationships

SEE ALSO: Considerations for Relationships External Object Relationships Create a Many-to-Many Relationship Create a Custom Object

167 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Create a Many-to-Many Relationship

You can use master-detail relationships to model many-to-many relationships between any two EDITIONS objects. A many-to-many relationship allows each record of one object to be linked to multiple records from another object and vice versa. For example, you create a custom object called Bug Available in: both Salesforce that relates to the standard case object such that a bug could be related to multiple cases and a Classic (not available in all case could also be related to multiple bugs. When modeling a many-to-many relationship, you use orgs) and Lightning a junction object to connect the two objects you want to relate to each other. Experience

Junction Object Available in: Contact A custom object with two master-detail relationships. Using a custom junction object, you can Manager, Group, model a “many-to-many” relationship between two objects. For example, you create a custom Professional, Enterprise, object called “Bug” that relates to the standard case object such that a bug could be related to Performance, Unlimited, multiple cases and a case could also be related to multiple bugs. Developer, and Creating the many-to-many relationship consists of: Database.com Editions 1. Creating the junction object. Reports are not available in Database.com. 2. Creating the two master-detail relationships. 3. Customizing the related lists on the page layouts of the two master objects. USER PERMISSIONS 4. Customizing reports to maximize the effectiveness of the many-to-many relationship. To create a many-to-many Creating the Junction Object relationship: • Customize Application 1. Create a custom object to be your junction object. 2. In the custom object wizard, consider these tips specifically for junction objects: • Name the object with a label that indicates its purpose, such as BugCaseAssociation. • For the Record Name field, it is recommended that you use the auto-number data type. • Do not launch the custom tab wizard before clicking Save. Junction objects do not need a tab.

Creating the Two Master-Detail Relationships To create the two master-detail relationships: 1. Verify that the two objects you want to relate to each other already exist. For example, you may want to relate the standard case object to a custom bug object. 2. On the junction object, create the first master-detail relationship field. In the custom field wizard: a. Choose Master-Detail Relationship as the field type. b. Select one of the objects to relate to your junction object. For example, select Case. The first master-detail relationship you create on your junction object becomes the primary relationship. This affects the following for the junction object records: • Look and feel: The junction object's detail and edit pages use the color and any associated icon of the primary master object. • Record ownership: The junction object records inherit the value of the Owner field from their associated primary master record. Because objects on the detail side of a relationship do not have a visible Owner field, this is only relevant if you later delete both master-detail relationships on your junction object. • Division: If your organization uses divisions to segment data, the junction object records inherit their division from their associated primary master record. Similar to the record ownership, this is only relevant if you later delete both master-detail relationships.

168 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

c. Select a Sharing Setting option. For master-detail relationship fields, the Sharing Setting attribute determines the sharing access that users must have to a master record to create, edit, or delete its associated detail records. d. For the Related List Label that will display on the page layout of the master object, do not accept the default. Change this to use the name of the other master object in your many-to-many relationship. For example, change this to Bugs so users will see a Bugs related list on the case detail page.

3. On the junction object, create the second master-detail relationship. In the custom field wizard: a. Choose Master-Detail Relationship as the field type. b. Select the other desired master object to relate to your junction object. For example, select Bug. The second master-detail relationship you create on your junction object becomes the secondary relationship. If you delete the primary master-detail relationship or convert it to a lookup relationship, the secondary master object becomes primary.

c. Select a Sharing Setting option. For master-detail relationship fields, the Sharing Setting attribute determines the sharing access that users must have to a master record to create, edit, or delete its associated detail records. d. For the Related List Label that will display on the page layout of the master object, do not accept the default. Change this to use the name of the other master object in your many-to-many relationship. For example, change this to Cases so users will see a Cases related list on the bug detail page.

Customizing Many-to-Many Relationship Related Lists For a many-to-many relationship in Salesforce, each master object record displays a related list of the associated junction object records. To create a seamless user experience, you can change the name of the junction object related list on each of the master object page layouts to have the name of the other master object. For example, you might change the BugCaseAssociations related list to Cases on the bugs page layout and to Bugs on the cases page layout. You can further customize these related lists to display fields from the other master object. To customize the fields that display in the junction object related list on each master object page layout: 1. Edit the page layout of each master object that is related to the junction object. For example, modify the BugCaseAssociations related list for case records by editing the page layout for cases. 2. Edit the properties of the related list you want to modify. For example, on cases the BugCaseAssociations related list was renamed to Bugs, so select the Bugs related list. 3. Add the fields to display in the related list. You can add fields from the junction object itself, but more importantly, you can add fields from the other master object. Each field is prefixed with its object name in the popup window. In the related list itself, only fields from the junction object are prefixed with the object name; fields from the other master object are not.

Note: The junction object related list does not include an icon on the master record's detail pages because the junction object does not have a custom tab. If you make a tab for the junction object, the icon is included.

Customizing Reports for Many-to-Many Relationships Many-to-many relationships provide two standard report types that join the master objects and the junction object. The report types are: • “Primary master with junction object and secondary master” in the primary master object's report category. • “Secondary master with junction object and primary master” in the secondary master object's report category. The order of the master objects in the report type is important. The master object listed first determines the scope of records that can be displayed in the report.

169 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

You can create custom reports based on these standard report types. In addition, you can create custom report types to customize which related objects are joined in the report.

SEE ALSO: Find Object Management Settings Object Relationships Overview Considerations for Relationships Create a Custom Object Find Object Management Settings

Considerations for Relationships

Review the following considerations before creating relationships between objects: EDITIONS Relationship Limits Each custom object can have up to two master-detail relationships and many lookup Available in: both Salesforce relationships. Each relationship is included in the maximum number of custom fields allowed. Classic (not available in all orgs) and Lightning Converting Relationships Experience You can convert a master-detail relationship to a lookup relationship as long as no roll-up summary fields exist on the master object. Available in: Contact Manager, Group, Converting a master-detail relationship to a lookup for a custom object on the “detail” side, Professional, Enterprise, changes the organization-wide default for the object to public read/write. Performance, Unlimited, You can convert a lookup relationship to a master-detail relationship if the lookup field in all Developer, and the records contains a value. Database.com Editions A lookup relationship can’t be changed to a master-detail relationship if the organization-wide Salesforce Connect external default of the child object access level in the relationship is Controlled by Parent. objects are available in: Developer Edition and for Converting a lookup to a master-detail-relationship changes the organization-wide default to an extra cost in: Enterprise, Controlled by Parent and the sharing model is updated to public read/write. Performance, and Self-Relationships Unlimited Editions You can create a relationship from an object to itself, but it must be a lookup relationship, and a single record can't be linked to itself. However, a record can indirectly relate to itself. For example, the Holiday Promotion campaign can select the Direct Mail campaign in the lookup relationship, and the Direct Mail campaign can select the Holiday Promotion campaign in the lookup relationship. You can't create a many-to-many self-relationship, that is, the two master-detail relationships on the junction object can't have the same master object. Icons for Custom Related Lists The icon you select for the associated custom tab also displays in any custom-related list you create based on a relationship. Custom related lists don’t include an icon if they’re based on a relationship with a custom object that doesn't have a custom tab. Master-Detail Relationships To create multilevel master-detail relationships, you need the Customize Application user permission. When you define a master-detail relationship, the custom object on which you're working is the detail side. Its data appears as a custom related list on page layouts for the other object.

170 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

By default, records can’t be reparented in master-detail relationships. Administrators can, however, allow child records in master-detail relationships on custom objects to be reparented to different parent records by selecting the Allow reparenting option in the master-detail relationship definition. You can have up to three custom detail levels. Standard objects can't be on the detail side of a custom object in a master-detail relationship. An object can appear one time in multilevel master-detail relationships. For example, a subdetail object in one multilevel master-detail relationship can't also be the owner of the master object in another multilevel master-detail relationship. A subdetail object can't also be the master object of the subdetail object’s detail object. Multilevel master-detail relationships don’t support division transfers. You can't create a master-detail relationship if the custom object already contains data. You can, however, create the relationship as a lookup and then convert it to master-detail if the lookup field in all records contains a value. Converting relationships from lookup to master-detail, or from master-detail to lookup behaves the same as for two-object master-detail relationships. That is, the two linked objects in the detail-subdetail1, or subdetail1-subdetail2 relationship have the same conversion limits as the master-detail relationship. Roll-up summary fields work as in two-object master-detail relationships. A master can roll up fields on detail records; however, it can't directly roll up fields on subdetail records. The detail record must have a roll-up summary field for the field on the subdetail record, allowing the master to roll up from the detail's roll-up summary field. You can use multilevel master-detail relationships in custom report types. The Allow Reports checkbox must be checked when you create the custom object. Custom report types created for multilevel master-detail relationships count toward the organization’s custom report type limit, and no reports generate if this limit is exceeded. Custom junction objects can’t have detail objects. That is, a custom junction object can’t become the master object in a multilevel master-detail relationship. You can't delete a custom object if it is on the master side of a master-detail relationship. If you delete a custom object that is on the detail side of a master-detail relationship, the relationship is converted to a lookup relationship. Deleting a detail record moves it to the Recycle Bin and leaves the master record intact; deleting a master record also deletes related detail and subdetail records. Undeleting a detail record restores it, and undeleting a master record also undeletes related detail and subdetail records. However, if you delete a detail record and later separately delete its master record, you can’t undelete the detail record, as it no longer has a master record to relate to. A Metadata API deployment that includes Master-Detail relationships deletes all detail records in the Recycle Bin in the following cases. 1. For a deployment with a new Master-Detail field, soft delete (send to the Recycle Bin) all detail records before proceeding to deploy the Master-Detail field, or the deployment fails. During the deployment, detail records are permanently deleted from the Recycle Bin and can’t be recovered. 2. For a deployment that converts a Lookup field relationship to a Master-Detail relationship, detail records must reference a master record or be soft-deleted (sent to the Recycle Bin) for the deployment to succeed. However, a successful deployment permanently deletes any detail records in the Recycle Bin. As a best practice, don't exceed 10,000 child records for a master-detail relationship. A profile or a permission set can have an entity, such as Account, with a master-detail relationship. A broken permission dependency exists if the child entity has permissions that the parent should have. Salesforce updates the parent entity for a broken permission dependency on the first save action for the profile or permission set.

If the child entity has these permissions These permissions are enabled on the parent entity

Modify All OR View All View All

171 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

If the child entity has these permissions These permissions are enabled on the parent entity

View All OR Read Read

Many-to-Many Relationships Junction object records are deleted when either associated master record is deleted and placed in the Recycle Bin. If both associated master records are deleted, the junction object record is deleted permanently and can't be restored. Sharing access to a junction object record is determined by a user's sharing access to both associated master records and the Sharing Setting option on the relationship field. See Custom Object Security on page 177. For example, if the sharing setting on both parents is Read/Write, then the user must have Read/Write access to both parents in order to have Read/Write access to the junction object. If the sharing setting on both masters is Read-Only, a user with Read-Only rights on the master records would have Read access to the junction object. In a many-to-many relationship, a user can't delete a parent record if there are more than 200 junction object records associated with it and if the junction object has a roll-up summary field that rolls up to the other parent. To delete this object, manually delete junction object records until the count is fewer than 200. The first master-detail relationship you create on your junction object becomes the primary relationship. This affects the following for the junction object records: • Look and feel: The junction object's detail and edit pages use the color and any associated icon of the primary master object. • Record ownership: The junction object records inherit the value of the Owner field from their associated primary master record. Because objects on the detail side of a relationship do not have a visible Owner field, this is only relevant if you later delete both master-detail relationships on your junction object. • Division: If your organization uses divisions to segment data, the junction object records inherit their division from their associated primary master record. Similar to the record ownership, this is only relevant if you later delete both master-detail relationships. The second master-detail relationship you create on your junction object becomes the secondary relationship. If you delete the primary master-detail relationship or convert it to a lookup relationship, the secondary master object becomes primary. Roll-up summary fields that summarize data from the junction object can be created on both master objects. Formula fields and validation rules on the junction object can reference fields on both master objects. You can define Apex triggers on both master objects and the junction object. A junction object can't be on the master side of another master-detail relationship. You can't create a many-to-many self-relationship, that is, the two master-detail relationships on the junction object can't have the same master object. Lookup Relationships If the lookup field is optional, you can specify one of three behaviors to occur if the lookup record is deleted: • Clear the value of this field This is the default. Clearing the field is a good choice when the field doesn’t have to contain a value from the associated lookup record. • Don’t allow deletion of the lookup record that’s part of a lookup relationship If you have dependencies built on the lookup relationship, such as a workflow rule, this option doesn’t allow the lookup record to be deleted.

Note: Deleting a record that has child records isn’t allowed, except when the child records are soft-deleted (sent to the Recycle Bin). If all the child records of a parent record are soft-deleted, then the parent record is deleted. Furthermore, any soft-deleted children are then removed from the recycle bin and permanently deleted.

172 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

• Delete this record also Available only if a custom object contains the lookup relationship, not if it’s contained by a standard object. However, the lookup object can be either standard or custom. Choose when the lookup field and its associated record are tightly coupled and you want to completely delete related data.

Warning: Choosing Delete this record also can result in a cascade-delete. A cascade-delete bypasses security and sharing settings, which means users can delete records when the target lookup record is deleted even if they don’t have access to the records. To prevent records from being accidentally deleted, cascade-delete is disabled by default. Contact Salesforce to get the cascade-delete option enabled for your organization. Cascade-delete and its related options aren’t available for lookup relationships to business hours, network, lead, price book, product, or user objects.

In a chain of lookup relationships, these behaviors work independently on each target field at each level. Say, for example, field A is the target lookup of field B, which in turn is the target lookup of field C. You can have a delete restriction on A and none on B, which means that A can't be deleted but B can. After B is deleted, the relationship between A and B no longer exists and C holds an empty value for the lookup. In a multilevel lookup relationship, these options can conflict. For example, if field A is the target lookup of field B, which in turn is the target lookup of field C, you can specify that A deletes B, but B can’t be deleted because it’s in a relationship with C. If you try to delete A, you get an error that B can’t be deleted because it’s linked to C. If the parent record in a lookup relationship is deleted, the field history tracking for the child record doesn't record the deletion. For example, if a parent account is deleted, the Account History related list for the child account doesn’t show the deletion. You can’t select indirect lookup fields in the parent field when you add the Related List - Single component to a Lightning Page. Instead, select the related list that’s associated with the indirect lookup field. It doesn’t show data in the related list, but shows the lookup field with no issue. Relationships on External Objects Lookup, external lookup, and indirect lookup relationships have some special behaviors and limitations. • Only lookup, external lookup, and indirect lookup relationships are available for external objects. No other relationship types are supported. • Depending on the availability of the external system, related lists of child external objects can load slowly when users view the parent record detail pages. • Relationships that involve external objects allow users to create child records from the record detail pages of parent records. However, the relationship field on each new child record isn’t automatically populated to identify the parent record. • Syncing doesn’t create relationship fields on the external objects in your Salesforce org. However, you can change the field type of a sync-created custom field to Lookup Relationship, External Lookup Relationship, or Indirect Lookup Relationship. Changing the field type of an existing custom field is simpler and more efficient than manually creating a relationship field on the external object. For example, suppose that the external system has a foreign key relationship. Syncing the related tables creates a text field in your org for the external column that identifies the foreign keys. To reflect the foreign key relationship within your org, change the field type of that text field to External Lookup Relationship.

• A relationship field is a type of custom field. Therefore, like all custom fields on an external object, relationship fields can be overwritten when you sync the external object. See the sync considerations for each Salesforce Connect adapter that you use. • Cascade-delete isn’t available for external object relationships. • In Salesforce Classic, indirect lookup relationship fields don’t display the expected names of parent records. Instead, each indirect lookup relationship field displays the value of the target field on the parent object. To find related records, target field values are matched against the values of the indirect lookup relationship field on the child object. The target field, which has the External ID and Unique attributes, is selected when an indirect lookup relationship field is created.

173 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

• In Salesforce Classic, external lookup relationship fields don’t always display the expected names of parent records. – In a list view, an external lookup relationship field displays the parent object ID or the value of the parent object’s External ID standard field. The latter appears by default, but if a custom field on the parent object has the Is Name Field attribute, the parent object ID is displayed. – In a record detail page, an external lookup relationship field displays the name as expected if the org has previously retrieved the parent record. If you see an ID in an external lookup relationship field, reload the page to replace the ID with the name.

• Lookup search isn’t available for external lookup relationship fields. To edit an external lookup relationship field, manually enter the value of the External ID standard field for the parent record. This limitation doesn’t apply when the parent external object is associated with the cross-org adapter for Salesforce Connect. • Lookup search isn’t available for indirect lookup relationship fields. To edit an indirect lookup relationship field, manually enter the value of the target field of the parent record. The target field is the custom field with External ID and Unique attributes that was selected when the indirect lookup relationship was created. To determine related records, Salesforce matches target field values against the values of the indirect lookup relationship field on the child object. • With external lookup and indirect lookup relationships, the parent record appears as a clickable link in the relationship field on the child record. If the child record is viewed by a user who doesn’t have access to the parent record, the parent record appears in the relationship field as plain text instead of a link. • Lookup filters aren’t available for external lookup relationship fields. • Indirect lookup relationship fields can be created on external objects only. • Only objects that have a custom field with the External ID and Unique attributes are available as parent objects in indirect lookup relationships. If you don't see the desired object when you create an indirect lookup relationship field, add a custom unique, external ID field to that object. • If the external system uses case-sensitive values in the specified External Column Name, make sure that the parent object field is also case-sensitive. When you define the parent object’s custom field, select External ID, Unique, and Treat "ABC" and "abc" as different values (case sensitive). Impact of Relationships on Reports The type of relationship you create affects which standard report types are available and how they're categorized. These report types determine which related objects can be included in the report: • Lookup relationships allow data from the two related objects to be joined in one report. • Master-detail relationships allow data from three objects to be joined in one report: the master object, the detail object, plus one other lookup object. If the detail object has multiple lookup relationships, a separate report type is available based on each lookup. • Many-to-many relationships provide two standard report types that join the master objects and the junction object. The report types are: – “Primary master with junction object and secondary master” in the primary master object's report category. – “Secondary master with junction object and primary master” in the secondary master object's report category. The order of the master objects in the report type is important. The master object listed first determines the scope of records that can be displayed in the report.

The reporting impact of each relationship type is summarized in the following table:

Relationship Type Standard Report Types Report Type Category Lookup Object by itself Based on the object Object with first lookup

174 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Relationship Type Standard Report Types Report Type Category Object with second lookup Object with third lookup

Master-Detail Master object by itself Master object Master object with detail object Master object with detail object and first lookup Master object with detail object and second lookup Master object with detail object and third lookup

Many-to-Many Primary master object by itself Primary master object Secondary master object by itself and Primary master object with junction object Secondary master object and secondary master object Secondary master object with junction object and primary master object

Custom report types give you more flexibility to join data from multiple objects, including lookups and master-detail relationships.

Important: Converting a relationship from lookup to master-detail or vice versa can cause existing custom reports to become unusable due to the different standard report types available for each type of relationship. We recommend that you test your custom reports immediately after converting the relationship type. If you revert your relationship back to the original type, the reports are restored and become usable again.

SEE ALSO: Object Relationships Overview Create a Many-to-Many Relationship External Object Relationships

175 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Create Record Types for Custom Objects

Create record types for a custom object to display different picklist values and page layouts to EDITIONS different users based on their profiles. 1. From the object management settings for a custom object, go to Record Types. Available in: Salesforce Classic (not available in all 2. Click New in the Record Types related list. orgs) 3. Select Master from the Existing Record Type dropdown list to copy all available picklist values, or choose an existing record type to clone its picklist values. Available in: Professional, Enterprise, Performance, Note: When you create a record type without cloning an existing one, the new record Unlimited, and Developer type automatically includes the master picklist values for both standard and custom Editions picklists. You can then customize the picklist values for the record type.

4. Enter a Record Type Label that's unique within the object. USER PERMISSIONS

Important: Don’t name your record type Master because it’s reserved for record types. To create record types for custom objects: 5. Enter a description. • Customize Application 6. Select Active to activate the record type. 7. Select Make Available next to a profile to make the record type available to users with that profile. Select the checkbox in the header row to make it available for all profiles.

Tip: If each profile is associated with a single record type, users will never be prompted to select a record type when creating records. Users assigned to a record type can still view and edit records associated with record types not enabled for their profiles.

8. For selected profiles, select Make Default next to a profile to make it the default record type for users of that profile. Select the checkbox in the header row to make it the default for all profiles. 9. Click Next. 10. Choose a page layout option to determine what page layout displays for records with this record type: • To apply a single page layout for all profiles, select Apply one layout to all profiles and choose the page layout from the dropdown list. • To apply different page layouts based on user profiles, select Apply a different layout for each profile and choose a page layout for each profile.

11. Click Save to edit the values of the standard and custom picklists available for the record type, or click Save and New to create another record type.

SEE ALSO: Find Object Management Settings

176 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Custom Object Security

Learn how security settings work together so you can control access to your custom objects with EDITIONS great flexibility. Set custom object security at the following levels Available in: both Salesforce Classic (not available in all • Tab—display the custom tab for the appropriate users based on their user profiles. orgs) and Lightning • Object—set the access users have to create, read, edit, and delete records for each object. Experience • Records—set the default sharing model for all your users. This determines the access users Available in: Contact have to custom object records that they do not own. Manager, Group, • Relationship—for objects on the detail side of a master-detail relationship, specify the sharing Professional, Enterprise, access that users must have to the master record in order to create, edit, or delete the associated Performance, Unlimited, detail records. This is specified in the Sharing Setting attribute of the master-detail Developer, and relationship field on the detail object. Database.com Editions • Fields—set the level of access users have to fields on your custom object page layout. Tabs are not available in These requirements apply to custom objects with no master-detail relationship. Database.com.

Action Required Privileges Create a record “Create” permission. The user must have the tab displayed to create a new record from the Create New drop-down list in the sidebar.

View a record “Read” permission and Public Read Only or Public Read/Write sharing model if not the record owner.

Edit a record “Edit” permission and Public Read/Write sharing model if not the record owner.

Delete a record “Delete” permission and must be the record owner or above the record owner in the role hierarchy.

These requirements apply to custom objects that have a master-detail relationship with a standard or custom object.

Action Required Privileges Create a record “Create” permission and either read or read/write access to the related master record, depending on the value of the Sharing Setting attribute of the master-detail relationship field on the detail object.

View a record “Read” permission and read access to the related master record. If the record has two master records in a many-to-many relationship, the user must have read access to both master records.

Edit a record “Edit” permission and either read or read/write access to the related master record, depending on the value of the Sharing

177 Extend Salesforce with Clicks, Not Code Store Information That’s Unique to Your Organization

Action Required Privileges Setting attribute of the master-detail relationship field on the detail object.

Delete a record “Delete” permission and either read or read/write access to the related master record, depending on the value of the Sharing Setting attribute of the master-detail relationship field on the detail object. When a user deletes a record that has related custom object records, all related custom object records are deleted regardless of whether the user has delete permission to the custom object.

Delegated administrators can manage nearly every aspect of specified custom objects, but they cannot create or modify relationships on the object or set organization-wide sharing defaults.

Notes on Enabling Activities for Custom Objects

• If you enable activities when creating a custom object, the activity related lists are added to the EDITIONS default page layout automatically. If you enable activities later, after the custom object already exists, you must add the related lists to the page layout manually. Available in: both Salesforce • Disabling activities for a custom object does not delete existing activity records. However, Classic and Lightning activity related lists are removed from custom object pages, and reports containing activities Experience and the custom object are deleted. Available in: Contact • If a custom object has a master-detail relationship with accounts, the custom object’s activities Manager, Group, roll up to the account and cause the account’s Last Activity date to be updated. For Professional, Enterprise, custom objects related to other types of records, the activities do not roll up. Performance, Unlimited, • The ability to send emails or create mail merge documents is available for activities on custom and Developer Editions objects. The email must be sent to a contact or lead. • When you change the ownership of a custom object record, any open activities related to that custom object are also transferred to the new record owner. • You cannot disable activity tracking for a custom object if any workflow tasks are associated with that custom object. • Custom object records can only be associated with a call log in Salesforce CRM Call Center if activities are enabled for the object.

SEE ALSO: Create a Custom Object

178 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

Store Customers’ Data Privacy Preferences

Store certain data privacy preferences for your customers. EDITIONS Regardless of whether you’re working toward complying with data protection and privacy regulations, data privacy records can help you track and store your customers’ consent. We’ve listed Available in: both Salesforce some of the regulations that are important to many companies collecting and processing their Classic (not available in all customers’ data. orgs) and Lightning Experience • General Data Protection Regulation (GDPR), European Union • Gramm-Leach-Bliley Act (GLB Act), United States Available in: all editions, including partner and • Canada’s Anti-Spam Law (CASL) customer community users.

Set Up Tracking and Storage of Certain Data Privacy Preferences Let your users store and track certain data privacy preferences for your customers. Consent Management Objects Get familiar with the objects you can use for managing your customers’ privacy and consent. Tracking Customer Requests for Data Privacy Updates If you store certain data privacy preferences in data privacy records based on the Individual object, track customers’ requests so that you can honor their wishes. Best Practices for Tracking Data Privacy Keep these best practices in mind when storing certain data privacy preferences in data privacy records based on the Individual object. Track Certain Data Privacy Preferences for Leads and Contacts Already in Salesforce Create data privacy records based on the Individual object for leads and contacts already in Salesforce using scripts. Manage Duplicate Data Privacy Records Keep your records clean and free of duplicates so that you can reach more customers and maintain better relationships with them.

Set Up Tracking and Storage of Certain Data Privacy Preferences

Let your users store and track certain data privacy preferences for your customers. EDITIONS Data protection details are available in all your org's records by default. You can easily verify that they're available or disable them from the Setup page. Available in: both Salesforce Classic (not available in all 1. From Setup, enter Data Protection and Privacy in the Quick Find box, and then orgs) and Lightning select Data Protection and Privacy. Experience 2. Click Edit, select or unselect Make data protection details available in records, and then click Save. Available in: all editions, including partner and You can make data protection information visible to users by adding the Individual field to customer community users. Lead, Contact, and Person Accounts page layouts. Consider renaming this field to something meaningful to your users. (Example: Manage data privacy or Track customer consent)

Note: If you don’t see tabs for the consent management objects, set the objects’ tab settings to Default On for the profiles where you want to enable tabs. Other Settings Consider enabling or updating these settings. • Create custom fields for data privacy records

179 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

• Create sharing rules for data privacy records • Encrypt personal data in certain data privacy fields (Shield customers) • Set the organization-wide sharing default • Track field history for individuals

SEE ALSO: Track Certain Data Privacy Preferences for Leads and Contacts Already in Salesforce Best Practices for Tracking Data Privacy

Consent Management Objects

Get familiar with the objects you can use for managing your customers’ privacy and consent. EDITIONS After you learn about these objects and fields, you can track and store certain data privacy preferences. But keep in mind that you must decide how to honor your customers’ privacy, and Available in: both Salesforce then implement a process to accomplish that. Classic (not available in all orgs) and Lightning Note: Consent management object records aren’t counted toward your storage usage. Experience

Table 1: Consent Management Objects Available in: all editions. The Individual object is available Object What It Tracks for partner and customer Authorization Form The version number and effective dates of the community users. authorization form.

Authorization Form Consent Information related to the customer’s consent to the authorization form.

Authorization Form Data Use The data use purpose associated with the authorization form.

Authorization Form Text The text and language of the authorization form.

Communication Subscription The customer's preferences for a communication subscription.

Communication Subscription Channel Type The engagement channel through which to contact a customer for a communication subscription.

Communication Subscription Consent Information related to the customer’s consent to the communication subscription.

Communication Subscription Timing The customer's timing preferences for receiving a communication subscription.

Contact Point Consent Information related to the customer’s consent to be contacted via a specific contact point.

Contact Point Email The customer’s preference for the time they prefer to be contacted via email.

180 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

Object What It Tracks

Contact Point Phone The customer’s preference for the time they prefer to be contacted via phone.

Contact Point Type Consent Customer allows contact via a specific contact point type like email, but not through phone calls and mail.

Data Use Purpose The reason for collecting customer data.

Data Use Legal Basis The legal basis for contacting an individual or party, such as legitimate interest.

Engagement Channel Type The channel to use to reach a customer, such as email or web.

Individual The customers’ preferences for: • Collecting, storing, and sharing their personal data • Packaging their personal data so they can take ownership of it • Deleting records and personal data related to them • Solicitation of products and services • Tracking their geolocation and web activity

Party Consent Information related to an individual's consent.

Authorization Form Objects Keep track of data related to authorization forms, such as terms of service, privacy policy, and other consent forms. Each authorization form object stores different data. You can use them together to create a full picture of your customer’s consent to the authorization form. Communication Subscription Objects You can store and manage the data related to your customer’s communication subscriptions, such as newsletters or appointment reminders. Different communication subscription objects store different data, such as how the customer consented to the communication subscription and preferred contact timing. Fields in Data Privacy Records Get the skinny on the fields that appear in data privacy records based on the Individual object. Data privacy records store certain privacy settings for your customers. Fields in Contact Point Consent Records Represents a customer's consent to be contacted via a specific contact point, such as an email address or phone number. Fields in Contact Point Email and Contact Point Phone Records Contact point email and contact point phone records let you enter in details about the time a customer prefers to be contacted. Fields in Contact Point Type Consent Records Contact point type consent records let you enter details about how a customer has agreed to be contacted by your company. For example, you can indicate that a customer consented to a specific contact point like email, but not phone calls and mail. Fields in Data Use Purpose Records Represents a category that defines the reason for contacting an individual. For example, billing, marketing, or surveys.

181 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

Fields in Data Use Legal Basis Records Represents the legal basis for contacting an individual. For example, billing or contract. Fields in Party Consent Records Represents consent preferences for an individual.

Authorization Form Objects

Keep track of data related to authorization forms, such as terms of service, privacy policy, and other EDITIONS consent forms. Each authorization form object stores different data. You can use them together to create a full picture of your customer’s consent to the authorization form. Available in: both Salesforce Classic (not available in all Authorization Form orgs) and Lightning Experience Stores the name, version, and effective dates of the authorization form. You can use the revision number to determine if you’re using the current version. You can also link to a default authorization Available in: all editions form text record to use if text isn’t available for a specific language.

Authorization Form Text Manages the text associated with the authorization form. You can create multiple text versions for the same authorization form to support different languages, regions, and situations. You can also include a summary to describe the form’s purpose and display to customers when asking for their consent.

Authorization Form Consent Tracks information related to each customer’s consent to the authorization form. Indicates the individual that consented and when, how, and to which version of the authorization form.

Authorization Form Data Use Optionally, you can connect an authorization form to one or more data use purpose records. Indicate the data use purpose associated with the form, such as billing or marketing, and its corresponding legal basis.

Communication Subscription Objects

You can store and manage the data related to your customer’s communication subscriptions, such EDITIONS as newsletters or appointment reminders. Different communication subscription objects store different data, such as how the customer consented to the communication subscription and Available in: both Salesforce preferred contact timing. Classic (not available in all orgs) and Lightning Communication Subscription Experience Store a customer’s subscription preferences for a specific communication. Available in: all editions.

Communication Subscription Channel Type Specify the engagement channel that you can use to contact the customer for a communication subscription.

182 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

Communication Subscription Consent Track information related to each customer’s consent to the communication subscription. Indicate the individual or person account that consented, when consent was captured, and through what method. You can also specify if another person consented on behalf of the customer listed in the record.

Communication Subscription Timing Manage the customer’s time preferences for receiving a communication subscription. For example, track whether to send a reminder to a patient two weeks before an appointment or a newsletter to a customer every Tuesday. You can also ensure that you reach customers when they prefer and in the correct time zone.

Engagement Channel Type Store the channels by which you can communicate with a customer, such as email, phone, or web.

Fields in Data Privacy Records

Get the skinny on the fields that appear in data privacy records based on the Individual object. Data EDITIONS privacy records store certain privacy settings for your customers. Available in: both Salesforce Field Description Classic (not available in all Block Geolocation Tracking Preference to not track geolocation on mobile orgs) and Lightning devices. Experience Available in: all editions, Don’t Process Preference to not process personal data, which including partner and can include collecting, storing, and sharing customer community users. personal data.

Don’t Profile Preference to not process data for predicting personal attributes, such as interests, behavior, and location.

Don’t Solicit Preference to not solicit products and services.

Don’t Track Preference to not track customer web activity and whether the customer opens email sent through Salesforce.

Export Individual’s Data Preference to export personal data for delivery to the individual.

Forget This Individual Preference to delete records and personal data related to this individual.

Individual’s Age Indication for whether the individual is considered to be a minor.

OK to Store PII Data Elsewhere Indication that you can store personally identifiable information outside of their legislation area. For example, you could store an EU citizen’s personal data in the US.

183 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

Fields in Contact Point Consent Records

Represents a customer's consent to be contacted via a specific contact point, such as an email EDITIONS address or phone number. Available in: both Salesforce Field Description Classic (not available in all Capture Contact Point Type orgs) and Lightning The contact point used to capture consent. Experience • Email Available in: all editions. • Mailing Address • Phone • Social • Web

Capture Source The way you captured consent. For example, a website or online form.

Contact Point The contact point record, such as for phone or email, that you want to associate this consent with.

Data Use Purpose The data use purpose record that you want to associate this consent with.

Effective From The date when consent starts.

Effective To The date when consent ends.

Party The record based on the individual object you want to associate consent with.

Privacy Consent Status Whether the customer associated with this record agrees to this form of contact. • Not Seen • Seen • Opt In • Opt Out

Fields in Contact Point Email and Contact Point Phone Records

Contact point email and contact point phone records let you enter in details about the time a EDITIONS customer prefers to be contacted. Available in: both Salesforce Field Description Classic (not available in all Best Time to Contact End Time The end time for when the customer prefers to orgs) and Lightning be contacted. Experience Available in: all editions Best Time to Contact Start Time The start time for when the customer prefers to be contacted.

184 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

Field Description Best Time to Contact Timezone The timezone for when it’s best to reach out to the customer.

Fields in Contact Point Type Consent Records

Contact point type consent records let you enter details about how a customer has agreed to be EDITIONS contacted by your company. For example, you can indicate that a customer consented to a specific contact point like email, but not phone calls and mail. Available in: both Salesforce Classic (not available in all Field Description orgs) and Lightning Experience Capture Contact Point Type The contact point used to capture consent. Available in: all editions • Email • Mailing Address • Phone • Social • Web

Capture Source The way you captured consent. For example, a website or online form.

Contact Point Type The contact method you want to apply consent to. • Email • Mailing Address • Phone • Social • Web

Double Consent Capture Date Date when double opt-in was captured.

Data Use Purpose The data use purpose record that you want to associate this consent with.

Name The name of the contact point type consent record.

Party The record based on the Individual object you want to associate consent with.

Privacy Consent Status Whether the individual associated with this record agrees to this form of contact. • Not Seen • Seen • Opt In • Opt Out

185 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

Fields in Data Use Purpose Records

Represents a category that defines the reason for contacting an individual. For example, billing, EDITIONS marketing, or surveys. Available in: both Salesforce Field Description Classic (not available in all Can Data Subject Opt Out Indication of whether an individual can decline orgs) and Lightning contact for the described purpose. Experience Available in: all editions Legal Basis The legal basis record associated with this purpose.

Name The reason for contacting an individual. For example, “billing” or “marketing.”

Fields in Data Use Legal Basis Records

Represents the legal basis for contacting an individual. For example, billing or contract. EDITIONS

Field Description Available in: both Salesforce Name The name for the legal basis. For example, Classic (not available in all “billing” or “contract.” orgs) and Lightning Experience Source The source of the legal basis. For example, the Available in: all editions URL of a contract.

Fields in Party Consent Records

Represents consent preferences for an individual. EDITIONS

Field Description Available in: both Salesforce Action The action that the individual is consenting to, Classic (not available in all such as collecting data. orgs) and Lightning Experience Capture Contact Point Type The contact point used to capture consent. Available in: all editions. • Email • Mailing Address • Phone • Social • Web

Capture Source The way you captured consent. For example, a website or online form.

Party The record based on the individual object you want to associate consent with.

186 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

Field Description Privacy Consent Status Whether the individual associated with this record agrees to this form of contact. • Not Seen • Seen • Opt In • Opt Out

Tracking Customer Requests for Data Privacy Updates

If you store certain data privacy preferences in data privacy records based on the Individual object, EDITIONS track customers’ requests so that you can honor their wishes. To track customers’ requests for updates to their data privacy preferences, run an Apex trigger or Available in: both Salesforce query records in the SOAP API. Classic (not available in all orgs) and Lightning Apex Triggers Experience From Setup, enter Individual in the Quick Find box, and then select Triggers. To create a new trigger, select New. Available in: all editions, including partner and To monitor changes to a specific field, customize the trigger. customer community users. Example:

trigger IndividualUpdated on Individual (after update) { for(String individualId : Trigger.newMap.keySet()) { if( Trigger.oldMap.get(individualId).ShouldForget != Trigger.newMap.get(individualId).ShouldForget ) { // Do something when ShouldForget ("Forget this Individual") changes } } }

To track customers’ requests, either query for triggers in the API, or create reports on flagged items using custom report types. Reports Use data privacy reports to understand the information stored in data privacy records. Standard Report: Field History - If your organization tracks field history on data privacy records based on the Individual object, you can report on that information using the individual history report. SOAP API Query records for changes to data privacy flags using the SOAP API. For more details, see SOAP API: Individual

SEE ALSO: Best Practices for Tracking Data Privacy Define Apex Triggers

187 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

Best Practices for Tracking Data Privacy

Keep these best practices in mind when storing certain data privacy preferences in data privacy EDITIONS records based on the Individual object. Encrypting Personal Data Available in: both Salesforce The Name field in data privacy records is personal data. Salesforce Shield customers can use Classic (not available in all Shield to encrypt this field. If you’ve added custom fields that contain personal data, consider orgs) and Lightning encrypting them. Experience Helping Your Users Decode Individual Available in: all editions, After you add the Individual field to your page layouts, consider renaming the field to something including partner and meaningful for your users. (Example: Manage data privacy or Track customer consent) customer community users. Keeping Renamed Contacts, Leads, and Person Accounts Consistent with Data Privacy Record Names Renaming a contact, lead, or person account doesn’t update any corresponding privacy data. To keep the name of data privacy records up to date, write an Apex trigger. Converting Leads to Existing Contacts When you convert a lead, you can decide which data privacy record you maintain between the converted lead and the contact.

To Maintain the Data You Need To Privacy Record From the Contact Sit back and do nothing.

Lead Edit the contact’s IndividualId to replace the ID with the one from the converted lead. If your contact doesn’t include the ID before the conversion, the conversion process populates the field from the converted lead.

Creating Community Users from Contacts with Associated Data Privacy Records To create a new community member from a contact record, first disable Don’t Process and Forget this Individual in the associated data privacy record.

SEE ALSO: Lead Conversion Field Mapping

Track Certain Data Privacy Preferences for Leads and Contacts Already in Salesforce

Create data privacy records based on the Individual object for leads and contacts already in Salesforce EDITIONS using scripts. These scripts create unique data privacy records for each lead and contact. Keep in mind, if you Available in: both Salesforce already have any data privacy records for your leads and contacts, this script creates duplicate Classic (not available in all records. orgs) and Lightning Experience

Available in: all editions, including partner and customer community users.

188 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

Create Data Privacy Records for Contacts Create data privacy records and link them to contacts already in Salesforce when you run this script.

global class CreateIndividualFromContact implements Database.Batchable { global Database.Querylocator start(Database.BatchableContext BC) { //Query to fetch contacts that don't have Individual created. You may modify the query to add custom fields //Please add "IsPersonAccount = false" condition to below query to exclude person accounts return Database.getQueryLocator('Select FirstName, LastName, Salutation from Contact where IndividualId = NULL'); }

global void execute(Database.BatchableContext BC, List contactList) { Map individualRecordsToCreate = new Map(); for(Contact con : contactList) { individualRecordsToCreate.put(con.Id, new Individual(FirstName = con.FirstName, LastName = con.LastName, Salutation=con.Salutation)); } insert individualRecordsToCreate.values(); for(Contact con : contactList) { con.IndividualId = individualRecordsToCreate.get(con.Id).Id; } update contactList; }

global void finish(Database.BatchableContext BC) {}

}

Create Data Privacy Records for Leads Create data privacy records and link them to leads already in Salesforce when you run this script.

global class CreateIndividualFromLead implements Database.Batchable {

global Database.Querylocator start(Database.BatchableContext BC) { //Query to fetch non-converted Leads that don't have Individual created. You may modify the query to add custom fields return Database.getQueryLocator('Select FirstName, LastName, Salutation from Lead where IsConverted = false and IndividualId = NULL'); }

global void execute(Database.BatchableContext BC, List leadList) { Map individualRecordsToCreate = new Map(); for(Lead l : leadList) { individualRecordsToCreate.put(l.Id, new Individual(FirstName = l.FirstName, LastName = l.LastName, Salutation=l.Salutation)); } insert individualRecordsToCreate.values(); for(Lead l : leadList) { l.IndividualId = individualRecordsToCreate.get(l.Id).Id; } update leadList;

189 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

}

global void finish(Database.BatchableContext BC) {} }

Manage Duplicate Data Privacy Records

Keep your records clean and free of duplicates so that you can reach more customers and maintain EDITIONS better relationships with them. You can work with duplicate data privacy records individually or in bulk. You can’t merge duplicate Available in: both Salesforce data privacy records automatically. Classic (not available in all orgs) and Lightning You can create a custom matching rule for the Individual object to identify duplicate data privacy Experience records and a custom duplicate rule to handle the duplicates. The Individual object doesn’t include standard matching and duplicate rules, so you must create Available in: all editions, including partner and your own custom matching and duplicate rules to manage your data privacy duplicates. customer community users.

Merge Duplicate Data Privacy Records in Lightning Experience Merge duplicate data privacy records based on the Individual object in Lightning Experience.

SEE ALSO: Manage Duplicates One at a Time Manage Duplicates Globally Duplicate Detection and Handling Process Customize Duplicate Management

Merge Duplicate Data Privacy Records in Lightning Experience

Merge duplicate data privacy records based on the Individual object in Lightning Experience. EDITIONS 1. Choose a data privacy record based on the Individual object. A message tells you if duplicates exist for that record. To see them, click View Duplicates. Available in: Lightning Experience

Available in: all editions, including partner and customer community users.

USER PERMISSIONS

To merge data privacy records based on the Individual object: • Delete on individuals

190 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

2. Choose up to three data privacy records to merge. Click Next.

3. Choose one data privacy record as the master, and choose the field values that you want to keep. Click Next.

191 Extend Salesforce with Clicks, Not Code Store Customers’ Data Privacy Preferences

4. Confirm your choices and merge.

192 Extend Salesforce with Clicks, Not Code Classify Sensitive Data to Support Data Management Policies

Classify Sensitive Data to Support Data Management Policies

Record data sensitivity and compliance categorization at the field level. Data classification can be EDITIONS used to guide decisions around access, reporting, and data compliance. Available in: Salesforce Set Up Data Classification Metadata Classic and Lightning Customize your data classification settings to meet your organization’s needs. You can also Experience upload or download data classification values. Available in: All editions Data Classification Metadata Fields Record the data owner, field usage, data sensitivity, and compliance categorization for any USER PERMISSIONS standard or custom object field. You can also access data classification metadata in the Salesforce API and Apex. To edit or view data classification fields: Create Reports from Data Classification Metadata • Customize Application Run reports to help meet your data management policies. or Modify Data Classification

Set Up Data Classification Metadata

Customize your data classification settings to meet your organization’s needs. You can also upload EDITIONS or download data classification values.

Note: Data classification is automatically enabled in all orgs. Available in: Salesforce Classic and Lightning 1. Select whether to use default data sensitivity levels. Experience a. From Setup, enter Data Classification Settings in the Quick Find box and Available in: All editions select Data Classification Settings. b. Select or deselect Use default data sensitivity level. This setting applies a default value USER PERMISSIONS for the Data Sensitivity field for all contacts, leads, person accounts, and users. To edit or view data 2. Edit data classification values. classification fields: a. From Setup, select Object Manager, then select the object you want to edit. • Customize Application or Modify Data b. Select Fields & Relationships from the sidebar. Select the field where you want to set up Classification data classification and click Edit. c. Select the value for each metadata field from the dropdown lists. d. Click Save.

Note: To edit data classification values for fields that aren’t available in the Object Manager, use the CustomField Metadata API or Data Classification Upload tool.

3. (Optional) Edit Data Sensitivity picklist values. a. From Setup, enter Data Classification Settings in the Quick Find box and select Data Classification Settings. b. Select Edit Data Sensitivity Picklist Values c. Add, delete, rename, or reorder an existing picklist value. You can also add a Description or indicate that fields with this picklist value contain data highly sensitive to your company by selecting High-risk level.

193 Extend Salesforce with Clicks, Not Code Classify Sensitive Data to Support Data Management Policies

4. (Optional) Edit Compliance Categorization picklist values. a. From Setup, enter Data Classification Settings in the Quick Find box and select Data Classification Settings. b. Select Edit Compliance Categorization Picklist Values c. Add, delete, rename, or reorder an existing picklist value.

5. (Optional) Upload data classification information in a CSV file. a. From Setup, enter Data Classification Upload in the Quick Find box and select Data Classification Upload. b. Click Choose File. A CSV file can contain a maximum of 10,000 rows. Each row must include the object name, field name, and data sensitivity level.

6. (Optional) Download data classification information in a CSV file. a. From Setup, enter Data Classification Download in the Quick Find box and select Data Classification Download. b. Click Download. The maximum size of the CSV file is 5 MB. Only fields that have an associated data sensitivity value are included in the file. The file includes the first 2,000 records for each data sensitivity value.

You can update multiple fields at once using the CustomField Metadata API.

Data Classification Metadata Fields

Record the data owner, field usage, data sensitivity, and compliance categorization for any standard EDITIONS or custom object field. You can also access data classification metadata in the Salesforce API and Apex. Available in: Salesforce You can use the data classification metadata fields on all standard and custom objects. Classic and Lightning Experience

Field Description Available in: All editions Compliance Categorization The compliance acts, definitions, or regulations that are related to the field’s data. Default values: USER PERMISSIONS • CCPA—California Consumer Privacy Act To edit or view data • COPPA—Children's Online Privacy classification fields: Protection Act • Customize Application • GDPR—General Data Protection Regulation or Modify Data Classification • HIPAA—Health Insurance Portability and Accountability Act • PCI—Payment Card Industry • PersonalInfo—Personal information. For use with the Enhanced Personal Information Management feature. Only available if Enhanced Personal Information Management and Digital Experiences are enabled. • PII—Personally Identifiable Information

194 Extend Salesforce with Clicks, Not Code Classify Sensitive Data to Support Data Management Policies

Field Description

The field corresponds to the ComplianceGroup field on the FieldDefinition Tooling API.

Data Owner The person or group associated with this field. The data owner understands the importance of the field’s data to your company and might be responsible for determining the minimum data sensitivity level. The field corresponds to the BusinessOwnerId field on the FieldDefinition Tooling API.

Data Sensitivity Level The sensitivity of the data contained in this field. Default values: • Public—Available to the public to view but not alter. • Internal—Available to company employees and contractors. This data must not be shared publicly, but it can be shared with customers, partners, and others under a non-disclosure agreement (NDA). • Confidential—Available to an approved group of employees and contractors. This data isn’t restricted by law, regulation, or a company master service agreement (MSA). It can be shared with customers, partners, and others under an NDA. • Restricted—Available only to an approved group of employees and contractors. This data is likely restricted by law, regulation, an NDA, or a company MSA. • MissionCritical—Available only to a small group of approved employees and contractors. Third parties who are given access could be subject to heightened contractual requirements. This data is almost always restricted by law, regulation, an NDA, or a company MSA. The field corresponds to the SecurityClassification field on the FieldDefinition Tooling API and the FieldSecurityClassification SOAP API.

Field Usage Tracks whether the field is in use. Default values: • Active—In use and visible. • DeprecateCandidate—Planned for deprecation and no longer in use. • Hidden—Not visible and possibly planned for deprecation. Use with caution.

Note: Changing the value of Field Usage doesn’t hide or expose the field. The field corresponds to the BusinessStatus field on the FieldDefinition Tooling API.

195 Extend Salesforce with Clicks, Not Code Design Your Own Data Model

You can customize the values for the Compliance Categorization, Data Sensitivity Level, and Field Usage fields. • To edit the Compliance Categorization values, select Edit Compliance Categorization Picklist Values on the Data Classification Settings Setup page or update the ComplianceGroup picklist using the StandardValueSet Metadata API type. • To edit the Data Sensitivity Level values, select Edit Data Sensitivity Picklist Values on the Data Classification Settings Setup page or update the SecurityClassification picklist using the StandardValueSet Metadata API type. • To edit the Field Usage values, update the FieldBusinessStatus picklist using the StandardValueSet Metadata API type.

Note: You can also access data classification metadata by querying your Salesforce data. For example, this sample query retrieves values for all data classification metadata fields in account and lead records.

SELECT Id, DeveloperName, Description, BusinessOwnerId, BusinessStatus, SecurityClassification FROM FieldDefinition WHERE EntityDefinitionId in ('Account','Lead')

Create Reports from Data Classification Metadata

Run reports to help meet your data management policies. EDITIONS 1. To expose the metadata fields, create a custom report type. From Setup, enter Report Types in the Quick Find box, then select Report Types. Available in: Salesforce Classic and Lightning 2. Click New Custom Report Type. Experience 3. For Primary Object, select Entity Definition. Available in: All editions 4. Fill in the remaining fields and click Next. 5. Add a child object. Click the box under the primary object and select Field Definitions. USER PERMISSIONS 6. Click Save. To edit or view data 7. Exit Setup and click the Reports tab. Build a report in Lightning Experience or Classic using the classification fields: report type you made. • Customize Application or Modify Data Classification

Design Your Own Data Model

Schema Builder provides a dynamic environment for viewing and modifying all the objects and EDITIONS relationships in your app. This greatly simplifies the task of designing, implementing, and modifying your data model, or schema. Schema Builder is enabled by default. Available in: both Salesforce You can view your existing schema and interactively add new custom objects, custom fields, and Classic and Lightning relationships, simply by dragging and dropping. Schema Builder automatically implements the Experience changes and saves the layout of your schema any time you move an object. This eliminates the Available in: All Editions need to click from page to page to find the details of a relationship or to add a new custom field to an object in your schema. Schema Builder provides details like the field values, required fields, and how objects are related by displaying lookup and master-detail relationships. You can view the fields and relationships for both standard and custom objects.

Schema Builder lets you add the following to your schema:

196 Extend Salesforce with Clicks, Not Code Design Your Own Data Model

• Custom objects • Lookup relationships • Master-detail relationships • All custom fields except: Geolocation

Note: You can’t export your schema from Schema Builder (for example, to use the schema in another org).

How Do I Access Schema Builder? Schema Builder Custom Object Definition

SEE ALSO: How Do I Access Schema Builder? Custom Field Types Change Sets

How Do I Access Schema Builder?

From Setup, enter Schema Builder in the Quick Find box, then select Schema Builder. EDITIONS When working with Schema Builder: • Click an object and move it to any space on the canvas. Schema Builder saves the layout of your Available in: both Salesforce Classic (not available in all schema any time you move an object. orgs) and Lightning • Click Auto-Layout to sort the layout of the objects in your schema. Experience

Important: When you click Auto-Layout, you can’t undo it. Available in: All Editions

• Click View Options to: USER PERMISSIONS – Display Element Names if you prefer system names, or Display Element Labels if you prefer text values. To view objects in Schema – Show/Hide Relationships Builder: • Customize Application – Show/Hide Legend

• The Elements tab lets you drag and drop new custom objects and fields onto the canvas. – To create a custom object, see Creating Objects with Schema Builder. – To create a custom field, see Creating Fields with Schema Builder.

• The Objects tab lets you select objects to display on the canvas. – Click the drop-down list in the sidebar to filter your list of objects: • All Objects • Selected Objects • Standard Objects • Custom Objects • System Objects

197 Extend Salesforce with Clicks, Not Code Design Your Own Data Model

Note: Objects created outside of Schema Builder, such as through an app or the API, don’t automatically display on the canvas. Select the checkbox for the object created outside Schema Builder to display it on the canvas.

– To search for an object, type its name in the Quick Find box. – Hover over an object in your list of objects and click to find it on the canvas.

• Hover over relationship lines to show relationship details such as lookup and master-detail relationships. Click the name of the object to find it on the canvas. You can hide relationships if your schema is taking too long to load. • To view the details of a field in a new window, right-click the element name or label and select View Field in New Window. • To edit properties of a custom field, right-click the element name or label and select Edit Field Properties. • To manage permissions of a custom field, click the element name or label and select Manage Field Permissions. Use the dialog box that appears to manage the field’s visibility and writeability for all standard and custom profiles. By default, the field-level security for custom fields is set to visible and editable for internal profiles—those not cloned from Partner User or Customer Portal Manager. Fields that are not normally editable, such as formulas and roll-up summary fields, are visible and read only. • Click to: – Hide Object on Canvas – View Object detail in a new window – View Page Layouts detail in a new window

• For objects with many fields (Lead or Campaign, for example), click Show More Fields to display all the fields. • To zoom in, click . To zoom out, click .

Note: You can’t save the level of zoom when closing Schema Builder.

• To collapse the sidebar, click . To expand it, click . • The map in the lower right corner shows the overall layout of your objects on the canvas. Click the map to navigate the layout of your objects. To pan across the schema layout while zoomed in, click and hold the canvas while moving the mouse. • To close the Schema Builder and save the layout of your objects, click Close.

Important: If your schema contains many objects and fields, loading can take a long time. Click Hide Relationships to improve Schema Builder performance.

Create Objects with Schema Builder Create Fields with Schema Builder Delete Custom Objects with Schema Builder You can delete the custom objects that you no longer need by using Schema Builder.

198 Extend Salesforce with Clicks, Not Code Design Your Own Data Model

Delete Custom Fields with Schema Builder Conveniently avoid “custom field clutter” by using Schema Builder to delete custom fields that you no longer need.

SEE ALSO: Create Objects with Schema Builder Delete Custom Objects with Schema Builder Create Fields with Schema Builder Delete Custom Fields with Schema Builder Find Object Management Settings

Create Objects with Schema Builder

To create a custom object with Schema Builder: EDITIONS 1. Click the Elements tab. 2. Click Object and drag it onto the canvas. Available in: both Salesforce Classic (not available in all 3. Enter information to define your object. For a list of object definitions, see Schema Builder orgs) and Lightning Custom Object Definition on page 201. Experience

4. Click Save. Available in: All Editions

SEE ALSO: USER PERMISSIONS Schema Builder Custom Object Definition To create new custom objects in Schema Builder: • Customize Application

Create Fields with Schema Builder

To create a custom field with Schema Builder: EDITIONS 1. Click the Elements tab. 2. Click a field and drag it onto an object on the canvas. Available in: both Salesforce Classic (not available in all 3. Enter a Field Label. orgs) and Lightning Salesforce populates Field Name using the field label. This name can contain only Experience underscores and alphanumeric characters, and must be unique in your org. It must begin with Available in: All Editions a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. USER PERMISSIONS Ensure that the custom field name and label are unique for that object. • If a standard and custom field have identical names or labels, the merge field displays the To create new fields in custom field value. Schema Builder: • Customize Application • If two custom fields have identical names or labels, the merge fieldcan display an unexpected value. If you create a field label called Email and a standard field labeled Email exists, the merge field is unable to distinguish between the fields. Adding a character to the custom field name makes it unique. For example, Email2.

199 Extend Salesforce with Clicks, Not Code Design Your Own Data Model

4. Enter a Description of the custom field. 5. Enter Help Text to detail the purpose and function of a custom field. 6. Enter a Default Value to automatically insert a value of a custom field when a new record is created. 7. Depending on the custom field type you choose, enter any remaining field attributes. 8. Click Save. Any field you add through Schema Builder isn’t automatically added to the page layout. You will need to edit the page layout to specify where the field should be displayed.

Delete Custom Objects with Schema Builder

You can delete the custom objects that you no longer need by using Schema Builder. EDITIONS Schema Builder displays a list of side effects when you try to delete a custom object. Be sure you’re ready to accept these side effects before finalizing the deletion. See Delete Custom Objects on page Available in: both Salesforce 155 and Manage Deleted Custom Objects on page 156. Classic (not available in all orgs) and Lightning 1. Click on the custom object’s icon. Experience 2. Select Delete Object.... A dialog box displays that explains the side effects of deleting an object. Available in: All Editions Read this information carefully. 3. If you accept the conditions, check Yes, I want to delete the custom object. USER PERMISSIONS 4. Click Delete. To delete custom objects in Schema Builder: • Customize Application

Delete Custom Fields with Schema Builder

Conveniently avoid “custom field clutter” by using Schema Builder to delete custom fields that you EDITIONS no longer need. Schema Builder displays a list of side effects when you try to delete a custom field. Be sure you’re Available in: both Salesforce ready to accept these side effects before finalizing the deletion. Classic (not available in all orgs) and Lightning 1. Right-click on the custom field. Experience 2. Select Delete Field.... A dialog box displays that explains the side effects of deleting a custom field. Read this information carefully. Available in: All Editions 3. If you accept the conditions, check Yes, I want to delete the custom field. USER PERMISSIONS 4. Click Delete. To delete custom fields in Schema Builder: • Customize Application

200 Extend Salesforce with Clicks, Not Code Design Your Own Data Model

Schema Builder Custom Object Definition

Field Description EDITIONS

Label A name used to refer to the object in any user Available in: both Salesforce interface pages. Classic (not available in all orgs) and Lightning Plural Label The plural name of the object. If you create a Experience tab for this object, this name is used for the tab. Available in: All Editions Starts with a vowel sound If it’s appropriate for your organization’s default language, check if your label should be preceded by "an" instead of "a".

Object Name A unique name used to refer to the object when using the API. In managed packages, this unique name prevents naming conflicts on package installations. The Object Name field can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.

Description An optional description of the object. A meaningful description helps you remember the differences between your custom objects when you’re viewing them in a list.

Record Name The name used in page layouts, list views, related lists, and search results.

Data Type The type of field (text or auto-number) for the record name. Records that have unique IDs instead of names use auto-numbers. An auto-number is a unique number assigned automatically. It is always a read-only field.

Allow Reports Makes the data in the custom object records available for reporting purposes. To create reports on custom objects, choose the Other Reports report type category, unless the custom object has a relationship with a standard object. When the custom object has a master-detail relationship with a standard object or is a lookup object on a standard object, select the standard object for the report type category instead.

Allow Activities Allows users to associate tasks and scheduled calendar events related to the custom object records.

201 Extend Salesforce with Clicks, Not Code Design Your Own Data Model

Field Description Track Field History Enables your organization to track changes to fields on the custom object records, such as who changed the value of a field, when it was changed, and what the value of the field was before and after the edit. History data is available for reporting, so users can easily create audit trail reports when this feature is enabled.

Enable Divisions If your organization has divisions enabled, select this option to enable the custom object for divisions. Divisions group records for simplified search results, list views, reports, and other areas within Salesforce. Salesforce adds a Division field to the custom object. If the custom object is the master in a master-detail relationship, custom objects on the detail side also get the Division field and inherit their division from the master record.

Available for Customer Portal This option makes the custom object available through the Salesforce Customer Portal.

Namespace Prefix In a packaging context, a namespace prefix is a one to 15-character alphanumeric identifier that distinguishes your package and its contents from packages of other developers on AppExchange. Namespace prefixes are case-insensitive. For example, ABC and abc are not recognized as unique. Your namespace prefix must be globally unique across all Salesforce organizations. It keeps your managed package under your control exclusively.

Deployment Status Indicates whether the custom object is visible to other users.

Add Notes & Attachments... Allows users to attach notes and attachments to custom object records. This allows you to attach external documents to any object record, in much the same way that you can add a PDF or photo as an attachment to an email. This option is only available when you are creating a new object.

202 Extend Salesforce with Clicks, Not Code Create Custom Settings

Create Custom Settings

Use custom settings to create custom sets of data, or to create and associate custom data for an EDITIONS org, profile, or user. Custom settings are similar to custom objects in that they let you customize org data. Unlike custom Available in: Salesforce objects, which have records based on them, custom settings let you utilize custom data sets across Classic and Lightning your org. Custom settings also let you distinguish particular users or profiles based on custom Experience. criteria. Available in: Group, Custom settings data is exposed in the application cache, which enables efficient access without Professional, Developer, the cost of repeated queries to the database. This data can then be used by formula fields, validation Enterprise, Performance, rules, flows, Apex, and SOAP API Unlimited, and Database.com Editions. Note: If you're thinking of using List Custom Settings, consider using Custom Metadata Packages are not available Types instead. Unlike List Custom Settings, you can migrate the records of Custom Metadata in Database.com. Types using Packages or Metadata API tools. The following examples illustrate how you can use custom settings: • A shipping application requires users to fill in the country codes for international deliveries. By USER PERMISSIONS creating a list setting of all country codes, users have quick access to this data without needing to query the database. • An application calculates and tracks compensation for its sales reps, but seniority determines commission percentages. By creating a hierarchy setting, the administrator can associate a different commission percentage for each profile in the sales organization. Within the application, one formula field can then be used to calculate compensation for all users. The personalized setting at the profile level inserts the correct commission percentage. • An application displays a map of account locations, the best route to take, and traffic conditions. This information is useful for sales reps, but account executives only want to see account locations. By creating a hierarchy setting with custom checkbox fields for route and traffic, you can enable this data for just the “Sales Rep” profile. To create and use custom settings: 1. Review the protection and privacy options. 2. Create the custom setting. 3. Add fields and data. 4. Reference the custom setting data in your application using formula fields, validation rules, Apex, or SOAP API.

Protection and Privacy Options for Custom Settings Manage the visibility and permissions of custom settings. Define Custom Settings Create custom sets of data. View and Edit Custom Settings After you create a custom setting, you can view the details of the custom setting, manage the custom setting, and add fields. View Custom Settings Usage and Data View the percentage of custom settings data your org has used. Grant Permissions on Custom Settings By default, access to custom settings is limited through the Restrict access to custom settings org-wide preference. Admins can grant API Read access through profiles and permission sets to users without the Customize Application permission.

203 Extend Salesforce with Clicks, Not Code Create Custom Settings

Grant Read Access to All Custom Settings Admins with the Customize Application permission can grant API read access to all custom settings. Access Custom Settings with Code You can access custom settings from Apex, SOAP API, and formulas. Custom Settings Limits and Considerations When working with custom settings, be aware of the following considerations and limits on the amount of cached data.

Protection and Privacy Options for Custom Settings

Manage the visibility and permissions of custom settings. EDITIONS

Packages Available in: Salesforce Classic and Lightning Only custom settings definitions are included in packages, not data. To include data, populate the Experience. custom settings using a standard Apex or API script run by the subscribing organization after they install the package. Available in: Group, Professional, Developer, When a custom setting is contained in a managed package, and the visibility is set to Protected, Enterprise, Performance, access is allowed only through the Apex code that is part of that managed package. Subscriber Unlimited, and organizations can’t directly access, read, or modify the protected custom settings. Database.com Editions. Note: Protected custom settings in an unmanaged package behave like public custom Packages are not available settings. Make sure that secrets, personally identifying information, or any private data are in Database.com. stored in protected custom metadata types that are installed as part of a managed package. Outside of a managed package, use named credentials or encrypted custom fields to store secrets like OAuth tokens, passwords, and other confidential material.

Visibility You can create protected custom settings in developer and scratch orgs. The options for custom settings are. • Protected—Custom settings in a managed package are visible through Apex and formulas within the same package and namespace. However, they are not visible to subscribing organizations through Apex and API. Custom settings contained in an unmanaged package behave like public custom settings and don’t provide protection. • Public—Regardless of the type of package (managed or unmanaged), the following have access: – Apex – Formulas – Flows – API for users with Customize Application permission or permissions granted through profiles or permission sets.

Schema Settings The schema setting options for custom settings are. • Restrict access to custom settings—This org-wide preference is enabled by default and limits access to custom setting values. Admins with Customize Application permission can grant Read access to users through profiles and permission sets using the Custom Setting Definitions or View All Custom Settings permissions. • Enable SOSL on custom settings—Custom settings values are not returned in Salesforce Object Search language (SOSL) queries. If your Apex operations require this functionality, enable this option.

204 Extend Salesforce with Clicks, Not Code Create Custom Settings

Grant Permissions on Profiles or Permission Sets The Restrict access to custom settings org-wide preference is enabled by default and Read access to custom settings must be explicitly granted. Admins with Customize Application permission can grant Read permission through profiles and permission sets to users without the Customize Application permission. • To grant permission to specific custom settings, use the Custom Setting Definitions permission. • To grant permission to all custom settings, use the View All Custom Settings permission.

Behavior of Apex, Visualforce, and Aura There are different execution code modes within Salesforce that affect the accessibility of custom settings. Apex code that is run in system mode ignores user permissions and your Apex code is given access to all objects and fields. Object permissions, field-level security, and sharing rules aren't applied for the current user. Running in system mode ensures that the code doesn’t fail because of hidden fields or objects for a user. In user mode, functionality such as Visualforce Components, Visualforce Email templates, and Aura, is run with respect to the user's permissions and sharing of records.

Note: Functionality that runs in system mode, such as Apex, is not affected by the Restrict access to custom settings org preference. Also, the with sharing modifier in the Apex class, doesn’t affect query behavior such as, isAccessible() and isCreatable(). If a field value is retrieved in Apex and assigned to a non-sObject variable, the behavior is the same whether the preference is enabled or not. When functionality is run in user mode, such as Visualforce Components, Visualforce Email templates, and Aura, you must have permission to access the custom settings. For example, without permission, the fields on Visualforce pages that you don't have access to aren’t displayed. The $Setup global variable (available in Visualforce and formulas) continues to load values by direct reference (meaning, data that is assigned to an sObject type) regardless of the running user. Consider the following scenario: 1. Apex loads a record that is a row included in a variable such as MySetting__c. 2. What Visualforce displays is MySetting__c.MyPath__c. 3. Access checks are run when the page is loaded. 4. However, the checks are not run in system mode, which is the standard Visualforce behavior. Users without permission to the custom settings can’t display the Visualforce page because Visualforce is reinitiating the access check. In this scenario, if a user isn’t allowed permission to the custom setting, there are two workarounds. You can create a string for each object, which can be passed through, or create a wrapper class. Use these options instead of assigning a variable such as MySetting__c, then rendering mySetting.Path__c mySetting.Name. For example,

class DataHolder{ public string path {get;set;} public boolean active {get;set;} }

When you load the rows into a collection, the Visualforce checks are bypassed because the type is a data type instead of an sObject. Here’s an example that includes the @AuraEnabled annotation for an Aura or Lightning components controller.

class with sharing MyController { @AuraEnabled public static List thisWillNotWork() {

205 Extend Salesforce with Clicks, Not Code Create Custom Settings

return [select developername from my__mdt]; } @AuraEnabled public static List thisWill() { List retVal = new List(); for(My__mdt config: [select developername from my__mdt]) { retVal.add(config.DeveloperName); } return retVal; } }

SEE ALSO: Grant Permissions on Custom Settings Access Custom Settings with Code Grant Permissions on Custom Settings Grant Read Access to All Custom Settings

Define Custom Settings

Create custom sets of data. EDITIONS Note: We strongly suggest using custom metadata types instead of custom settings. Unlike list custom settings, you can migrate the records of custom metadata types using Available in: Salesforce second-generation packages or Metadata API tools. Classic and Lightning Experience. To create a custom setting: Available in: Group, 1. From Setup, enter Custom Settings in the Quick Find box, then select Custom Professional, Developer, Settings. Enterprise, Performance, 2. Click New. Unlimited, and Database.com Editions. Note: A icon indicates that the custom setting is in an installed managed package. Packages are not available You can’t edit or delete a protected custom setting installed from a managed package. in Database.com. 3. Define the following: • Label—Enter the label displayed in the application. USER PERMISSIONS • Object Name—Enter the name to be used when the custom setting is referenced by formula fields, validation rules, Apex, or SOAP API. To manage, create, edit, and delete custom settings: Note: Salesforce recommends using ASCII for the Object Name. The name can't • Customize Application exceed 38 ASCII characters. If you use double byte, there are additional limits on the number of characters allowed.

• Setting Type—Select a type of List or Hierarchy. After you save a custom setting, you can’t change this value. – List—Defines application-level data, such as country codes or state abbreviations, and provides a reusable set of static data that can be accessed across your organization. If you use a particular set of data frequently within your application, putting that data in a list custom setting streamlines access to it. Data in list settings does not vary by profile or user, but it is available organization-wide. Examples of list data include two-letter state abbreviations, international dialing prefixes, and

206 Extend Salesforce with Clicks, Not Code Create Custom Settings

catalog numbers for products. Because the data is cached, access is low-cost and efficient—you don't have to use SOQL queries that count against your governor limits. – Hierarchy—Uses a built-in hierarchical logic that lets you personalize settings for specific profiles or users. The hierarchy logic checks the organization, profile, and user settings for the current user and returns the most specific, or lowest, value. In the hierarchy, settings for an organization are overridden by profile settings, which, in turn, are overridden by user settings.

• Visibility—(Available in developer and 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, they behave like public custom settings. – Public—Regardless of the type of package (managed or unmanaged), the following have access: • Apex • Formulas • Flows • API for users with Customize Application permission or permissions granted through profiles or permission sets.

4. Enter an optional description of the custom setting. A meaningful description helps you remember the differences between your custom settings when you view them in a list. 5. Click Save. After you create a custom setting, add fields to the custom setting.

Add Custom Settings Fields After you define custom settings, add fields to them. The custom fields contain the data used by the custom setting. Create Custom Settings Records After you define your custom settings and add fields, you can populate the fields with data. Manage Custom Settings Data After creating custom setting and adding fields, you can add records, then use the values in these records in your Apex code and validation rules.

207 Extend Salesforce with Clicks, Not Code Create Custom Settings

Add Custom Settings Fields

After you define custom settings, add fields to them. The custom fields contain the data used by EDITIONS the custom setting. 1. From Setup, enter Custom Settings in the Quick Find box, then select Custom Available in: Salesforce Settings. Classic and Lightning Experience. 2. Click the custom setting that you want to add fields to. (If you just created the custom setting, the Custom Setting Detail page appears.) Available in: Group, 3. Click New. Professional, Developer, Enterprise, Performance, 4. Select a field type and click Next. Unlimited, and Database.com Editions. Note: Record size is based on the maximum field size of each field type, not the actual storage that’s used in each field. When adding fields to a custom setting definition, use Packages are not available the appropriate type and specify a length that doesn’t exceed what’s needed for your in Database.com. data. This action helps you avoid reaching the cached data limit. For example, if you create a US social security number (SSN) field, select the Text data type and specify a length of 9. If you select a Text Area data type, the field would add 255 characters to the USER PERMISSIONS usage count for each record, regardless of the number of characters entered. To manage, create, edit, and delete custom settings: 5. Enter the details for the field. • Customize Application 6. Confirm the information, and then click Save or Save & New. After you add fields, add data, and for hierarchy custom settings, specify the access level.

SEE ALSO: Create Custom Settings Records

Create Custom Settings Records

After you define your custom settings and add fields, you can populate the fields with data. EDITIONS You can define one or more data sets. For list custom settings, each data set is named and can be accessed by that name using Apex, formula fields, and so on. Available in: Salesforce Classic and Lightning For custom settings that are hierarchies, the access level—user, profile, or organization—determines Experience. how you access the data. The user level is the lowest level, so it is used first, unless otherwise specified in your application. For example, you can specify different contact numbers for your application: Available in: Group, one for the general user, and one that is only displayed for system administrators. Professional, Developer, Enterprise, Performance, To add data to custom setting fields: Unlimited, and 1. From Setup, enter Custom Settings in the Quick Find box, select Custom Settings, Database.com Editions. then click Manage next to a custom setting. Or from the detail page for a custom setting, click Packages are not available Manage. in Database.com. 2. Click New or Edit next to an existing data set. 3. Add or change data. USER PERMISSIONS For custom settings that are lists: a. Specify or change the name for the data set. This name is used by Apex, formula fields, and so on. b. Enter or change data for all fields.

208 Extend Salesforce with Clicks, Not Code Create Custom Settings

c. Click Save. For custom settings that are hierarchies: a. For the default organization level values, enter or change the data for the fields. The default organization location is automatically populated. b. For profile or user level values, select either Profile or User from the Location picklist. Enter the name of the profile or user, or use the lookup dialog search. Then enter or change the data for the fields. c. Click Save.

Note: For a hierarchy custom setting, you can add only one record for a profile or user. Adding two records for the same profile or user results in an error.

SEE ALSO: Manage Custom Settings Data Add Custom Settings Fields

Manage Custom Settings Data

After creating custom setting and adding fields, you can add records, then use the values in these EDITIONS records in your Apex code and validation rules. 1. From Setup, enter Custom Settings in the Quick Find box, then select Custom Available in: Salesforce Settings. Classic and Lightning Experience. 2. Click Manage next to a custom setting, or from the detail page for a custom setting. 3. Provide or change values for the custom setting. Available in: Group, Professional, Developer, • If you are managing a list setting: Enterprise, Performance, – To add data to the fields, click New. Unlimited, and Database.com Editions. – To change the name of the data set or to change the data, click Edit next to the name of an existing set of data. Packages are not available in Database.com. – To delete the data set, click Delete next to the name of an existing set of data.

• If you are managing a hierarchy setting, decide where in the permission hierarchy you want to add default data (organization, profile, or user). USER PERMISSIONS To add default data at the organization level, click New in the Default Organization Level Value section. If data has already been defined for the organization, you can only edit or delete it. To add default data at the profile or user level, click New in the lower section of the page, near the Setup Owner.

After you define data: • To change the default data set at the organization level, click Edit in the Default Organization Level Value section. • To delete the data set (only for hierarchical custom settings), click Delete in the Default Organization Level Value section. • To view the data (only for hierarchical custom settings), click View next to the name of an existing set of data.

SEE ALSO: Custom Settings Limits and Considerations

209 Extend Salesforce with Clicks, Not Code Create Custom Settings

View and Edit Custom Settings

After you create a custom setting, you can view the details of the custom setting, manage the EDITIONS custom setting, and add fields. From Setup, enter Custom Settings in the Quick Find box, then select Custom Settings, Available in: Salesforce then click the name of the custom setting you'd like to view. While viewing a custom setting, you Classic and Lightning can: Experience. • To change a custom setting, click Edit. Available in: Group, • To delete a custom setting, click Delete. Professional, Developer, Enterprise, Performance, Note: A icon indicates that the custom setting is in an installed managed package. Unlimited, and You can’t edit or delete a protected custom setting installed from a managed package. Database.com Editions.

• To add data to a custom setting, click Manage. Packages are not available in Database.com. • To add fields and data to the custom setting, click New.

SEE ALSO: USER PERMISSIONS

Create Custom Settings Records To manage, create, edit, Add Custom Settings Fields and delete custom settings: • Customize Application

View Custom Settings Usage and Data View the percentage of custom settings data your org has used.

View the System Usage Data View the number of custom objects and custom settings in your org, including installed objects from AppExchange. View the Percentage of Custom Settings Data View the percentage of custom settings data used in your organization, out of an allowed limit.

View the System Usage Data

View the number of custom objects and custom settings in your org, including installed objects EDITIONS from AppExchange. 1. From Setup, enter System Overview in the Quick Find box, then select System Available in: Salesforce Overview. Classic and Lightning Experience. 2. In the Schema section, you see the number of custom object and custom settings: • Your Custom Objects and Custom Settings—The number of custom object and custom Available in: Group, settings you created. The edition of Salesforce used determines the limit. Professional, Developer, Enterprise, Performance, • Total Custom Objects and Total Custom Settings—Total number of custom objects and Unlimited, and custom settings in your org, and it includes objects installed from AppExchange managed Database.com Editions. packages. Packages are not available in Database.com.

210 Extend Salesforce with Clicks, Not Code Create Custom Settings

View the Percentage of Custom Settings Data

View the percentage of custom settings data used in your organization, out of an allowed limit. EDITIONS 1. From Setup, enter Custom Settings in the Quick Find box, then select Custom Settings. Available in: Salesforce Classic and Lightning 2. To view the percentage of custom settings data your org has used, click Get Usage. Once the Experience. usage information is returned, the button no longer appears on the page. 3. To manage a custom setting, click Manage next to a previously defined custom setting, and Available in: Group, click View next to the data set you want to view. (only for hierarchical custom settings.) Professional, Developer, Enterprise, Performance, Unlimited, and Database.com Editions. Packages are not available in Database.com.

Grant Permissions on Custom Settings

By default, access to custom settings is limited through the Restrict access to custom EDITIONS settings org-wide preference. Admins can grant API Read access through profiles and permission sets to users without the Customize Application permission. Available in: Salesforce 1. From Setup, enter Schema Settings in the Quick Find box, and make sure that the Classic and Lightning Restrict access to custom settings org permission is enabled. Experience. 2. Enter User Management Settings in the Quick Find box, and enable Enhanced Available in: Group, Profile User Interface. Professional, Developer, This setting provides a uniform and streamlined interface, but isn’t a requirement for granting Enterprise, Performance, Unlimited, and permissions. Database.com Editions. 3. Enter Profiles or Permission Sets in the Quick Find box. Packages are not available 4. Click the name of the profile or permission set that you want to edit. in Database.com. 5. Click Custom Setting Definitions. 6. Click Edit. 7. Add the custom setting to the Enabled Custom Setting Definitions list. 8. Click Save.

211 Extend Salesforce with Clicks, Not Code Create Custom Settings

Grant Read Access to All Custom Settings

Admins with the Customize Application permission can grant API read access to all custom settings. EDITIONS 1. From Setup, enter Schema Settings in the Quick Find box, and make sure that the Restrict access to custom settings org permission is enabled. Available in: Salesforce Classic and Lightning 2. Enter User Management Settings in the Quick Find box, and enable Enhanced Experience. Profile User Interface. This setting provides a uniform and streamlined interface, but isn’t a requirement for granting Available in: Group, permissions. Professional, Developer, Enterprise, Performance, 3. Enter Profiles or Permission Sets in the Quick Find box. Unlimited, and 4. Click the name of the profile or permission set that you want to edit. Database.com Editions. Packages are not available 5. Click System permissions. in Database.com. 6. Check the View All Custom Settings permission. 7. Click Save. USER PERMISSIONS

To grant access to custom settings: • Customize Application

Access Custom Settings with Code

You can access custom settings from Apex, SOAP API, and formulas. EDITIONS Note: Formulas include: flows, workflow rules, approval processes, validation rules, formula fields, and Process Builder processes. Available in: Salesforce Classic and Lightning Here are some sample code segments: Experience. Formula Fields Available in: Group, Formula fields only work for hierarchy custom settings; they can’t be used for list custom settings. Professional, Developer, Enterprise, Performance, Unlimited, and Database.com Editions. Packages are not available in Database.com.

{!$Setup.CustomSettingName__c.CustomFieldName__c}

Apex Apex can access both custom setting types. Samples for List Custom Settings When you add data to a custom setting, name each data set so that you can distinguish them. The following returns a map of custom settings data. The getAll method returns values for all custom fields associated with the list setting.

Map mcs = CustomSettingName__c.getAll();

212 Extend Salesforce with Clicks, Not Code Create Custom Settings

The following example uses the getValues method to return all the field values associated with the specified data set. This method can be used with list and hierarchy custom settings, using different parameters.

CustomSettingName__c mc = CustomSettingName__c.getValues(data_set_name);

Samples for Hierarchy Custom Settings The following example uses the getOrgDefaults method to return the data set values for the organization level:

CustomSettingName__c mc = CustomSettingName__c.getOrgDefaults();

The following example uses the getInstance method to return the data set values for the specified profile. The getInstance method can also be used with a user ID.

CustomSettingName__c mc = CustomSettingName__c.getInstance(Profile_ID);

SOAP API Custom settings that have Privacy defined as Public have the same type of exposure to the API as custom objects. When a custom setting is contained in a managed package, and Privacy for a custom setting is Protected, the settings can only be accessed by the Apex code or formulas that are part of the managed package.

Note: You can also access custom settings data through a Standard Object Query Language (SOQL) query, but this method doesn't use the application cache. It’s similar to querying a custom object.

SEE ALSO: Grant Permissions on Custom Settings

Custom Settings Limits and Considerations When working with custom settings, be aware of the following considerations and limits on the amount of cached data. • Custom settings are a type of custom object. Each custom setting counts against the total number of custom objects available for your organization. • The total amount of cached data allowed for your org is the lesser of these two values: – 10 MB – 1 MB multiplied by the number of full-featured user licenses in your org For example, if your org has three full licenses, you have 3 MB of custom setting storage. If your org has 20 full licenses, you have 10 MB of storage. Each certified managed package gets a separate limit in addition to your org limit. For example, let’s say your org has two certified managed packages installed and your organization has three full licenses. Each certified managed package can have 3 MB of custom setting storage in addition to your org’s 3-MB custom setting storage limit.

• You can add up to 300 fields per custom setting, unless your field limit for custom objects is lower than 300. If your custom objects field limit is lower than 300, your field limit for custom settings is equal to your custom objects field limit. • You can’t share a custom setting object or record. • No owner is assigned when a custom setting is created, so the owner can’t be changed. • Accessing an undeleted custom setting in a formula field results in an error if the user doesn’t have the “Customize Application” permission. To prevent this error, redeploy this custom setting to the organization. Alternatively, delete this custom setting, re-create it with the same name and data, and then delete and re-create all formula fields that use this setting.

213 Extend Salesforce with Clicks, Not Code Customize Fields

• If a cross-object formula references a currency field from a custom setting, this field value isn’t converted to the currency of the record containing the formula. An inaccurate formula result is possible if the custom setting field's currency and the record's currency are different. • You can’t disable specific permissions with a muting permission set. To see how much custom settings data your organization is using, from Setup, enter Custom Settings in the Quick Find box, then select Custom Settings. For each custom setting, this page lists the size of one record, the number of records created, and the total size used for each custom setting. Record size is based on the maximum field size of each field type, not the actual storage that’s used in each field. When adding fields to a custom setting definition, use the appropriate type and specify a length that doesn’t exceed what’s needed for your data. This action helps you avoid reaching the cached data limit. For example, if you create a US social security number (SSN) field, select the Text data type and specify a length of 9. If you select a Text Area data type, the field would add 255 characters to the usage count for each record, regardless of the number of characters entered.

Note: A icon indicates that the custom setting is in an installed managed package. You can’t edit or delete a protected custom setting installed from a managed package.

Customize Fields

Customize standard and custom fields to tailor your org to your own unique requirements. EDITIONS You can: • Modify some aspects of standard fields Available in: both Salesforce Classic and Lightning • Change or add values to standard and custom picklist fields Experience • Define dependency rules between fields Available in: All Editions • Create custom fields to capture additional information Standard Fields and Page • Create formula fields that automatically calculate values based on the contents of other fields Layouts are not available in • Define default values for custom fields Database.com • Define validation rules for your fields • Make a field required USER PERMISSIONS • Set fields to track changes, including the date, time, nature of the change, and who made the change To create or change custom fields: • Create page layouts to control the display of fields • Customize Application • Set field-level security to control access to fields • Create or modify field sets

Customize Standard Fields You can customize several aspects of standard fields, such as the values in picklists, the format for auto-number fields, tracking field history, lookup filters on relationship fields, and field-level help. Modify Standard Auto-Number Fields Custom Fields Create Custom Fields Capture your unique business data by storing it in custom fields. When you create a custom field, you configure where you want it to appear and optionally control security at the field level.

214 Extend Salesforce with Clicks, Not Code Customize Fields

Define Default Field Values Define a default value for a field. Use a formula to generate dynamic values or constants for static values. Validation Rules Examples of Validation Rules Review examples of validation rules for various types of apps that you can use and modify for your own purposes. Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save the record. Require Field Input to Ensure Data Quality Improve the quality of data that users enter in Salesforce by creating universally required fields. About Field Sets Roll-Up Summary Field A roll-up summary field calculates values from related records, such as those in a related list. You can create a roll-up summary field to display a value in a master record based on the values of fields in a detail record. The detail record must be related to the master through a master-detail relationship. For example, you want to display the sum of invoice amounts for all related invoice custom object records in an account’s Invoices related list. You can display this total in a custom account field called Total Invoice Amount. Lookup Filters Improve user productivity and data quality with lookup filters. Lookup filters are administrator settings that restrict the valid values and lookup dialog results for lookup, master-detail, and hierarchical relationship fields. Fields: What’s Different or Not Available in the Salesforce Mobile App Not every Lightning Experience feature is in the Salesforce mobile app. Find out what’s different.

Customize Standard Fields

You can customize several aspects of standard fields, such as the values in picklists, the format for EDITIONS auto-number fields, tracking field history, lookup filters on relationship fields, and field-level help.

Tip: You can’t delete standard fields, but you can remove them from your page layouts. Available in: both Salesforce Classic and Lightning 1. Navigate to the fields page for your object. Experience 2. Click the field label. Available in: All Editions 3. To add custom help text, click Edit. except for Database.com. 4. On the field’s information page, you can—depending on your Edition—set field-level security, view accessibility settings, and configure validation rules. USER PERMISSIONS

You can also do more, depending on the field’s type. For example, if the field is a picklist, you To change standard fields: can add, delete, and reorder its values, and set dependencies. You can’t increase the field length • Customize Application of a standard field. If you need a longer text area, consider creating a custom field.

Beyond the Basics What does that Indexed checkbox mean on a field, and how did it get there?

215 Extend Salesforce with Clicks, Not Code Customize Fields

If a field is indexed, you can use sidebar search or advanced search to find values in the field. Having a field indexed can also speed up other operations on the field, such as reporting. Check out this blog post to find out more: Know Thy Salesforce Field Indexes for Fast Reports, List Views, and SOQL.

SEE ALSO: Custom Fields Add or Edit Picklist Values Rename Object, Tab, and Field Labels Field-Level Help Lookup Filters

Modify Standard Auto-Number Fields

The unique identifiers for solutions, cases, and contracts are standard auto-number fields. Each EDITIONS record is assigned a unique number with a specified format upon creation. You can modify the format and numbering for these auto-number fields. Available in: both Salesforce 1. From the management settings for the object whose field you want to modify, go to the fields Classic (not available in all area. orgs) and Lightning Experience 2. Click Edit next to the name of the field. 3. Enter a Display Format to control such formatting details as the minimum number of Available in: Contact Manager, Group, leading zeros as well as any prefix or suffix for the number. See Custom Field Attributes on page Professional, Enterprise, 233. Performance, Unlimited, Format changes do not affect existing records; they are applied only to new records. and Developer Editions

4. Enter the number to be assigned to the next record that is created after you save your changes. USER PERMISSIONS 5. Click Save.

Warning: Salesforce warns you if the next number you enter is not higher than existing To modify standard auto-number fields: numbers. However, it may be possible to create duplicate numbers if you change the • Customize Application auto-number format multiple times using similar formats each time.

SEE ALSO: Custom Field Types

216 Extend Salesforce with Clicks, Not Code Customize Fields

Custom Fields

You can add custom fields for each of the objects that your Salesforce org uses. EDITIONS The number of custom fields allowed per object varies according to your Salesforce Edition. For the total custom fields that you can create, see Custom Fields Allowed Per Object on page 232. Available in: both Salesforce Classic (not available in all When your org is close to the limit of 800 custom fields and you delete or create fields, field creation orgs) and Lightning can fail. The physical delete process reclaims and cleans fields, making them count temporarily Experience toward the limit. The delete process runs only when the queue is full, so it can take days or weeks to start. In the meantime, the deleted fields are still counted as part of the limit. To request immediate Available in: All Editions deletion of fields, contact Salesforce Support. Don’t add a field dependency between managed custom fields in your org, as it can cause errors. USER PERMISSIONS

To create or change custom SEE ALSO: fields: Create Custom Fields • Customize Application Edit Custom Fields Additional Custom Field Options Custom Field Attributes

217 Extend Salesforce with Clicks, Not Code Customize Fields

Create Custom Fields

Capture your unique business data by storing it in custom fields. When you create a custom field, EDITIONS you configure where you want it to appear and optionally control security at the field level. Watch a Demo: How to Create a Custom Field in Salesforce Available in: both Salesforce Classic (not available in all Want to customize Salesforce so it captures all your business data? This short video walks you orgs) and Lightning through how to create a custom picklist field, from choosing the correct field type to applying field Experience level security. Available in: Contact Watch a Demo: How to Add a Custom Field in Salesforce (Lightning Experience) Manager,Essentials, Group, Want to add and arrange a new field while viewing an individual record for an object? This short Professional, Enterprise, video walks you through creating a picklist field while viewing a contact, and then changing the Performance, Unlimited, page layout for the field. Developer, and Database.com Editions Before you begin, determine the type of field you want to create. Salesforce Connect external Note: When your org is close to the limit of 800 custom fields and you delete or create fields, objects are available in: field creation can fail. The physical delete process reclaims and cleans fields, making them Developer Edition and for count temporarily toward the limit. The delete process runs only when the queue is full, so an extra cost in: Enterprise, it can take days or weeks to start. In the meantime, the deleted fields are still counted as part Performance, and of the limit. To request immediate deletion of fields, contact Salesforce Support. Unlimited Editions 1. From the management settings for the object you want to add a field to, go to Fields. Custom Custom fields aren’t task and event fields are accessible from the object management settings for Activities. available on Activities in Group Edition 2. Click New. Custom settings aren’t Tip: On custom objects, you can also set field dependencies and field history tracking in available in Professional this section. Edition 3. Choose the type of field and click Next. Consider the following. Layouts aren’t available in Database.com • Some data types are available for certain configurations only. For example, the Master-Detail Relationship option is available for custom objects only when the custom object doesn’t already have a master-detail relationship. USER PERMISSIONS • Custom settings and external objects allow only a subset of the available data types. To create or change custom • You can’t add a multi-select picklist, rich text area, or dependent picklist custom field to fields: opportunity splits. • Customize Application • Relationship fields count towards custom field limits. • Additional field types may appear if an AppExchange package using those field types is installed. • The Roll-Up Summary option is available on certain objects only. • Field types correspond to API data types. • If your organization uses Shield Platform Encryption, ensure you understand how to encrypt custom fields using the Shield Platform Encryption offering.

4. For relationship fields, associate an object with the field and click Next. 5. For indirect lookup relationship fields, select a unique, external ID field on the parent object, and then click Next. The parent field values are matched against the values of the child indirect lookup relationship field to determine which records are related to each other. 6. To base a picklist field on a global picklist value set, select the value set to use.

218 Extend Salesforce with Clicks, Not Code Customize Fields

7. Enter a field label. Salesforce populates Field Name using the field label. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. Use the field name for merge fields in custom links, custom s-controls, and when referencing the field from the API.

Tip: Ensure that the custom field name and label are unique for that object. • If a standard and custom field have identical names or labels, the merge field displays the custom field value. • If two custom fields have identical names or labels, the merge fieldcan display an unexpected value. If you create a field label called Email and a standard field labeled Email exists, the merge field is unable to distinguish between the fields. Adding a character to the custom field name makes it unique. For example, Email2.

8. Enter field attributes and select the appropriate checkboxes to specify whether the field must be populated and what happens if the record is deleted. 9. For master-detail relationships on custom objects, optionally select Allow reparenting to allow a child record in the master-detail relationship to be reparented to a different parent record. 10. For relationship fields, optionally create a lookup filter to limit search results for the field. Not available for external objects. 11. Click Next. 12. In Enterprise, Unlimited, Performance, and Developer Editions, specify the field’s access settings for each profile, and click Next.

Access Level Enabled Settings Users can read and edit the field. Visible

Users can read but not edit the field. Visible and Read-Only

Users can’t read or edit the field. None

Note: • When you create a custom field, by default the field isn’t visible or editable for portal profiles, unless the field is universally required.

13. Choose the page layouts that will display the editable field and click Next.

Field Location on Page Layout Normal Last field in the first two-column section.

Long text area End of the first one-column section.

User Bottom of the user detail page.

Universally required Can’t remove it from page layouts or make read only.

14. For relationship fields, optionally create an associated records related list and add it to page layouts for that object. • To edit the related list name on page layouts, click Related List Label and enter the new name.

219 Extend Salesforce with Clicks, Not Code Customize Fields

• To add the related list to customized page layouts, select Append related list to users’ existing personal customizations.

15. Click Save to finish or Save & New to create more custom fields.

Note: Creating fields can require changing a large number of records at once. If your request is queued to process these changes efficiently, you receive an email notification when the process has completed.

Create a Custom Picklist Field Create custom picklist fields to let your users select values from lists that you define. Create a Global Picklist Value Set Use global picklist value sets to share values across objects and custom picklist fields, and to restrict the picklists to only the values that you specify. Make Your Custom Picklist Field Values Global When you create a custom picklist, it’s only available to the current object. To share the values with other objects, promote the picklist to a global value set. The original custom picklist references the global value set for its values, and the global value set is also available to other custom picklists. Custom Field Types Salesforce supports many different field types. Pick the right type, or convert an existing one. What’s the Difference between Standard Fields and Custom Fields? You can add custom fields to standard and custom objects in Salesforce, allowing you to infinitely customize your organization. Although custom fields are similar to the standard fields that come built-in to Salesforce, there are some differences between standard fields and custom fields. Custom Fields Allowed Per Object The number of custom fields allowed per object varies according to your Salesforce Edition. Custom Field Attributes A custom field entry consists of several attributes. Geolocation Custom Field The geolocation custom field allows you to identify locations by their latitude and longitude and to calculate distances between locations. Manage Fields for a Specific Object Edit Custom Fields Delete Fields Manage Deleted Custom Fields Deleted custom fields and their data are stored until your org permanently deletes them or 15 days has elapsed, whichever happens first. Until that time, you can restore the field and its data. Purge Deleted Custom Fields Deleted fields are available for 15 days until they’re hard deleted. During that time, the field continues to count toward your custom field allocation. You can use the Purge button to initiate the hard-delete process and free up custom field allocation for your org. Additional Custom Field Options Editing Rich Text Area Fields in Records Use rich text area fields to improve the appearance of text, including adding images and hyperlinks.

220 Extend Salesforce with Clicks, Not Code Customize Fields

Rich Text Area Field Limitations Keep these limitations in mind when working with rich text area fields. Valid Range for Date Fields Classic Encryption for Custom Fields Restrict other Salesforce users from seeing custom text fields that you want to keep private. Only users with the View Encrypted Data permission can see data in encrypted custom text fields. Time Custom Field Track time, unbound to a date, with this custom field type. The time type is useful for time management, event planning, and project management. Add or Edit Picklist Values Add or edit values in a custom picklist from the fields area of an object. If the picklist uses a global picklist value set, you can change its values only by editing the global value set. Your changes affect all picklists that inherit their values from that global value set. Define Dependent Picklists Rich Text Editor Use the rich text editor to format text in custom fields with the rich text area type. You can also use the rich text editor in many other features, such as Chatter publisher and groups. Change the Custom Field Type

SEE ALSO: External Object Relationships Which Standard Fields Can I Encrypt? Which Custom Fields Can I Encrypt? What’s the Difference Between Classic Encryption and Shield Platform Encryption? Encrypt New Files and Attachments Find Object Management Settings Map Custom Lead Fields for Lead Conversion Specify Lookup Search Filter Fields

Create a Custom Picklist Field

Create custom picklist fields to let your users select values from lists that you define. EDITIONS Watch a Demo: Custom Fields: Picklists Available in: Salesforce You can create these types of picklist fields: Classic and Lightning • Local picklist—Lets users select a single value from a list that you define. This picklist is unique Experience and had its own set of values. Available in: All Editions • Shared picklist—Lets users select a single value from a global picklist value set that you define in Setup. All custom picklist fields that use a global value set inherit its values and can’t have additional values. USER PERMISSIONS

• Multi-select picklist—Allows users to select more than one picklist value from a list that you To create or change custom define. These fields display each value separated by a semicolon. fields: Note: You can’t add a multi-select picklist, rich text area, or dependent picklist custom field • Customize Application to opportunity splits.

221 Extend Salesforce with Clicks, Not Code Customize Fields

1. Go to the fields area of the object you want to create a picklist field for. 2. In the custom fields related list, click New. 3. Select Picklist or Picklist (Multi-Select), and then click Next. 4. Enter a label for the picklist field. 5. To use the values from an existing global picklist, select Use global picklist value set. To use values that you create specifically for this picklist, select Enter values for the picklist, with each value separated by a new line.

Tip: Provide feedback and suggestions for global picklists in the Global, Restricted Custom Picklists group in the Salesforce Trailblazer Community.

6. If you didn’t use a global picklist value set, enter picklist values. Put each value on a separate line. Values can be up to 255 characters long.

7. Optionally, sort the values alphabetically or use the first value in the list as the default value, or both. If you select both options, Salesforce alphabetizes the entries and then sets the first alphabetized value as the default.

Note: Don’t assign default values to fields that are both required and unique, because uniqueness errors can result. See Default Field Values on page 284. You can use a formula to assign a default value dynamically. For example, you can assign a value based on the current user. The following formula sets an Opportunity priority to High for all users in the Fast Response Sales profile. Other users see the default listed in the Values set. IF($Profile.Name = "Fast Response Sales", "High", "") For picklists, a valid formula result is either a constant or the API name of an entry in the Values list. The formula result has higher precedence than the default assigned in the Values list. If the formula doesn’t generate a valid result, the default assigned in the Values list is entered in the field. If a default is not assigned to the Values list, no value is entered in the picklist field.

8. Choose whether to restrict this picklist’s values to an admin-approved list. Selecting Restrict picklist to the values defined in the value set prevents users from loading unapproved values through the API. 9. If you’re creating a multi-select picklist, enter how many values you want displayed at a time on edit pages. The number of values determines the box height. 10. Enter description or help text if desired, and then click Next. 11. Set field-level security for the picklist field, and then click Next. 12. Choose the page layouts on which to include the picklist field. 13. Click Save.

SEE ALSO: Create Custom Fields Add or Edit Picklist Values Create a Global Picklist Value Set Make Your Custom Picklist Field Values Global

222 Extend Salesforce with Clicks, Not Code Customize Fields

Create a Global Picklist Value Set

Use global picklist value sets to share values across objects and custom picklist fields, and to restrict EDITIONS the picklists to only the values that you specify.

Note: Give your feedback and suggestions for global picklists in the Global, Restricted Custom Available in: Salesforce Picklists group in the Salesforce Trailblazer Community. Classic and Lightning Experience A custom picklist is tied to a particular object as a field on the object. Unlike a custom picklist field, a global picklist exists independently as a global picklist value set. Its values are shared with any Available in: All Editions picklist that’s based on it. A global picklist is a restricted picklist by nature. Only a Salesforce admin can add to or modify its USER PERMISSIONS values. Users can’t add unapproved values, even through the API. To create or change custom Note: Global picklist value sets limits: fields: • Customize Application • Global picklist value sets have a combined active and inactive limit of 1,000. • You can have up to 500 picklist global value sets in an org. • There’s no limit on the number of custom picklists that use global picklist value sets. • If you apply a global picklist value set to more than 13 different objects, you can deactivate values from the picklist value set, but you can’t replace any picklist values or delete values from the set.

1. From Setup, enter Picklist in the Quick Find box, then select Picklist Value Sets. 2. Next to Global Value Sets, click New. 3. Enter a label for the global value set. This name appears in Setup, and when users create a picklist based on this global value set. 4. To tell users what these values are for, enter a specific description of the global value set. This text appears on the Picklist Value Sets list page in Setup. 5. Enter the values, one per line. 6. Optionally choose to sort the values alphabetically or to use the first value in the list as the default value, or both. If you select both options, Salesforce alphabetizes the entries and then sets the first alphabetized value as the default.

7. Click Save. Your global value set is ready to be used in custom picklist fields. To arrange values or re-alphabetize them, use Reorder. To create a picklist that uses a global picklist value set, see Create a Custom Picklist Field. To see all the fields where this value set is used, look under Fields Where Used on the global picklist’s detail page. You can’t undo a custom picklist field’s association with a global value set. If you need a picklist field to use a different global value set or different individual values, delete the custom picklist field, and create a new one in its place. As you add new values to an existing global picklist, you can add the new values to all record types that use the picklist. Select Add the new picklist values to all Record Types that use this Global Value Set; otherwise, you have to add the new values to existing records types manually.

SEE ALSO: Manage Inactive Picklist Values Create a Custom Picklist Field Make Your Custom Picklist Field Values Global

223 Extend Salesforce with Clicks, Not Code Customize Fields

Make Your Custom Picklist Field Values Global

When you create a custom picklist, it’s only available to the current object. To share the values with EDITIONS other objects, promote the picklist to a global value set. The original custom picklist references the global value set for its values, and the global value set is also available to other custom picklists. Available in: Salesforce Note: After a picklist is promoted to a global value set, you can’t demote it. You manage the Classic and Lightning values in the global value set or edit the custom picklist field to use different values. Experience 1. Go to the fields area of the object you want to create a picklist field for. Available in: All Editions 2. In the Custom Fields related list, click Edit. USER PERMISSIONS 3. Click Promote to Global Value Set. To create or change custom fields: • Customize Application

4. Enter a label for the global value set. 5. Accept the Field Name or edit it. 6. Optionally, enter a description to identify it when using the values for other custom picklists. 7. Click Promote to Global Value Set, again. You can use the new global value set for other fields and manage the values in Picklist Value Sets. When promoting a custom picklist, be aware of the following. • You can promote fields that have up to 1,000 values (both active and inactive). • You can promote only restricted picklists. To promote an unrestricted picklist, convert it to a restricted picklist. • You cannot promote a field to an existing global value set. • Picklist values translated using Translation workbench have a limit of 40 characters. • For an app to help manage picklist values, see Picklist Field Merge Salesforce Lab App. • You can’t undo a custom picklist field’s association with a global value set. If you need a picklist field to use a different global value set or different individual values, delete the custom picklist field, and create a new one in its place.

SEE ALSO: Create a Custom Picklist Field Create a Global Picklist Value Set

224 Extend Salesforce with Clicks, Not Code Customize Fields

Custom Field Types Salesforce supports many different field types. Pick the right type, or convert an existing one. When you have data that doesn’t match any of the standard fields, your administrator can create a custom field for that data. For example, use a Middle Name field for contacts. The first step in creating a custom field is choosing the type of the field. This table includes a description of each custom field type. Additional field types may appear if an AppExchange package using those field types is installed.

Type Description Auto Number Automatically assigns a unique number to each record. The maximum length of any auto-number field is 30 characters, 20 of which are reserved for prefix or suffix text. Not available for external objects.

Checkbox Allows users to check a box, indicating a true or false attribute of a record. When using a checkbox field for a report or list view filter, use “True” for checked values and “False” for unchecked values. The Data Import Wizard and the weekly export tool use “1” for checked values and “0” for unchecked values.

Currency Allows users to enter a currency amount. The system automatically formats the field as a currency amount. This formatting is useful if you export data to a spreadsheet application. Not available for external objects.

Note: Salesforce uses the round-half-to-even tie-breaking rule for currency fields. For example, 23.5 becomes 24, 22.5 becomes 22, −22.5 becomes −22, and −23.5 becomes −24. Values lose precision after 15 decimal places.

Date Allows users to enter a date or pick a date from a popup calendar. In reports, you can limit the data by specific dates using any custom date field.

Date/Time Allows users to enter a date or pick a date from a popup calendar and enter a time of day. There are visual and behavioral differences for Date/Time fields in Lightning Experience and Salesforce Classic. In Lightning Experience, the date and time fields are separate, and the initial time is set to 12:00 PM when you select a date in the calendar. In Salesforce Classic, the date/time field is a single field. You can set the field to the current date and time by clicking the date and time link next to the field. The time of day includes AM or PM notation. In reports, you can limit the data by specific dates and times using any custom date field.

Email Allows users to enter an email address of up to 80 characters, which is validated to ensure proper format. If this field is specified for contacts or leads, users can choose the address when clicking Send an Email. You can't use custom email addresses for mass emails or list emails.

225 Extend Salesforce with Clicks, Not Code Customize Fields

Type Description Emails sent to a record's custom email address fields aren't logged against that record.

Note: This field can be encrypted using Shield Platform Encryption.

External Lookup Relationship When you create an external lookup relationship field, the standard External ID field on the parent external object is matched against the values of the child’s external lookup relationship field. External object field values come from an external data source.

Formula Allows users to automatically calculate values based on other values or fields such as merge fields. Not available for external objects.

Note: Salesforce uses the round half up tie-breaking rule for numbers in formula fields. For example, 12.345 becomes 12.35 and −12.345 becomes −12.35.

Geolocation Allows users to specify a location by its latitude and longitude. Geolocation is a compound field that counts toward your org’s limits as three custom fields: one for latitude, one for longitude, and one for internal use. Not available for external objects.

Hierarchical Relationship Creates a hierarchical lookup relationship between users. Allows users to use a lookup field to associate one user with another that neither directly nor indirectly refers to itself. For example, you can create a custom hierarchical relationship field to store each user's direct manager.

Indirect Lookup Relationship An indirect lookup relationship links a child external object to a parent standard or custom object. When you create an indirect lookup relationship field on an external object, you specify the parent object field and the child object field to match and associate records in the relationship. Specifically, you select a custom unique, external ID field on the parent object to match against the child’s indirect lookup relationship field. The child lookup field’s value comes from an external data source.

Lookup Relationship Creates a relationship between two records so you can associate them with each other. For example, opportunities have a lookup relationship with cases that lets you associate a particular case with an opportunity. • On a standard or custom object, a lookup relationship creates a field that allows users to click a lookup icon and select another record from a popup window. • On an external object, the lookup relationship field references 18-character Salesforce IDs that are stored in an external data source. Those IDs are matched against the parent object to determine which records are related to each other.

226 Extend Salesforce with Clicks, Not Code Customize Fields

Type Description On the parent record, you can display a related list to show all the records that are linked to it. You can create lookup relationship fields that link to users, standard objects, or custom objects. If a lookup field references a record that has been deleted, Salesforce clears the value of the lookup field by default. Alternatively, you can choose to prevent records from being deleted if they’re in a lookup relationship. Lookup relationship fields are not available in Personal Edition. Lookup relationship fields to campaign members are not available; however, lookup relationship fields from campaign members to standard or custom objects are available.

Master-Detail Relationship Creates a relationship between records where the master record controls certain behaviors of the detail record such as record deletion and security. Not available for standard objects or external objects, although you can create a master-detail relationship field on a custom object that links to a standard object. Master-detail relationships cannot be used with campaign members.

Number Allows users to enter any number. This number is treated as a real number and any leading zeros are removed.

Note: Salesforce uses the round half up tie-breaking rule for number fields. For example, 12.345 becomes 12.35 and −12.345 becomes −12.34. Salesforce rounds numbers referenced in merge fields according to the user’s locale, not the number of decimal spaces specified in the number field configuration. When you use Einstein Prediction Builder to build a prediction, a custom field is created for storing and displaying the prediction scores on records. Or, you can create a predictive custom field manually, enable it as an AI prediction field, and enter its name and label when building a prediction in Einstein Prediction Builder. For example, display how likely a customer is to pay an invoice on time. In Lightning Experience, custom objects can store more decimal places than you define. If you enter 90.678 on a field that accepts 2 decimal places, the number is displayed as 90.68 on the record form. When you inline edit, the field shows the original input, 90.678. Similarly, the value is stored as 90.678 in the database. In Salesforce Classic, the input 90.678 is saved as 90.68.

227 Extend Salesforce with Clicks, Not Code Customize Fields

Type Description Percent Allows users to enter a percentage number as a decimal—for example, 0.10. The system automatically converts the decimal to a percentage—for example, 10%.

Note: Values lose precision after 15 decimal places. Also, if you enter a value with more than 15 decimal places and add a percent sign to the number, a runtime error occurs.

Phone Allows users to enter any phone number. Character limit is 40. Salesforce automatically formats it as a phone number. If you are using Salesforce CRM Call Center, custom phone fields are displayed with the button, allowing click-to-dial functionality. Therefore, Salesforce recommends that you do not use a custom phone field for fax numbers.

Note: This field can be encrypted using Shield Platform Encryption.

Picklist Lets users select a single value from a list that you define. Available for external objects only with the cross-org adapter for Salesforce Connect.

Picklist (Multi-select) Allows users to select more than one picklist value from a list that you define. These fields display each value separated by a semicolon. Available for external objects only with the cross-org adapter for Salesforce Connect.

Roll-Up Summary Automatically displays the record count of related records or calculates the sum, minimum, or maximum value of related records. The records must be directly related to the selected record and on the detail side of a custom master-detail relationship with the object that contains the roll-up summary field. For example, a custom field called “Total Number of Guests” displays the number of guest custom object records in the Guests related list. Not available for external objects.

Text Allows users to enter any combination of letters, numbers, or symbols. You can set a maximum length, up to 255 characters.

Note: This field can be encrypted using Shield Platform Encryption.

Text (Encrypted) Allows users to enter any combination of letters, numbers, or symbols that are stored in encrypted form. You can set a maximum length of up to 175 characters. Encrypted fields are encrypted with 128-bit master keys and use the Advanced Encryption Standard (AES) algorithm. You can archive, delete, and import your master encryption key. To enable master encryption key management, contact Salesforce. Not available for external objects.

228 Extend Salesforce with Clicks, Not Code Customize Fields

Type Description

Note: This field can be encrypted using Classic Encryption. If your org uses Shield Platform Encryption, use Text to create an encrypted text field.

Text Area Allows users to enter up to 255 characters that display on separate lines similar to a Description field.

Text Area (Long) Allows users to enter up to 131,072 characters that display on separate lines similar to a Description field. You can set the length of this field type to a lower limit, if desired. Any length from 256 to 131,072 characters is allowed. The default is 32,768 characters. Every time you press Enter within a long text area field, a line break, and a return character are added to the text. These two characters count toward the 131,072 character limit. This data type is not available for activities or products on opportunities. The first 999 characters in a standard rich text area or a long text area are displayed in a report. For custom fields, only the first 255 characters are displayed. If you download the report as Details Only, the entire field is available.

Note: This field can be encrypted using Shield Platform Encryption.

Text Area (Rich) With the use of a toolbar, users can format the field content and add images and hyperlinks. The toolbar allows the user to undo, redo, bold, italicize, underline, strike-out, add a hyperlink, upload or link to an image, modify alignment, add a numbered or non-numbered list, indent, and outdent. The maximum field size is 131,072 characters, inclusive of all the formatting and HTML tags. The first 999 characters in a standard rich text area or a long text area are displayed in a report. For custom fields, only the first 255 characters are displayed. If you download the report as Details Only, the entire field is available. The maximum size for uploaded images is 1 MB. Only gif, jpeg, and png file types are supported. Not available for external objects. There are visual and formatting differences for rich text areas in Lightning Experience and the Salesforce mobile app, compared to Salesforce Classic.

Time Allows users to enter a time of day, including hours, minutes, second, and milliseconds. Append a “Z” at the end to denote Greenwich Mean Time (GMT).17:30:45.125, 17:30:45, 17:30, and 17:30:45Z are all examples of valid entries. The time displays in a 12-hour notation with AM or PM. The displayed time depends on the Locale setting on the Company Information page in Setup.

URL Allows users to enter up to 255 characters of any valid website address. Only the first 50 characters are displayed on the record detail pages. When a user clicks the field in Salesforce Classic, the URL opens in a separate browser window. In Lightning Experience,

229 Extend Salesforce with Clicks, Not Code Customize Fields

Type Description internal URLs open in the same window and external URLs open in a separate browser window. In Salesforce console apps, the URL opens in a new workspace tab. In Lightning console apps, internal URLs open in a new workspace tab and external URLs open in a separate browser window.

Warning: When opening an external URL, a message asks for the user’s permission. To prevent the modal from displaying every time you open an external URL, disable your browser’s popup blocker.

Note: This field can be encrypted using Shield Platform Encryption.

Set an AI Prediction Field When you use Einstein Prediction Builder to build a prediction, a custom field is created for storing and displaying the prediction scores on records. Or, you can create a predictive custom field manually, and enter its name and label when building a prediction in Einstein Prediction Builder.

SEE ALSO: Custom Field Attributes Set an AI Prediction Field Einstein Prediction Builder

Set an AI Prediction Field When you use Einstein Prediction Builder to build a prediction, a custom field is created for storing and displaying the prediction scores on records. Or, you can create a predictive custom field manually, and enter its name and label when building a prediction in Einstein Prediction Builder. The recommended way to create a custom field for storing prediction scores is through the setup flow in Einstein Prediction Builder, which creates the field for you. If you choose to create the custom field manually instead, choose the Number type. As you name the field, select the AI Prediction checkbox. After the field is enabled, use Einstein Prediction Builder to build a prediction, entering the custom field's exact name and label when setting up the location for storing your prediction scores. Custom formula fields can also reference AI prediction fields. For example, create a number field to predict the payment for a service named LikelyCost__c. Select the AI Prediction checkbox. Then, create a formula field called InitialOffer__c with a formula of LikelyCost__c * 1.5. In this case, LikelyCost__c is a numeric AI Prediction field and InitialOffer__c is just a custom formula field. Once the field is used in a prediction, the resulting value is powered by Einstein Prediction Builder. Whether Einstein Prediction Builder creates the field for you, or you do it on your own, these fields have some limitations. These limitations apply to both AI prediction fields and custom formula fields that reference AI prediction fields: • An AI prediction field can be used for only one prediction. Once it’s being used for a prediction, whether created automatically or manually, you can’t use it for another prediction. • The field value changes only when new predictions are made about the corresponding object. Value changes in this field do not trigger Process Builder, Apex triggers, or workflows. • The Roll-Up Summary field type does not support AI prediction fields.

230 Extend Salesforce with Clicks, Not Code Customize Fields

• Fields enabled as AI prediction fields included in packages are not uploaded, so they can’t be distributed in packages. • We don’t recommend using a custom number field that Einstein Prediction Builder manages in a validation rule. If the prediction changes the field value in a way that violates the validation rule, you can’t save changes to a record that uses the field. These limitations are specific to AI prediction number fields: • The number of decimal places and the character length of the number field must match the settings in Einstein Prediction Builder. Einstein Prediction Builder handles these settings for you when it creates the field. If you create the field, ensure that the number and length match the prediction in Einstein Prediction Builder.

Note: If the field being predicted is a Boolean field type, the number of decimal places defaults to 0 and the character length defaults to 3.

• To create and grant permissions to the field, the Manage Profiles and Permission Sets permission is required. Typically, this permission is set as part of the Customize App permission, but large orgs sometimes keep Manage Profiles and Permission Sets separate. • You can’t disable the field setting. If you have to replace it, delete it and create another field. • You can’t delete a prediction field if Einstein Prediction Builder is still referencing it. • You can’t convert number fields enabled as AI prediction fields to other field types. • The custom field setting, as well as the prediction results (scores) from Einstein Prediction Builder, are available in Salesforce Classic. The Einstein Prediction Builder setup flow is available only in Lightning Experience.

Note: When you let Einstein Prediction Builder create the field for you while building a prediction, it ensures proper scale and precision. If you create the field manually and try to use it when building a prediction, you may get an error message if the custom field is invalid.

Note: When creating the custom predictive field manually, be sure to give field-level security permissions to the Admin role. Otherwise, prediction scores won't be able to be stored in this field.

SEE ALSO: Einstein Prediction Builder Build a Prediction

What’s the Difference between Standard Fields and Custom Fields?

You can add custom fields to standard and custom objects in Salesforce, allowing you to infinitely EDITIONS customize your organization. Although custom fields are similar to the standard fields that come built-in to Salesforce, there are some differences between standard fields and custom fields. Available in: both Salesforce Custom objects and fields let you tailor which data is stored to fit your organization’s needs. Though Classic and Lightning the Lightning Platform database provides several standard objects and accompanying standard Experience fields, you can easily customize how you track and report on your data. Available in: All Editions Custom objects give you the flexibility to store any type of enterprise data that’s relevant to your app, by creating objects. For example, if you’re building a recruiting app, you can create custom objects called Position and Candidate to track information on job openings and candidates, respectively. Categorize and track your data even more granularly by using custom fields. Like standard objects, custom objects have fields that define the data for those object records. You can, for example, add a custom number field Years of Experience to the custom candidate object or a custom text field Description to the custom position object. You can add custom fields to both custom and standard objects. See the following for more information: • Create Custom Fields

231 Extend Salesforce with Clicks, Not Code Customize Fields

• Edit Custom Fields • Manage Fields for a Specific Object • Build a Formula Field • Define Default Field Values • Additional Custom Field Options • Custom Field Attributes • Change the Custom Field Type

Custom Fields Allowed Per Object The number of custom fields allowed per object varies according to your Salesforce Edition.

Personal Contact Group Essentials Professional Enterprise Unlimited Developer Edition Manager Edition Editions Edition Edition and Edition Performance Edition 5 25 100 100 100 500 800 500

There is a 900 maximum hard limit on the total custom fields per object allowed. In addition to the limits listed above, you can install fields from the AppExchange for a total of 900 custom fields. For example, for the Unlimited Edition, you can create 800 custom fields on an object plus install 100 fields from a managed package and 100 of the fields are limited to specific objects. For the Enterprise Edition, you can create 500 custom fields on an object plus install 400 fields from a managed package and 100 of those fields are limited to specific objects. Beyond 800 fields, you are limited to the following objects. • Account • AccountContactRelation • Asset • Campaign • CampaignMember • Case • Contact • ContentVersion • Contract • Custom Object • Individual • KnowledgeArticleVersion • Lead • Opportunity • OpportunityLineItem • Order • OrderItems (Order Product) • Product2 (Products)

232 Extend Salesforce with Clicks, Not Code Customize Fields

• Solution • Users • UserRole (Role)

Custom Field Type Allocations The maximum number of activities, long text area fields, rich text area fields, relationship fields, and roll-up summary fields varies.

Field Type Essentials Personal Contact Group Professional Enterprise Developer Unlimited Edition Edition Manager Edition Edition Edition Edition and Performance Edition Activities No additional allocation 20 100

Long text An object can contain unlimited rich text area and long text area fields, although your edition’s allocation for total area custom fields allowed on an object, regardless of field type, applies. Each object can contain 1,638,400 characters across Rich text area long text area and rich text area fields. When you create a long text area or rich text area field, you set a character limit for the field—the maximum length of the text that can be entered. The default character limit for long text area and rich text area fields is 32,768 (32 KB). The maximum character limit for long text area and rich text area fields is 131,072 (128 KB). The minimum character limit is 256. The maximum size of an image that can be uploaded in a rich text area field is 1 MB.

Relationship No 40 Roll-up additional 25 summary allocation

Note: Geolocation is a compound field that counts toward your org’s limits as three custom fields: one for latitude, one for longitude, and one for internal use.

SEE ALSO: Salesforce Features and Edition Allocations

Custom Field Attributes A custom field entry consists of several attributes.

Field Description # Visible Lines For long text area fields, set the number of lines to be displayed on edit pages. You can display between 2 and 50 lines (the default is 6 lines). If the text does not fit in the specified number of visible lines, scroll bars appear. Long text area fields are fully displayed on detail pages and printable views.

Calculation Options Determines how a roll-up summary field is recalculated after its properties change. Choose Automatic calculation to recalculate a field the next time it’s displayed. Choose Force a mass recalculation of this field as a safety net option to force recalculation of the roll-up summary field values.

233 Extend Salesforce with Clicks, Not Code Customize Fields

Field Description Child Relationship Name The name used in API SOQL relationship queries.

Data Type The data type of a field determines what type of information is in the field. For example, a field with the Number data type contains a positive or negative integer. For more information on data types, see Custom Field Types on page 225.

Decimal Places For currency, geolocation, number, and percent fields, this field represents the number of digits you can enter to the right of a decimal point. The system rounds the decimal numbers you enter, if necessary. For example, if you enter 4.986 in a field with Decimal Places set to 2, the number rounds to 4.99.

Default Value The value to apply when a user creates a record. For checkbox custom fields, choose Checked or Unchecked as the default value to indicate the default when creating records. Don’t assign default values to fields that are both required and unique, because uniqueness errors can result. See Default Field Values on page 284.

Description Text that describes the custom field. This description is for administration purposes only and doesn’t display to users on record detail and edit pages that include the field.

Display Format For auto-number fields, enter a Display Format to control formatting details such as the minimum number of leading zeros and any prefix or suffix for the number. Begin by entering the required minimum {0} as a placeholder for the auto-number without any leading zeros. Add any prefix to your number before this placeholder and insert any suffix text after the placeholder. Insert any date prefixes or suffixes in the form of {YY}, {YYYY}, {MM}, or {DD}, which represent the record creation date in Greenwich Mean Time (GMT). For information on using auto-number formats when entering your Display Format, see Auto-Number Formatting Examples on page 239.

Encrypted If checked, this custom field is encrypted using Shield Platform Encryption.

Note: This page is about Shield Platform Encryption, not Classic Encryption. What's the difference?

External Column Name Available on external objects only. Maps the custom field to an external data source’s table column. For a lookup relationship field, specify the external table column that contains 18-character Salesforce IDs.

External ID For each object that can have custom fields, you can set up to 25 custom auto-number, email, number, or text fields as external IDs. An external ID field contains record identifiers from a system outside of Salesforce. You can use an external ID field to update or upsert records using the API. When using the API or the Data Import Wizard for custom objects and solutions, you can use this field to prevent duplicates by also marking the field as Unique.

234 Extend Salesforce with Clicks, Not Code Customize Fields

Field Description

Note: Custom fields marked as Unique count against an object's limit of 25 External ID fields. Custom indexing that occurs automatically in the background by Salesforce does not count against External ID limits. Not available for external objects. Each external object has an External ID standard field. Its values uniquely identify each external object record in your org.

Filter Criteria The criteria used to select a group of records to calculate the value of a roll-up summary field.

Filtering Disabled For custom fields on external objects, determines whether the field is available in filters.

Formulas Enter the formula for the custom formula field or custom summary formula for reports.

Help Text The text that displays in the field-level help hover text for this field.

Is Name Field For external object fields of type text, specifies this custom field as the name field for the external object. Not available for text area fields. By default, the External ID standard field is the name field for the external object. If you select this checkbox, make sure that the External Column Name specifies a table column that contains name values. Each external object can have only one name field. For internal use only, Salesforce stores the value of the name field from each row that’s retrieved from the external system. This behavior doesn’t apply to external objects that are associated with high-data-volume external data sources.

Label The name of the custom field as you want it to appear.

Latitude and Longitude Display Notation For geolocation fields, determines how the latitude and longitude notation appears in the Salesforce interface. Degrees, Minutes, Seconds A notation for angular measurement that is based on the number 60: there are 360 degrees to a circle, 60 minutes to a degree, and 60 seconds to a minute. Decimal Expresses the value as degrees, and converts the minutes and seconds to a decimal fraction of the degree. Decimal notation doesn’t use cardinal points. North and East are positive values; South and West are negative values. For example, the coordinates for San Francisco can be expressed as follows:

Latitude Longitude Degrees, 37° 46' 30" N 122° 25' 5" W Minutes, Seconds

Decimals 37.794016° –122.395016°

235 Extend Salesforce with Clicks, Not Code Customize Fields

Field Description Regardless of the notation you choose to display in the interface, latitude and longitude are stored in Salesforce as decimals.

Length (for text fields) For text fields, the maximum number of characters that a user can enter in a field (up to 255 characters).

Length (for number, currency, percent fields) For number, currency, and percent fields, the number of digits you can enter to the left of the decimal point, for example, 123.98 for an entry of 3.

Note: Changing the number of digits (either manually or through workflow rules) can result in truncated values in Salesforce Classic and no value changes in Lightning Experience. The following example shows this behavior. 1. Create a percentage field with a length of 16 and 2 decimal places. 2. Create a record that includes the field with set the value to 1235689.22. 3. Change the percent field digits to a length of 3. In Lightning Experience, the record shows the percentage as 1,235,689.22% and in Salesforce Classic, the percentage is shown as 689.22%.

Mask Character For encrypted text fields, determines the character to use for hidden characters. Available options are * and X.

Mask Type For text fields encrypted with Classic Encryption, determines which characters are hidden and the use of in the field. Masked characters are hidden using the character selected in Mask Character. Available options are: Mask All Characters All characters in the field are hidden. Last Four Characters Clear All characters are hidden but the last four display. Credit Card Number The first 12 characters are hidden and the last four display. Salesforce automatically inserts a dash after every fourth character. National Insurance Number All characters are hidden. Salesforce automatically inserts spaces after each pair of characters if the field contains nine characters. Use this option for UK NINO fields. Social Security Number The first five characters are hidden and the last four display. Salesforce automatically inserts a dash after the third and fifth characters. Social Insurance Number All characters are hidden but the last three display. Salesforce automatically inserts a dash after the third and sixth characters.

Master Object The object on the master side of a master-detail relationship used to display the value of a roll-up summary field.

236 Extend Salesforce with Clicks, Not Code Customize Fields

Field Description Related List Label For relationship fields, the title for the related list that displays associated records on the parent record.

Related To For relationship fields, the name of the associated object.

Required Makes the field required everywhere in Salesforce. Not available for external objects. You must specify a default value for required campaign member custom fields. Don’t assign default values to fields that are both required and unique, because uniqueness errors can result. See Require Field Input to Ensure Data Quality on page 328.

Roll-Up Type For roll-up summary fields, choose the type of calculation to make:

Type Description COUNT Totals the number of related records.

SUM Totals the values in the field you select in the Field to Aggregate option. Only number, currency, and percent fields are available.

MIN Displays the lowest value of the field you select in the Field to Aggregate option for all directly related records. Only number, currency, percent, date, and date/time fields are available.

MAX Displays the highest value of the field you select in the Field to Aggregate option for all directly related records. Only number, currency, percent, date, and date/time fields are available.

Starting Number For auto-number fields, enter a Starting Number that’s less than 1 billion. Select Generate Auto Number for existing records to automatically number all current records that begin with the starting number that you enter. If deselected, the next record that you enter is assigned the starting number and your older records are blank in this field. For leads, only unconverted leads are assigned a number. When you create records, Starting Number’s value increments to store the number that will be assigned to the next auto-number field created. You can’t edit Starting Number after creating an auto-number field. To edit a Starting Number value, change your auto-number field to a text field and then back to an auto-number field. To restart Starting Number values for fields on objects from a managed package, uninstall and then reinstall the package.

Warning: Be sure that you don’t create records with duplicate auto-number values. An auto-number field can contain up to 10 digits and up to 20 extra characters for your prefix or suffix.

237 Extend Salesforce with Clicks, Not Code Customize Fields

Field Description

Note: • You can’t retrieve the starting number of an auto-number field through Metadata API. To specify a Starting Number while deploying, add a startingNumber tag for your field to your package.xml file. For example: 42 • If you deploy without specifying a Starting Number value in your package.xml file, the default starting number for standard fields is 0. The default starting number for custom fields is 1.

Sharing Setting For master-detail relationship fields, the Sharing Setting attribute determines the sharing access that users must have to a master record to create, edit, or delete its associated detail records.

Sorting Disabled For custom fields on external objects, determines whether the field is sortable.

Summarized Object The object on the detail side of a master-detail relationship used to provide the values calculated in a roll-up summary field.

Unique If checked, prevents duplicate field values. For text fields, you can control whether values that are identical except for their case are considered unique. Select Treat "ABC" and "abc" as duplicate values to enforce case-insensitive uniqueness, or select Treat "ABC" and "abc" as different values to enforce case-sensitive uniqueness.

Note: Some characters have both single-byte and double-byte versions. For example, all the following characters have single-byte and double-byte versions: “!@#$%^&*(){}[]\|:";',.<>?/~`”. For the purpose of unique field value comparison, the single-byte and double-byte versions of these characters are considered identical. Superscript characters are not treated as unique characters. Text such as ABC² and ABC2 are considered identical.

Note: Custom fields marked as Unique count against an object's limit of 25 External ID fields. Custom indexing that occurs automatically in the background by Salesforce does not count against External ID limits.

Values For picklist fields, a list of available values (up to 255 characters for each value). For picklists, optionally choose to alphabetize the picklist entries. You can also set the first value as the default selection. If you select both options, Salesforce alphabetizes the entries and then sets the first alphabetized value as the default. For multi-select picklists, enter a list of values, select the sorting options that apply, and then enter how many values you want displayed at a time on edit pages. The number of values determines the box height.

238 Extend Salesforce with Clicks, Not Code Customize Fields

Auto-Number Formatting Examples Use these examples when setting the display format for auto-number fields.

Format Displayed Values {0} 3 66 103

{000} 003 066 103

Sample- {00000} Sample- 00003 Sample- 00666 Sample- 10023

Value- {00} {MM} {DD} {YY} Value- 03 12 02 04 Value- 76 03 03 04 Value- 123 11 09 04

PO #{0} {MM}-{DD}-{YY} PO #12233 12-20-04 PO #25 06-07-04 PO #3 07-07-04

SEE ALSO: Create Custom Fields Create a Many-to-Many Relationship Object Reference for Salesforce and Lightning Platform

Geolocation Custom Field

The geolocation custom field allows you to identify locations by their latitude and longitude and EDITIONS to calculate distances between locations. You can calculate the distance between two geolocation fields, such as between a warehouse and Available in: both Salesforce a store. Or you can calculate the distance between a geolocation field and a pair of latitude and Classic and Lightning longitude coordinates, such as between a warehouse and 37.794016°, -122.395016°—the location Experience also known as San Francisco. Latitude values must be within -90 and 90. Longitude values must Available in: All Editions be within -180 and 180. Geolocation is a compound field that counts toward your org’s limits as three custom fields: one for latitude, one for longitude, and one for internal use. Support for the compound field (geolocation) versus the field’s components (latitude and longitude) varies depending on the functionality you’re using in Salesforce. For example, you can create list views that show the field and its components, but you can’t select the compound geolocation field in Apex. You can run SOQL queries only on a geolocation field’s components. Compound fields, including geolocation fields, have the following limitations. • Compound fields are read-only. To update field values, modify the individual field components. • Compound fields are accessible only through the SOAP API, REST API, and Apex. The compound versions of fields aren’t accessible anywhere in the Salesforce user interface. • Although compound fields can be queried with the Location and Address Apex classes, they’re editable only as components of the actual field. Read and set geolocation field components by appending “__latitude__s” or “__longitude__s” to the field name, instead of the usual “__c.” For example:

Double theLatitude = myObject__c.aLocation__latitude__s; myObject__c.aLocation__longitude__s = theLongitude;

You can’t access or set the compound value. • You can’t use compound fields in Visualforce—for example, in an . To access or update field values, use the individual field components.

239 Extend Salesforce with Clicks, Not Code Customize Fields

• If you select compound fields for export in the Data Loader, they cause error messages. To export values, use individual field components. • Custom geolocation and location fields on standard addresses aren’t supported with email templates. • You can’t use compound fields in lookup filters, except to filter distances that are within or not within given ranges. You can use distance lookup filters only in the Metadata API. • The only formula functions that you can use with compound fields are ISBLANK, ISCHANGED, and ISNULL. You can’t use BLANKVALUE, CASE, NULLVALUE, PRIORVALUE, or the equality and comparison operators with compound fields. The equality and comparison operators include = and == (equal), <> and != (not equal), < (less than), > (greater than), <= (less than or equal), >= (greater than or equal), && (AND), and || (OR). Other limitations of geolocation fields include: • Geolocation fields aren’t supported in custom settings. • Geolocation fields aren’t available in dashboards or Schema Builder. • Geolocation fields are available in Visual Workflow and in formula-based workflow and approvals, but they can’t be used in filter-based workflow updates and approvals. • DISTANCE formulas are supported in: – Entry criteria for workflow rules and approval processes – Field update actions in workflow rules and approval processes – Custom validation rules – Lookup filters (in the Metadata API only)

• Geolocation fields and latitude and longitude on standard addresses aren’t supported in Salesforce to Salesforce. • In Developer, Professional, Enterprise, Unlimited, and Performance editions, Salesforce can automatically add or update geolocation fields for Account, Contact, Lead, and WorkOrder records. To use this feature, your administrator must enable the geo data integration rule for each object. For all other objects and editions, set values for latitude and longitude by using SOQL, Workbench, SOAP or REST API, or a geocoding service. You can then use address fields as locatable values. To find geocoding services, search AppExchange. • Geolocation fields are supported in SOQL with the following limitations. – DISTANCE and GEOLOCATION are supported in WHERE and ORDER BY clauses in SOQL, but not in GROUP BY. DISTANCE is supported in SELECT clauses. – DISTANCE supports only the logical operators > and <, returning values within (<) or beyond (>) a specified radius. – When using the GEOLOCATION function in SOQL queries, the geolocation field must precede the latitude and longitude coordinates. For example, DISTANCE(warehouse_location__c, GEOLOCATION(37.775,-122.418), 'km') works but DISTANCE(GEOLOCATION(37.775,-122.418), warehouse_location__c, 'km') doesn’t work. – Apex bind variables aren’t supported for the units parameter in the DISTANCE function. This query doesn’t work.

String units = 'mi'; List accountList = [SELECT ID, Name, BillingLatitude, BillingLongitude FROM Account WHERE DISTANCE(My_Location_Field__c, GEOLOCATION(10,10), :units) < 10];

240 Extend Salesforce with Clicks, Not Code Customize Fields

For more information and examples, see the SOQL and SOSL Reference.

SEE ALSO: Custom Field Types Custom Field Attributes

Manage Fields for a Specific Object

1. From the object management settings for the object whose fields you want to view, go to EDITIONS Fields. 2. Click the field label. Available in: both Salesforce Classic and Lightning 3. To modify a custom field, add custom help text, or change the data type, click Edit. Experience 4. If a custom field exists in a Managed - Released package, click Delete to delete the custom field component from future installations. Available in: Contact Manager, Group, 5. To set users’ access to the field, click Set Field-Level Security. This option is available depending Professional, Enterprise, on the edition that you have. Performance, Unlimited, 6. To view who can access the field based on permissions and record type, click View Field Developer, and Accessibility. This option is available depending on the edition that you have. Database.com Editions 7. If the custom field is a dependent picklist, click Change next to the controlling field to edit the Standard fields are not dependency rules. available in Database.com Salesforce Connect external 8. To change External ID, Required, or other attributes under the General Options objects are available in: section, see Custom Field Attributes. Developer Edition and for 9. To restore the field and its data, click Undelete. This option is available only if the field has been an extra cost in: Enterprise, deleted but not permanently erased. The field’s behavior may be different after restoring it. To Performance, and restore the field completely, see Manage Deleted Custom Fields. Unlimited Editions

Note: If your organization uses person accounts, the Account Fields page lists both person account and business account fields. Person accounts use a combination of account and contact fields. The following contact fields are available for person accounts, but not for business accounts. • Fields in the Account Standard Fields list that display with a person account icon. • Fields in the Contact Custom Fields & Relationships list.

Find Where a Field Is Used Find out where a custom field is referenced, such as in a formula or Apex class, with a click of the Where is this used? button. You can see where a field is used and where changes to the field appear before you edit it.

SEE ALSO: Create Custom Settings

241 Extend Salesforce with Clicks, Not Code Customize Fields

Find Where a Field Is Used

Find out where a custom field is referenced, such as in a formula or Apex class, with a click of the EDITIONS Where is this used? button. You can see where a field is used and where changes to the field appear before you edit it. Available in: Salesforce On a custom field’s detail page, click Where is this used? to see the field reference details. To view Classic and Lightning the settings for the layout, formula, or other reference, click a reference label. Experience The list can include these references. Available in: Professional, • Active validation rule Enterprise, Performance, and Unlimited Editions • Layout • Formula field USER PERMISSIONS • Visualforce page • Apex class To view references: • View Setup • Apex trigger • Email template (Salesforce Classic, text based) • Field set • Flow (query) • Lightning component markup (attr) • Process Builder (criteria) • URL button (formula) • Lightning page (related list single) • Lookup filter (lookup and master detail) • Report (column, filter)

Note: References to reports on objects where there’s a foreign key relationship don’t appear. For example, if a custom object has a lookup relationship to Account or any standard object, and the custom fields of Account are added to a report of type CustomObject with Account, then the report isn’t listed for the custom fields on Account.

Considerations • Reference labels link to more information only if there‘s a known settings page for the reference. For example, a report name links to the report settings. But a criteria formula created within a flow doesn’t link to the flow settings. • Within a subscriber org, references in a managed package aren’t included in the list of results. For example, a number field is referenced in a formula. If you add the field to a package and then install the package in a subscriber org, the subscriber org’s field reference detail page doesn’t show that this number field is referenced in a formula field. But new references that are created after installing the managed package in the subscriber org do appear. For example, after you install the managed package and you add the number field to another formula in the subscriber org, the new reference appears. • Only the IDs of reports that are accessible to the user initiating the query are returned. For example, if an admin creates a report and saves the report in a private folder, then the report isn’t listed in the reference detail page for a standard user. • Joined reports aren’t supported and aren’t displayed in the reference detail page. • The list of field references is limited to the first 2,000 entries and sorted alphabetically by reference type.

SEE ALSO: Manage Fields for a Specific Object

242 Extend Salesforce with Clicks, Not Code Customize Fields

Edit Custom Fields

1. From the management settings for the field’s object, go to Fields. EDITIONS 2. Click Edit next to the field’s name. 3. Modify the field attributes. The attributes differ depending on the field type. Available in: both Salesforce Classic and Lightning If you’re editing a picklist, you can change its definition and its values. For picklist settings, see Experience Add or Edit Picklist Values on page 260. Available in: All Editions To change the type of this custom field, see Change the Custom Field Type on page 280. Standard Objects are not 4. Optionally, define custom help text for the field. available in Database.com 5. For lookup and master-detail relationship fields, optionally define a lookup filter. 6. For formula fields, click Next to modify the formula. USER PERMISSIONS 7. In Enterprise, Unlimited, Performance, and Developer Editions, click Next to set the field-level To create or change fields: security for the field. • Customize Application Note: • Editing fields can require changing a large number of records at once. To process these changes efficiently, your request can be queued and you receive an email notification when the process has completed. • To customize the way a custom object’s related list appears on a parent record’s detail page, edit the parent record’s page layout. For example, if you want to edit which fields appear on a custom object’s related list on accounts, you would edit the account page layout. • You cannot change the Field Name if a custom field is referenced in Apex. • When editing fields for accounts, opportunities, cases, contacts, or custom objects, check for any criteria-based sharing rules that use the field in the rules. A field change may affect which records are shared.

SEE ALSO: Define Default Field Values Find Object Management Settings

Delete Fields

1. From the management settings for the field’s object, go to Fields. EDITIONS 2. Click Del next to the name of the field. 3. When prompted, select the Yes, I want to delete the custom field Available in: both Salesforce Classic and Lightning checkbox to confirm, and click Delete. Experience Deleted custom fields and their data are stored until your org permanently deletes them or 15 days has elapsed, whichever happens first. Until that time, you can restore the field and its data. Available in: All Editions For information on restoring deleted custom fields and relationships, see Manage Deleted Custom Fields on page 244. USER PERMISSIONS

To delete custom fields: • Customize Application

243 Extend Salesforce with Clicks, Not Code Customize Fields

Note: • Before deleting a custom field, consider where it’s referenced. You can’t delete a custom field that’s referenced elsewhere. For example, you can’t delete a custom field that’s referenced by a field update or Apex. • You can’t delete a field if that field is being updated by a background job, such as an update to a roll-up summary field. Wait until the background job finishes, and try again. • When you delete a custom field, all of the field history data is deleted and changes are no longer tracked. • A background process periodically runs that cleans up metadata associated with deleted custom fields. This process will affect the Last Modified Date and Last Modified By fields on page layouts, record types, and custom objects.

SEE ALSO: Find Object Management Settings

Manage Deleted Custom Fields

Deleted custom fields and their data are stored until your org permanently deletes them or 15 days EDITIONS has elapsed, whichever happens first. Until that time, you can restore the field and its data. The field counts against the maximum number of custom fields allowed in your org until it’s Available in: both Salesforce permanently deleted by the hard-delete process (see Notes on Hard Deleting Custom Fields). A Classic and Lightning deleted field also counts against the applicable limit for its field type. For example, a deleted custom Experience roll-up summary field counts against the maximum number of roll-up summary fields for your Available in: Contact Salesforce edition. If you receive the error message “Unable to access page” or “No clean data Manager, Group, columns available for custom fields” when trying to create or edit custom fields, you must erase Professional, Enterprise, some fields. Performance, Unlimited, Developer, and Notes on Restored Custom Fields Database.com Editions Page Layouts and Lead • When deleted, the following characters are appended to the end of a custom field's developer Fields are not available in name unless a deleted field already has that developer name: “_del”. These characters remain Database.com when you restore the custom field. • Formula fields are restored in a disabled state, which means they do not contain updated data until you edit and save them. While a formula field is disabled, “#Error!” displays in place of the USER PERMISSIONS formula value. To restore deleted custom • Restored fields do not display in search results immediately after you restore them. It can take fields and relationships: a short time before the restored custom field and its data are available in search results. • Customize Application • Lead fields that are mapped to account, contact, or opportunity fields for lead conversion are To permanently delete still mapped accordingly when restored. custom fields or • Auto number fields continue to increment after they are deleted and contain the correct values relationships: when restored. • Customize Application • Field history data for the deleted custom field is restored.

Notes on Hard Deleting Custom Fields • The estimated time for a hard-delete process varies, and depends on the system demand to maintain overall performance. However, you can monitor and view the details of a hard delete of a custom field by going to the Background Jobs page. From Setup, enter Background Jobs in the Quick Find box, then select Background Jobs. A row with the name “Cleanup of custom field

244 Extend Salesforce with Clicks, Not Code Customize Fields

data when a custom field definition is hard deleted” indicates that a hard delete job is in progress. The Background Jobs page also shows the details of background jobs, including a percentage estimate of the progress. • When an org is at or above 75% of its custom field allocation limit for the current object, Salesforce displays a value for the custom fields that are ready for the hard-delete process value. This value increments when you click Erase or when a field is beyond the 15-day grace period, until the field is moved into the hard-delete process by Salesforce. The value changes only while Salesforce is actively hard deleting the field. • Performance and Unlimited Edition orgs can use a Purge button to initiate the hard-delete process immediately.

Manage Deleted Fields in Lightning Experience Restore or permanently delete a custom field in Lightning Experience. Manage Deleted Fields in Salesforce Classic Restore or permanently delete a custom field in Salesforce Classic. Manually Restore Attributes of Deleted Fields Custom fields consist of several attributes that provide additional information about the field. Some of these attributes are not restored automatically after a field is undeleted and must be restored manually.

SEE ALSO: Purge Deleted Custom Fields Find Object Management Settings

Manage Deleted Fields in Lightning Experience

Restore or permanently delete a custom field in Lightning Experience. EDITIONS 1. From the Object Manager page, click the name of the custom object. 2. Click Fields & Relationships. Available in: Lightning Experience 3. To see a list of soft deleted fields, click Deleted Fields at the top of the Custom Fields & Relationships page. Available in: Contact Manager, Group, 4. From the list of deleted fields, perform the following actions: Professional, Enterprise, a. To permanently remove the custom field and its data, click Erase. Performance, Unlimited, Developer, and b. To restore the field and its data, click Undelete. Database.com Editions Note: If you undelete a custom field, manually restore attributes of the deleted field Page Layouts and Lead that were not automatically restored. Fields are not available in Database.com

SEE ALSO: USER PERMISSIONS Manually Restore Attributes of Deleted Fields To restore deleted custom fields and relationships: • Customize Application To permanently delete custom fields or relationships: • Customize Application

245 Extend Salesforce with Clicks, Not Code Customize Fields

Manage Deleted Fields in Salesforce Classic

Restore or permanently delete a custom field in Salesforce Classic. EDITIONS 1. From the management settings for the field’s object, go to Fields. 2. Click Deleted Fields at the bottom of the list of custom fields and relationships. The number Available in: Salesforce Classic in parentheses indicates the total number of deleted custom fields for this object. For Performance and Unlimited Editions, the Deleted Fields link always displays. For other editions, Available in: Contact this link displays only after you’ve deleted a custom field. Manager, Group, 3. Use the list of deleted fields to perform the following actions: Professional, Enterprise, Performance, Unlimited, a. To view details about a field, click the field label. Developer, and b. To permanently remove the custom field and its data, click Erase. Database.com Editions c. To restore the field and its data, click Undelete. Page Layouts and Lead Fields are not available in Note: If you undelete a custom field, manually restore attributes of the deleted field Database.com that were not automatically restored.

USER PERMISSIONS SEE ALSO: To restore deleted custom Manually Restore Attributes of Deleted Fields fields and relationships: • Customize Application To permanently delete custom fields or relationships: • Customize Application

246 Extend Salesforce with Clicks, Not Code Customize Fields

Manually Restore Attributes of Deleted Fields

Custom fields consist of several attributes that provide additional information about the field. Some EDITIONS of these attributes are not restored automatically after a field is undeleted and must be restored manually. Available in: both Salesforce 1. Add the field to any page layouts that changed during the time the custom field was deleted. Classic and Lightning If reports and page layouts were not edited, the restored field remains on them. Experience 2. Make the field unique if necessary. Salesforce automatically removes the unique attribute from Available in: Contact any deleted custom field. Manager, Group, Professional, Enterprise, 3. Make the field required if necessary. Salesforce automatically removes the required attribute Performance, Unlimited, for any deleted custom field. Developer, and 4. Add the custom field to any appropriate Salesforce AppExchange packages. Salesforce Database.com Editions automatically removes deleted custom fields from packages that contain them. Page Layouts and Lead 5. Convert lookup relationships to a master-detail relationship if necessary. Salesforce converts all Fields are not available in relationships to lookup relationships when they are deleted. To convert a lookup relationship Database.com to a master-detail relationship, populate all the applicable records with the appropriate data.

6. Redefine any field dependencies that Salesforce removed when the field was deleted. USER PERMISSIONS 7. Edit and save any formula fields. Saving prompts a syntax check; if necessary, resolve errors. To restore deleted custom 8. Set up field history tracking if necessary. If the list of fields enabled for history tracking was fields and relationships: modified during the deletion process, the restored field is no longer setup to track field history. • Customize Application To permanently delete custom fields or relationships: • Customize Application

Purge Deleted Custom Fields

Deleted fields are available for 15 days until they’re hard deleted. During that time, the field continues EDITIONS to count toward your custom field allocation. You can use the Purge button to initiate the hard-delete process and free up custom field allocation for your org. Available in: Salesforce An object’s Deleted Fields detail page lists the recently deleted fields. These fields are removed Classic from the object but remain in the system until they’re hard deleted. When you’re at or above 75% Available in: Enterprise, of your custom field allocation limit and have fields that are ready to hard delete, Salesforce displays Performance, and the Purge button. Click the button to free up custom fields faster than the automated process. Unlimited Editions After you click Purge, Salesforce asks you to confirm the action. The custom fields that are in the ready for the hard-delete state move to the hard-delete process state. The hard-delete process completely removes the field and the associated system data. If changing the status of the fields takes longer than 30 seconds, Salesforce sends an email with more information to the user who clicked the button.

SEE ALSO: Manage Deleted Custom Fields

Additional Custom Field Options Changing Page Layouts To change the location of a new custom field, edit the page layout for the appropriate tab.

247 Extend Salesforce with Clicks, Not Code Customize Fields

Using Record Types If your organization uses record types, edit the record type to modify which picklist values are visible for the record type. Tracking Custom Field History You can select which custom fields to track on the History related list of custom objects and most standard objects. All entries include the date, time, nature of the change, and who made the change. History data does not count against your organization’s storage limit. Using the Translation Workbench If your organization uses the Translation Workbench, notify your translators that new fields need translations. Activity Custom Fields Activity custom fields can apply only to tasks or only to events, or to both tasks and events. For example, you can create one Time Spent field and then add it to both the event page layout and the task page layout. Mapping Custom Lead Fields For lead custom fields, you can click Map Lead Fields to specify which custom lead fields to map to custom account, contact, and opportunity fields during a lead conversion.

SEE ALSO: Which Standard Fields Can I Encrypt? Which Custom Fields Can I Encrypt?

Editing Rich Text Area Fields in Records

Use rich text area fields to improve the appearance of text, including adding images and hyperlinks. EDITIONS Rich text area fields use the rich text editor to format content. The rich text editors for custom fields in Lightning Experience and the Salesforce mobile app have a few differences compared to rich Available in: the Salesforce text editors in Salesforce Classic. mobile app, Salesforce Classic, and Lightning In Lightning Experience and the Salesforce mobile app, rich text editors for custom fields use the Experience open-source Quill library. In Salesforce Classic, rich text editors for custom fields use CKEditor. In Lightning Experience, Salesforce Knowledge and emails also use the CKEditor. The rich text editors Available in: Essentials, have the following toolbar buttons. Contact Manager, Group, Professional, Enterprise, Rich Text Editor Toolbar In Lightning Experience In Salesforce Classic Performance, Unlimited, Button for Custom Fields and the Salesforce mobile and Developer Editions app Color USER PERMISSIONS

Format Font (Bold, Italic, To create or change custom Underline, ) fields: • Customize Application Format Body (Bulleted List, Numbered List, Indent, and Outdent)

Align Text (Left Align, Center Align, and Right Align)

Insert Link

Insert Image

248 Extend Salesforce with Clicks, Not Code Customize Fields

Rich Text Editor Toolbar Button for In Lightning Experience and the In Salesforce Classic Custom Fields Salesforce mobile app Remove Formatting

Undo and Redo Last Action

Note: We recommend using the toolbar to format your content. The rich text editor provides only a WYSIWYG interface. You can’t edit HTML tags. When you copy content from a web page or another source and paste it into the editor, unsupported tags are removed. Text enclosed in unsupported tags is preserved as plain text. HTML markup counts against the character limit of the field. For more information, see Rich Text Area Field Limitations. Note these differences across rich text editors in Lightning Experience and the Salesforce mobile app compared to Salesforce Classic. In Lightning Experience and the Salesforce mobile app: • Spaces are considered non-empty values. • The default font family is Salesforce Sans, Arial, sans-. • The Insert Link button enables you to enter a URL with the _blank target value by default. This button appears disabled when the record edit page is loaded, and is enabled after you activate the editor with your keyboard or mouse. • The Insert Image button enables you to insert an image by uploading it or by selecting one that has been previously uploaded to your org. • Use keyboard shortcuts to undo and redo content formatting. In Windows, undo your last action by pressing Ctrl+Z, and reverse your last undo by pressing Ctrl+Y. On Mac OS, use Cmd+Z and Cmd+Y. Alternatively, use the Edit menu in your browser to undo or redo your changes. In Salesforce Classic: • Spaces are considered empty values. • The default font family is Arial, Verdana, Trebuchet MS, sans-serif. • Color formatting is preserved when you switch to Salesforce Classic to edit a custom field that’s been formatted in Lightning Experience or the Salesforce mobile app. This occurs even though the Color button isn’t available in Salesforce Classic. • The Insert Link button lets you enter a URL with a selection of protocols and target values. When you switch to Lightning Experience or the Salesforce mobile app and edit the custom field, unsupported protocols or target values aren’t preserved. • The Insert Image button lets you insert an image by uploading it or reference one that’s hosted on another server.

Implementation Tips • Specify the size of the editor box for a rich text field by configuring the Number of lines displayed property in the field’s setup. • When you view or print content, Salesforce preserves the formatted version of the rich text. • Searches of content that contains rich text area fields ignore images and tags. • Deleting a rich text area field moves it to the Deleted Fields section on the custom object or Salesforce Knowledge article types. • You can convert rich text area fields into long text area fields only. Any images get deleted the next time you save the long text area field. After converting, markup is hidden in the long text area field but it isn’t removed from the record, so if you change your mind, you can restore the markup before you save the record. • The text part of a rich text area field counts toward data storage for the object that contains the field.

249 Extend Salesforce with Clicks, Not Code Customize Fields

Pasting Content from External Sources • You can copy and paste text from external sources, such as Microsoft® Word, but sometimes doing so requires reapplying the formatting. • Text from external sources can include HTML tags and special formatting that you can’t see and don’t need. The tags are counted against the character limit of a field. We recommend pasting text into a plain text editor such as Notepad on Windows or TextEdit on macOS first. Copy the text from the plain text editor, paste it into a rich text field, and apply formatting using the rich text field’s buttons. • JavaScript and CSS are treated as text. For example, if you’re creating an Idea through the API, the JavaScript or CSS code is removed without warning. Salesforce supports a limited number of approved HTML tags. • When a rich text area field is used in a formula, the HTML tags are stripped out before the formula is run. • Rich text area fields can be filtered and summarized in reports, but HTML tags and special formatting aren’t included in report results. For example, some text becomes “some text” instead of some text or some text. • You can use a rich text area field in a mail merge, but the HTML tags are included as text in the resulting document. Images aren’t merged.

Images in Rich Text Area Fields • The maximum size of an image that can be uploaded in a rich text area field is 1 MB. You can upload only .gif, .jpg, and .png file types. • To upload many images, use API version 20 or later.

Note: When you upload images via the API, the alt attribute isn’t populated unless you specified it separately.

• Images uploaded into a rich text area field are extracted in your org’s weekly export and included in the exported data. • Images in rich text area fields count toward file storage for the object that contains the field. • You can’t add a hyperlink to an image. • You can’t upload an image to a rich text area using the file:// protocol in the URL field. Instead, use http:, https:, data:, //, /, or a relative URL. • You can’t resize images in Lightning Experience and the Salesforce mobile app. An exception to this is in Lightning Knowledge when using the Chrome browser.

Formatting Support The power of the rich text editor is in its WYSIWYG interface. Type in the editor and use the toolbar to format your content as much as you can. When you paste formatted content from another source, you can expect some formatting differences in Lightning Experience and the Salesforce mobile app. Here are formatting considerations to look out for.

Warning: If you add a custom rich text area field in Salesforce Classic and edit it in Lightning Experience, you can also expect the formatting differences. Saving your changes in Lightning Experience overwrites the original formatting you had in Salesforce Classic and conversely. Alternatively, you can fix some of the formatting using the toolbar or switch to Salesforce Classic to perform your edits. Colors The Color button is available in Lightning Experience only. Color formatting is preserved when you edit the rich text field in Salesforce Classic. The rich text field in Lightning Experience handles color formatting in RGB format, which adds the tag around your text. The rich text field in Salesforce Classic handles color formatting in hexadecimal format, which adds the tag around your text. The RGB and hexadecimal value depends on the color you choose.

250 Extend Salesforce with Clicks, Not Code Customize Fields

Definition lists Formatting for definition lists is preserved, but the styling appears different in Lightning Experience and the Salesforce mobile app. Definition terms are not bold. Pasting text with a predefined font face, color, or size converts the font tag into a span tag with the style attribute. Headings Heading styles are different in Lightning Experience and Salesforce Classic. Headings in Salesforce Classic are bold and become smaller in size as the header level increases in number. Headings in Lightning Experience have the following font size and weight. • h1: 24 px (not bold) • h2: 18 px (bold) • h3: 18 px (not bold) • h4: 14 px (bold) • h5: 14 px (not bold) • h6: 12 px (bold) Inline styles on h1, h2, h3, h4, h5, and h6 tags are not supported and are ignored. Hyperlinks Hyperlinks always open in a new window or tab in Lightning Experience and the Salesforce mobile app using target=”_blank”. In Salesforce Classic, you can use different target values in hyperlinks in the rich text field. If you edit a rich text field with such a link in Lightning Experience or the app, the target value is converted to _blank. Inline styles In Salesforce Classic, inline styles are supported on div, span, p, br, and hr tags. In Lightning Experience and the Salesforce mobile app, inline styles are supported only on span tags. Lists Nested ordered lists in rich text fields are numbered differently in Salesforce Classic than they are in Lightning Experience and the Salesforce mobile app. In Salesforce Classic, nested ordered lists are numbered with this pattern: 1, 1, 1. In Lightning Experience and the Salesforce mobile app, nested ordered lists are numbered with this pattern: 1, a, i. In Lightning Experience and the Salesforce mobile app, you can’t nest a bulleted list within a numbered list. The nested bulleted list is converted to a numbered list when you paste it into the editor. You also can’t nest a numbered list within a bulleted list. The nested numbered list is converted to a bulleted list when you paste it into the editor.

Warning: Nesting lists of different types is supported in Salesforce Classic only. Don’t edit an existing rich text area field containing a nested list of a different type in Lightning Experience and the Salesforce mobile app. If you do, the nested list is converted to the same type as its parent list, even if you don’t edit the list itself. Nested lists of the same type are supported. However, pasting a nested list into the editor flattens the list into one list in Lightning Experience and the Salesforce mobile app. For example, a nested bulleted list within a bulleted list becomes a single bulleted list when pasted. For nested lists of the same type, use the toolbar to adjust your list formatting. You can also press the Tab key or Shift+Tab to create a nested list item or remove a nested list item.

Note: In Lightning Experience and the Salesforce mobile app, pasting lists that are copied from Microsoft® Word is not supported and results in list items getting converted into . Although they look visually like lists, they are pasted as p tags.

251 Extend Salesforce with Clicks, Not Code Customize Fields

Paragraphs and line breaks Pressing the Enter key creates a paragraph in Lightning Experience and the Salesforce mobile app. However, pressing the Enter key in Salesforce Classic adds a
element inside the current paragraph. The visual difference is minor. Markup for blank lines is


in Lightning Experience and the Salesforce mobile app, and
in Salesforce Classic. If you create text in a rich text field in Lightning Experience or the Salesforce mobile app and later edit it in Salesforce Classic, markup for the blank lines is converted to

 

. Subsequent edits in Lightning Experience or the Salesforce mobile app don’t change blank lines back to their original markup. Paragraphs in rich text editors add extra characters to the text when saved in Lightning Experience and the Salesforce mobile app. Each paragraph contributes seven characters to the character count. For example, if your admin specifies a 5000 character limit, you can enter only 4993 characters in the rich text editor of a custom field in Lightning Experience. Breaking the text into multiple paragraphs further reduces the number of characters you can enter. Blank lines contribute no visible characters, but contribute several characters with their markup. Special Characters Rich text field values are returned in HTML format. Some characters are escaped when the custom field value is retrieved through the API. • Ampersand character & is returned as & • Greater than character > is returned as > • Less than character < is returned as < • Quote character " is returned as " • Single quote character ' is returned as ' Tables In Salesforce Classic, Lightning Experience, and the Salesforce mobile app, pasting tables is supported, but you can edit only the content within the tables. Text-level markup • Addresses with address tags cause enclosing list formatting to be removed. • Nested quotes using q tags are not supported. • Strikethrough text uses strike tags. • Teletype text within tt tags is converted to use code tags. This table lists supported HTML tags and formatting considerations in Lightning Experience and the Salesforce mobile app. When you edit a rich text field or paste text with unsupported tags in Lightning Experience and the Salesforce mobile app, those tags are removed. Text that was enclosed in unsupported tags is preserved as plain text.

HTML Tags Supported in Custom Fields in Comments for Lightning Experience and the Salesforce Supported in Lightning Experience and the Mobile App Salesforce Classic Salesforce Mobile App? a The target attribute is always set to _blank. This tag is removed if href has no value.

abbr

acronym This tag is converted into an abbr tag.

address When text with this tag is nested in a list and pasted in the editor, the list tags,ol, li, and ul, are removed. Some tags before the address tag get nested in address.

252 Extend Salesforce with Clicks, Not Code Customize Fields

HTML Tags Supported in Custom Fields in Comments for Lightning Experience and the Salesforce Supported in Lightning Experience and the Mobile App Salesforce Classic Salesforce Mobile App?

b

bdo

big

blockquote Consecutive block quotes are merged.

br Line breaks are nested in p tags.

caption

cite

code

col

colgroup

dd

del

dfn

div

dl

dt Definition terms are not bold.

font Pasting text with a predefined font face, color, or size converts the font tag into a span tag with the style attribute.

h1 Inline styles on headings are not supported.

h2 Inline styles on headings are not supported.

h3 Inline styles on headings are not supported.

h4 Inline styles on headings are not supported.

h5 Inline styles on headings are not supported.

h6 Inline styles on headings are not supported.

hr

i

img

ins

253 Extend Salesforce with Clicks, Not Code Customize Fields

HTML Tags Supported in Custom Fields in Comments for Lightning Experience and the Salesforce Supported in Lightning Experience and the Mobile App Salesforce Classic Salesforce Mobile App?

kbd

li Pasting a nested list of the same type flattens the list into one list, for example, a nested bulleted list within a bulleted list. Use the toolbar to adjust your list formatting.

ol Nesting an ordered list (numbered) in an unordered list (bulleted) converts the ordered list into an unordered list.

p Pressing Enter creates a new p.

pre

q Nested quotes are not supported.

s This tag is converted into a strike tag.

samp

small

span This tag is nested in a p tag, which adds extra padding around the text.

strike

strong

sub Nested sub tags are merged.

sup Nested sup tags are merged.

table

tbody

td

tfoot

th

thead

tr

tt This tag is converted into a code tag.

u

ul Nesting an unordered list (bulleted) in an ordered list (numbered) converts the unordered list into an ordered list.

254 Extend Salesforce with Clicks, Not Code Customize Fields

HTML Tags Supported in Custom Fields in Comments for Lightning Experience and the Salesforce Supported in Lightning Experience and the Mobile App Salesforce Classic Salesforce Mobile App?

var

SEE ALSO: Create Custom Fields Rich Text Fields in Knowledge Articles

Rich Text Area Field Limitations

Keep these limitations in mind when working with rich text area fields. EDITIONS Rich text area fields aren’t available in self-service portals and they aren’t supported for external objects. Also, consider the following limitations. Available in: the Salesforce mobile app, Salesforce Character Limits Classic, and Lightning • Salesforce supports up to 131,072 characters for each rich text area field, including the Experience HTML tags. If desired, you can set a lower limit. Available in: Essentials, • An object can contain unlimited rich text area and long text area fields, although your Contact Manager, Group, edition’s allocation for total custom fields allowed on an object, regardless of field type, Professional, Enterprise, applies. Each object can contain 1,638,400 characters across long text area and rich text Performance, Unlimited, area fields. When you create a long text area or rich text area field, you set a character limit and Developer Editions for the field—the maximum length of the text that can be entered. The default character limit for long text area and rich text area fields is 32,768 (32 KB). The maximum character limit for long text area and rich text area fields is 131,072 (128 KB). The minimum character limit is 256. • You can’t paste special characters, such as bullets or curly quotes, into a rich text field from another application. It’s best to type or paste in plain text and use the rich text editor to format it. • HTML code isn’t supported in the Salesforce HTML editor. HTML code is treated as text. • The character count includes HTML markup that is not visible in the editor. The HTML markup is returned through the API. Depending on how much formatting you apply, the number of characters you can type into the rich text field is fewer than the specified limit. This is because the HTML markup counts against the character limit of a field. For example, bold formatting includes the tag around your text and adds up to 7 more characters. Special characters like & are encoded as & which adds up to 5 more characters. Also, the rich text field in Lightning Experience and Salesforce Classic can vary in HTML markup, such as with using RGB or hexadecimal values when color formatting is applied. Paragraph and line breaks also insert the and
tags, counting against the character limit. See Editing Rich Text Area Fields in Records for information on formatting support. Formatting and Toolbar Differences Between Lightning Experience and Salesforce Classic The rich text editors for custom fields in Lightning Experience and the Salesforce mobile app come with a few differences, as compared to rich text editors in Salesforce Classic. See Editing Rich Text Area Fields in Records. Images and Hyperlinks • You can’t disable specific rich text area features. For example, you can't disable support for hyperlinks or images on certain fields. • You can’t upload an image to a rich text area using the file:// protocol in the URL field. Instead, use http:, https:, data:, //, /, or a relative URL. • When uploading an image to a rich text area, you must enter a URL that is valid and well-formed.

255 Extend Salesforce with Clicks, Not Code Customize Fields

Reports • Only the first 254 characters in a rich text area or a long text area are supported with the “contains” operator in a report filter. • The first 999 characters in a standard rich text area or a long text area are displayed in a report. For custom fields, only the first 255 characters are displayed. If you download the report as Details Only, the entire field is available.

Valid Range for Date Fields Only dates within a certain range are valid. The earliest valid date is 1700-01-01T00:00:00Z GMT, or just after midnight on January 1, 1700. The latest valid date is 4000-12-31T00:00:00Z GMT, or just after midnight on December 31, 4000. These values are offset by your time zone. For example, in the Pacific time zone, the earliest valid date is 1699-12-31T16:00:00, or 4:00 PM on December 31, 1699.

Classic Encryption for Custom Fields

Restrict other Salesforce users from seeing custom text fields that you want to keep private. Only EDITIONS users with the View Encrypted Data permission can see data in encrypted custom text fields. Before you begin working with encrypted custom fields, review these implementation notes, Available in: both Salesforce restrictions, and best practices. Classic and Lightning Experience Implementation Notes Available in: Developer, Enterprise, Performance, • Encrypted fields are encrypted with 128-bit master keys and use the Advanced Encryption Unlimited, and Standard (AES) algorithm. You can archive, delete, and import your master encryption key. To Database.com Editions enable master encryption key management, contact Salesforce. • You can use encrypted fields in email templates but the value is always masked regardless of whether you have the View Encrypted Data permission. • If you have the View Encrypted Data permission and you grant login access to another user, the user can see encrypted fields in plain text. • Only users with the View Encrypted Data permission can clone the value of an encrypted field when cloning that record. • Only the component supports presenting encrypted fields in Visualforce pages.

Restrictions Encrypted text fields: • Can’t be unique, have an external ID, or have default values. • Aren’t available for mapping leads to other objects. • Are limited to 175 characters because of the encryption algorithm. • Aren’t available for use in filters such as list views, reports, roll-up summary fields, and rule filters. • Can’t be used to define report criteria, but they can be included in report results. • Aren’t searchable, but they can be included in search results. • Aren’t available for Connect Offline, Salesforce for Outlook, lead conversion, workflow rule criteria or formulas, formula fields, outbound messages, default values, and Web-to-Lead and Web-to-Case forms.

Best Practices • Encrypted fields are editable regardless of whether the user has the View Encrypted Data permission. Use validation rules, field-level security settings, or page layout settings to prevent users from editing encrypted fields.

256 Extend Salesforce with Clicks, Not Code Customize Fields

• You can still validate the values of encrypted fields using validation rules or Apex. Both work regardless of whether the user has the View Encrypted Data permission. • To view encrypted data unmasked in the debug log, the user must also have the View Encrypted Data in the service that Apex requests originate from. These requests can include Apex Web services, triggers, workflows, inline Visualforce pages (a page embedded in a page layout), and Visualforce email templates. • Existing custom fields can’t be converted into encrypted fields nor can encrypted fields be converted into another data type. To encrypt the values of an existing (unencrypted) field, export the data, create an encrypted custom field to store that data, and import that data into the new encrypted field. • Mask Type isn’t an input mask that ensures the data matches the Mask Type. Use validation rules to ensure that the data entered matches the mask type selected. • Use encrypted custom fields only when government regulations require it because they involve more processing and have search-related limitations.

Note: This page is about Classic Encryption, not Shield Platform Encryption. What's the difference?

SEE ALSO: Create Custom Fields

Time Custom Field Track time, unbound to a date, with this custom field type. The time type is useful for time management, event planning, and project management. You can select the time field type when you create a custom field. The time type is a timestamp without the date included. However, a time field value’s precision is in milliseconds. A date/time field value’s precision is in seconds. Use the time field type when you require a time of day that isn’t specific to a single date. For example, use it to display business hours, or if you want to compare times of the day to calculate a duration.

Time Field Behavior The display and management of time field values observes the following behaviors. • In formulas, get a time value from the TIMEVALUE function. Use TIMENOW, HOUR, MINUTE, SECOND, and MILLISECOND functions with time in formulas. • The time field type is represented in the Metadata API as a FieldType enumeration value. • A time field displays a value based on your Personal Locale setting on the Language & Time Zone page in My Settings. See Supported Date and Time Formats (ICU) in Salesforce Help for each locale’s display Time Format. • The unit for adding or subtracting time values is milliseconds. For example, Timefield1__c has the value “5:00pm”: Timefield1__c + 600000 is “5:10pm” Timefield1__c - 600000 is “4:50pm” Time fields don’t include a date. So, adding 25 hours to a time value is the same as adding one hour. The clock restarts after 24 hours.

• You can subtract one time field from another in a formula. The result is in milliseconds. For example, TimeField1__c has the value “10:00pm” and TimeField2__c has the value “9:00pm”: TimeField1__c - TimeField2__c is 3600000 The result is never a negative number. Subtraction is the difference between two time values, using a 24-hour clock.

257 Extend Salesforce with Clicks, Not Code Customize Fields

For example, when calculating the number of hours a business is open, you use the following formula: (ClosedTime - OpenTime) / 3600000. ClosedTime = 5 PM, OpenTime = 8 AM, ClosedTime - OpenTime = 9 hours ClosedTime = 5 AM, OpenTime = 7 AM, ClosedTime - OpenTime = 22 hours

Time Field Limitations Be aware of the following limitations when using a time field type. The time field: • Isn’t supported in Flow Builder, Process Builder, and Schema Builder. • Doesn't support the creation of custom index for SOQL queries. • Isn’t available for standard lookup relationships in external objects.

Note: In formula expressions, use the international date format (ISO) for text arguments. For example, use TIMEVALUE("11:30:00.000") instead of TIMEVALUE("11:30 AM").

Time Fields in Salesforce Classic In Salesforce Classic, you have several formatting options when setting time values. For example, you can set time values to include seconds, milliseconds, time zone, and use 24-hour notation. Time Fields in Lightning Experience In Salesforce Lightning Experience, you can choose a time from a dropdown list of selectable options.

SEE ALSO: Create Custom Fields Locales Overview Formula Operators and Functions Using Date, Date/Time, and Time Values in Formulas Custom Field Attributes Define Default Field Values

Time Fields in Salesforce Classic In Salesforce Classic, you have several formatting options when setting time values. For example, you can set time values to include seconds, milliseconds, time zone, and use 24-hour notation.

Time Field Format • The time custom field type can use 24-hour notation. You can save a time value in HH:MM, for example, 14:40. • Time fields support the following input formats.

Format Example hh:mm:ss aa 10:30:25 AM

hh:mm:ss.SSS a 10:30:25.125 AM

HH:mm:ss.SSS 14:30:25.125

258 Extend Salesforce with Clicks, Not Code Customize Fields

Format Example

HH:mm:ss.SSSZ 14:30:25.125Z displays as GMT

hh:mm a 10:30 AM

hh:mma 10:30AM

h a 4 PM

ha 4PM

H:mm 1:23 is 1:23 AM

H 14 is 2:00 PM

Hmm 123 is 1:23 AM

HHmm 1434 is 2:34 PM

h= Hour of day (1-12), H = Hour of day (0-23), m= minute, s= seconds, S= milliseconds, a= AM or PM, Z= GMT time zone. • Use the HH:MM:SS.MS format when loading values with Data Loader.

• Use the HH:MM:SS.MS format to set a default value for a field, such as TIMEVALUE("10:30:00.000") for 10:30 AM.

Time Fields in Lightning Experience In Salesforce Lightning Experience, you can choose a time from a dropdown list of selectable options. The following example shows the check-in and check-out times for a hotel in Lightning Experience.

259 Extend Salesforce with Clicks, Not Code Customize Fields

Add or Edit Picklist Values

Add or edit values in a custom picklist from the fields area of an object. If the picklist uses a global EDITIONS picklist value set, you can change its values only by editing the global value set. Your changes affect all picklists that inherit their values from that global value set. Available in: both Salesforce Note: Changes to picklist values are logged in Setup Audit Trail. To view the audit history: Classic and Lightning From Setup, enter View Setup Audit Trail in the Quick Find box, then select Experience View Setup Audit Trail. Available in: All Editions 1. Navigate to the fields area for your object. 2. In the Custom Fields & Relationships related list, click the name of the picklist field to update. USER PERMISSIONS

3. In the Values section, click Edit next to a value. To change picklists: 4. Change the value’s name, and optionally make the value the default for the master picklist. • Customize Application 5. Assign a color to use in charts by clicking the button and selecting how to assign colors to values. • Assign fixed colors to all values assigns a fixed color to each value from the standard set of chart colors. The Chart Colors column shows the assigned colors. For example, if you want Closed Lost values always to be red in charts grouped by Opportunity Stage, assign red to that picklist value. • Assign colors to values dynamically assigns colors when a chart is generated. For example, if you need only certain picklist values to have fixed colors in charts, manually assign colors to those values and leave the rest to be assigned dynamically.

Note: Chart colors aren’t available for multi-select picklists, currency picklists, or Task Subject, Event Subject, Knowledge Validation Status, and Opportunity Competitor picklists.

Tip: • If you use record types, changing the default value of the master picklist doesn’t affect the default value of the picklist for a record type. • For Ideas, setting the default value of the Categories or Status picklists doesn’t affect the default value on the Ideas pages. • If you change the label for a picklist value that’s used as a filter criterion, the picklist value is automatically removed from the filter criteria. For example, if your report contains a filter where Lead Source equals Email or Web and you change the picklist value Web to Referral, your report filter changes to Lead Source equals Email. If the changed picklist value was the only value specified for a particular filter, it continues to show up in your filters, but an error appears.

6. Click Save. 7. To make the picklist required (if it’s not already), click Edit at the top of the detail page, and check Always require a value in this field in order to save a record. 8. To change the picklist from unrestricted to restricted or vice-versa, adjust the Restrict picklist to the values defined in the value set setting. 9. To open an easy-to-print list of your picklist values, click Printable View.

Note: If your org uses the Translation Workbench, notify your translators that the translations can be outdated when you change picklist values.

Picklists with Additional Information Picklist Limitations

260 Extend Salesforce with Clicks, Not Code Customize Fields

Replace Picklist Values As your business needs change, replace picklist values with more relevant alternatives. Replacing a value globally replaces that field value on all existing records. Remove a Picklist Value Remove or replace custom picklist values to update the records that have the picklist field. Protect Picklist API Names for Formulas and Integrations When you create a picklist value, an API Name that matches the Label is assigned. By default, the API Name can be changed at any time, but you can choose to protect the API Name. Sort Picklists Manage Inactive Picklist Values Establish upper bound limits, deactivate, reactivate, or remove a value from a restricted or unrestricted picklist.

SEE ALSO: Manage Inactive Picklist Values Replace Picklist Values Protect Picklist API Names for Formulas and Integrations Picklist Limitations

Picklists with Additional Information These standard picklist fields have additional information that you can edit.

Picklist Description Partner Role (for accounts) Roles of account partners, for example, Consultant, Supplier. These options are available when you add an account to the Partners related list of an account or opportunity. To edit, from Setup, enter Partner Roles in the Quick Find box, then select Partner Roles. Enter the name of the partner role in the “Role” column. In the “Reverse Role” column, enter the corresponding reverse partner role. Assigning a partner role to an account creates a reverse partner relationship so that both accounts list the other as a partner. Each role and reverse role value can have up to 40 characters.

Priority (for cases) Urgency of case, for example, Low, High. If you delete a value, you have the option to map the deleted value to another existing value in all your org’s cases. Each picklist value can have up to 40 characters.

Status (for campaign members) State of a campaign member, for example, Sent or Responded. If you delete a Status value, you have the option to map the deleted value to another existing value. The new replacement value is automatically added to the member status for campaigns that contained the deleted value.

261 Extend Salesforce with Clicks, Not Code Customize Fields

Picklist Description If the deleted value is the default member status for a campaign, the new replacement value becomes the default status for that campaign.

Status (for cases) State of case, for example, New, On Hold. If you delete a value, you have the option to map the deleted value to another existing value in all your org’s cases. Each picklist value can have up to 40 characters.

Status (for contracts) State of the contract in the contract business process. You can add values to this picklist and organize each value into one of several categories, for example, “Draft”, “In Approval Process”, or “Activated”. Then sort your contracts using these categories in reports and views.

Contact Role (for contracts) Role of a contact on a contract, for example, Business User, Decision Maker. These options are available when you add a contact to the Contact Roles related list of a contract. To edit, from Setup, enter Contact Roles in the Quick Find box, then select Contact Roles on Contracts. Each picklist value can have up to 40 characters.

Lead Status (for leads) State of the lead, for example, Open, Qualified. Select one value as the “Default Status” assigned to all new leads created manually, via imports, or via your website. Select one or more values as the “Converted Status” assigned to converted leads. When you convert qualified leads into an account, contact, and opportunity, you can select one of the “Converted” statuses to assign to the lead. Leads with a “Converted” status type are no longer available in the Leads tab, although you can include them in reports. If you delete a value, you have the option to map the deleted value to another existing value in all your org’s leads. Each value can have up to 20 characters.

Contact Role (for opportunities) Role of a contact for an opportunity, for example, Business User, Decision Maker. These options are available when you add a contact to the Contact Roles related list of an opportunity. To edit, from Setup, enter Contact Roles in the Quick Find box, then select Contact Roles on Opportunities. Each picklist value can have up to 40 characters.

Stage (for opportunities) Sales process stages, for example, Prospect, Proposal. This picklist also affects the Type and Forecast Category values of an opportunity. Specifically, changing the Type or Forecast

262 Extend Salesforce with Clicks, Not Code Customize Fields

Picklist Description Category for a Stage picklist value updates all opportunities that have that stage value. To edit, from the management settings for opportunities, go to Fields, and then click Edit next to Stage. To deactivate an active stage, click Del next to the stage. On the mapping page, don't replace the stage with another existing value; just click Save. The stage now appears in the Inactive Stage Picklist Values related list. The stage is no longer in use but can exist in older opportunity records.

Status (for solutions) Status of a solution, for example, Draft, Reviewed. Mark one or more values as “Reviewed”. When users solve cases using solutions, they can view which solutions have been reviewed and which have not. Each picklist value can have up to 40 characters.

Priority (for tasks) Importance of the task, for example, High, Normal, Low. Set one value as the default priority of all new tasks, and one value as the highest priority. If you delete a value, you have the option to map the deleted value to another existing value in all your org’s tasks. Each picklist value can have up to 20 characters.

Status (for tasks) State of a task, for example, Not Started, Completed. Choose at least one value as the “Closed” status and one value as the “Default” status for all new tasks. If you delete a value, you have the option to map the deleted value to another existing value in all your org’s tasks. Each picklist value can have up to 40 characters.

Task Type (for tasks) Send Email Default specifies the default task type assigned when the task is sending email or mass email, and when tasks are created via inbound email, such as Email to Salesforce. Default specifies the default picklist value when creating tasks. To edit, from the management settings for tasks, go to Fields, and then click Edit next to the picklist value that you want to specify as the default.

SEE ALSO: Picklist Limitations

263 Extend Salesforce with Clicks, Not Code Customize Fields

Picklist Limitations

The maximum number of characters you can have in a picklist depends on the type of picklist. Each EDITIONS value in a picklist includes a line break and a return character that aren’t visible. These two additional characters per value are counted as part of the character limit for each value. Available in: both Salesforce When selecting picklist values for a list view filter, the combined size of the selected picklist values Classic and Lightning must be fewer than 240 characters. Experience Other limits apply to standard and custom picklists. Available in: All Editions Standard Picklists aren’t Other Limits for Standard Picklists available in Database.com For standard picklists, each value can have up to 255 characters, not including line breaks and returns. This applies to single-select and multi-select picklists. USER PERMISSIONS

Picklist Field Maximum Number of Values To change picklists: • Customize Application Lead Status 100

Task Status 100

Task Priority 50

Case Status 100

Case Priority 50

Opportunity Stage 100

Limits for Custom Picklists Inactive and active picklists limits: • Restricted picklists have a combined active and inactive limit of 1,000. • Bound unrestricted picklists have a limit of 1,000 on active picklists and a limit of 4,000 on inactive picklists. • Existing unbound picklists have no limit. By default, all newly created picklists are bound to the 4,000 inactive limit. Custom single-select picklists limits: • Up to 1,000 values. • Up to 255 characters per value. Custom multi-select picklists limits: • Up to 500 values. • Up to 255 characters per value. • Users can select up to 100 values at a time on a record. Global picklist value sets limits: • Global picklist value sets have a combined active and inactive limit of 1,000. • You can have up to 500 picklist global value sets in an org. • There’s no limit on the number of custom picklists that use global picklist value sets. • If you apply a global picklist value set to more than 13 different objects, you can deactivate values from the picklist value set, but you can’t replace any picklist values or delete values from the set.

264 Extend Salesforce with Clicks, Not Code Customize Fields

Functional Limitations for Custom Picklists • You can make a custom single-select picklist field into a restricted picklist only if the picklist has fewer than 1,000 values (or entries). You can make a custom multi-select picklist field into a restricted picklist only if the picklist has fewer than 500 values (or entries). A restricted picklist’s values are limited to only those values defined by a Salesforce admin, which prevents users from loading redundant or erroneous values through the API. • Global picklist value sets are always restricted picklists, which is a good thing because it preserves data integrity. (Global value sets are shared across objects. Reuse the value set for any custom picklist field.) • For custom picklist fields that use a global picklist value set, you can change from a single-select to multi-select picklist and vice versa. However, you can’t change the picklist to a different field type, such as checkbox, currency, or text. • You can’t undo a custom picklist field’s association with a global value set. If you need a picklist field to use a different global value set or different individual values, delete the custom picklist field, and create a new one in its place.

Replace Picklist Values

As your business needs change, replace picklist values with more relevant alternatives. Replacing EDITIONS a value globally replaces that field value on all existing records. For example, let’s say you have a status picklist with three different closed values, Closed-red, Available in: both Salesforce Closed-yellow, and Closed-green, and you want to simplify those to just one value. Replace them Classic and Lightning with the new value Closed. Experience

Important: If you replace a parent value in a controlling picklist, the picklist dependency on Available in: All Editions that value is lost. After replacing the parent value, re-create the dependency using the new parent value. USER PERMISSIONS 1. If necessary, create the replacement value in the picklist edit page. See Add or Edit Picklist Values. To replace picklist values: • Customize Application 2. Navigate to the picklist. • For a global picklist value set: From Setup, enter picklist in the Quick Find box, then select Picklist Value Sets. • For a picklist on an object, go to the fields area of the object. For example, for an Account picklist: From Setup, enter Account in the Quick Find box, then select Fields under Accounts.

3. Start the picklist value replace process. • For a global picklist value set: Go to the Global Value Set Detail page by clicking the picklist name. In the Values section, click Replace. • For all other picklists: Click Replace next to the picklist name.

4. Enter the value to change, and select a new replacement value.

Note: Replacing an existing picklist value also changes the Modified By date and time for the record.

5. To use the new value in records where this field is currently empty, select Replace all blank values. 6. To update all occurrences of the value in your org’s records with the new value, click Replace. Occurrences in the Recycle Bin are also updated. Your replace job is queued. To check the job’s status, from Setup, enter Background Jobs in the Quick Find box, then select Background Jobs. You receive an email when the job is complete.

265 Extend Salesforce with Clicks, Not Code Customize Fields

Note: If you replace the Stage picklist for opportunities, the Probability, Forecast Category, and Expected Revenue fields are also updated with the corresponding values.

SEE ALSO: Create a Global Picklist Value Set Protect Picklist API Names for Formulas and Integrations Manage Inactive Picklist Values

Remove a Picklist Value Remove or replace custom picklist values to update the records that have the picklist field. You have several ways to remove existing picklist field values. And, the steps are a little different when your picklist values are part of a global picklist value set. While you remove them, you can also to replace them with another value. For more information on replacing an existing value, see Replace Picklist Values. The following steps remove existing values. 1. Navigate to the picklist. • For a global picklist value set: From Setup, enter picklist in the Quick Find box, then select Picklist Value Sets. • For a picklist on an object, go to the fields area of the object. For example, for an Account picklist: From Setup, enter Account in the Quick Find box, then select Fields under Accounts.

2. Click the picklist name. 3. To remove a value from the picklist, click Del next to the value’s name. Decide whether to replace the value or leave it blank. If you replace it with a blank value, existing records will not display the value anymore. To keep the value on existing records, use Deactivate, instead of Del.

Note: Some special picklists,such as opportunity Stage, Task Priority, Task Status, Lead Status, and Case Status,prompt you to map the deleted value to another existing value in all your org’s records. You can map the values or leave your existing data unchanged. Using the option to replace a picklist value while deleting the current value does not trigger workflow rules.

For orgs using record types, include some or all the values from the master picklist in different record types to offer a subset of values to users based on their profile.

Protect Picklist API Names for Formulas and Integrations

When you create a picklist value, an API Name that matches the Label is assigned. By default, the EDITIONS API Name can be changed at any time, but you can choose to protect the API Name. A picklist value is identified by either the displayed value or the API Name. Formulas reference the Available in: both Salesforce API Name so that the formula continues to work even if the displayed value changes. An admin Classic and Lightning can prevent changes to the API Name to protect the references to the fields in formulas or during Experience integrations, such as data import. Available in: All Editions 1. From Setup, enter picklist in the Quick Find box, then select Picklist Settings. 2. To prevent changes to the API names for any of the values, select Disable editing picklist USER PERMISSIONS values' API names. To customize picklist settings: • Customize Application

266 Extend Salesforce with Clicks, Not Code Customize Fields

If you need to change an API Name later, you can deselect this option.

SEE ALSO: Create a Custom Picklist Field Replace Picklist Values Add or Edit Picklist Values

Sort Picklists

1. From the management settings for the picklist field’s object, go to Fields. EDITIONS • For custom task or event fields, go to the object management settings for Activities. • For standard task fields, go to the object management settings for Tasks. For standard event Available in: both Salesforce fields, go to the object management settings for Events. Classic and Lightning Experience • For Knowledge validation status picklists, from Setup, enter Validation Statuses in the Quick Find box, then select Validation Statuses. Available in: All Editions

2. Click the name of the picklist to update. USER PERMISSIONS 3. Click Reorder. 4. Use the arrows to arrange the field in the proper sequence. To sort picklists: • Customize Application 5. Select a default value if desired. 6. To alphabetize the entries for users on edit pages, check Sort values alphabetically.... 7. Save your changes. On record edit and detail pages and in reports, picklist and multi-select picklist fields can include inactive values. These inactive values are sorted last, unless you’ve chosen alphabetical sorting. In that case, all values are sorted alphabetically.

SEE ALSO: Find Object Management Settings

Manage Inactive Picklist Values

Establish upper bound limits, deactivate, reactivate, or remove a value from a restricted or unrestricted EDITIONS picklist. Having inactive picklist values can be a result of an import or intentionally removing the value from Available in: both Salesforce the list of available values for future use. In certain cases, importing text fields can create numerous Classic and Lightning unwanted picklist fields. Managing your inactive picklist values and enforcing limits on inactive Experience values for unrestricted picklists can improve performance and improve your Salesforce org’s overall Available in: All Editions health.

Disable Upper Bound Limit on Inactive Values Upper bound limits, which are set by default on inactive values for unrestricted picklists, can improve performance and your Salesforce org’s overall health. If your org's inactive unrestricted picklist values go unchecked, performance degrades. The point when degradation occurs depends on your implementation.

267 Extend Salesforce with Clicks, Not Code Customize Fields

Establish an Upper Bound Limit You can enforce an upper bound limit on existing standard picklists. The limit is enforced on the inactive values of picklists whose numbers don’t exceed the allowable limit. By default, all new picklists have an enforced limit of 4,000 on inactive values for unrestricted picklist fields. View Active and Inactive Picklist Values You can view the number of active and inactive picklist values and the maximum number allowed from the picklist field detail page. Converting a Text Field Type to a Picklist By default, an upper bound limit of 4,000 is applied to inactive unrestricted picklists for each field. If you exceed this limit when converting a text field to a picklist field, you get an error message. Deactivate and Reactivate Values Deactivate, reactivate, or remove a value from a restricted or unrestricted custom picklist. If it’s a global picklist value set, these actions simultaneously update all custom picklists that inherit its value set.

Disable Upper Bound Limit on Inactive Values

Upper bound limits, which are set by default on inactive values for unrestricted picklists, can improve EDITIONS performance and your Salesforce org’s overall health. If your org's inactive unrestricted picklist values go unchecked, performance degrades. The point when degradation occurs depends on your Available in: Salesforce implementation. Classic and Lightning Important: We recommend disabling the limit only for troubleshooting, such as when errors Experience occur during data creation or metadata deployment. Available in: All Editions These rules apply when limits are enforced. • The limit for inactive values on unrestricted picklists is 4,000. USER PERMISSIONS • The enforced limit applies to all new picklist fields. To create or change custom • The limit applies to inactive values on newly created unrestricted picklists. fields: • Current unrestricted picklists in your org aren’t affected by the new limit. • Customize Application • Admins can choose to exclude their Salesforce org from inactive value limits. • The limit doesn’t apply to restricted picklist and global picklist value sets. Global picklist value sets have a combined active and inactive limit of 1,000. To remove the limit on inactive values for unrestricted picklists (not recommended). 1. From Setup, in the Quick Find box, enter Picklist Settings. 2. In the Picklist Settings window, click Remove upper bound on inactive picklist values.

SEE ALSO: Establish an Upper Bound Limit

268 Extend Salesforce with Clicks, Not Code Customize Fields

Establish an Upper Bound Limit

You can enforce an upper bound limit on existing standard picklists. The limit is enforced on the EDITIONS inactive values of picklists whose numbers don’t exceed the allowable limit. By default, all new picklists have an enforced limit of 4,000 on inactive values for unrestricted picklist fields. Available in: Salesforce 1. To enforce the upper bound limit on inactive values for unrestricted picklists, the setting, Classic and Lightning “Remove upper bound on inactive picklist values” must not be disabled. Experience 2. From Setup, in the Quick Find box, enter Picklist Settings. Available in: All Editions 3. In the Picklist Settings window, click Establish upper bound on existing picklists. A query is run on picklists to find inactive values that satisfy the 4,000 limit. The limit is enforced USER PERMISSIONS only on those picklists. A message appears to show the number of picklists that were bound to the To create or change custom limit, or that there are no unbound picklists that meet the limit. fields: You can run the upper bound on existing picklists setting multiple times. For example, if you delete • Customize Application picklist values, you can potentially reduce the total number of values to be under the limit. Another scenario is if you remove the limit with the remove upper bound on inactive picklist values setting to perform a conversion or import. You can reinforce the limit after conversion and then run the establish upper bound on existing picklists setting on values that meet the criteria. Removing the limit with the remove upper bound on inactive picklist values setting clears the upper bound limit for all unrestricted picklists.

Note: Admins or Salesforce can’t configure the limit of 4,000 for inactive values.

SEE ALSO: Converting a Text Field Type to a Picklist

View Active and Inactive Picklist Values

You can view the number of active and inactive picklist values and the maximum number allowed EDITIONS from the picklist field detail page. Limits are applied as follows: Available in: Salesforce Classic and Lightning • Restricted picklists have a combined active and inactive limit of 1,000. Experience • Bound unrestricted picklists have a limit of 1,000 on active picklists and a limit of 4,000 on inactive picklists. Available in: All Editions • Global picklist value sets have a combined active and inactive limit of 1,000. • Existing unbound picklists have no limit. By default, all newly created picklists are bound to the USER PERMISSIONS 4,000 inactive limit. To create or change custom 1. To view active and inactive picklist values, the setting, “Remove upper bound on inactive picklist fields: values” must not be disabled. • Customize Application 2. Navigate to the picklist. • For a picklist on an object, go to the fields section of the object. • For a global picklist, from Setup, in the Quick Find box, enter picklist, then select Picklist Value Sets.

3. Go to the picklist’s detail page by clicking the picklist’s name. In the Picklist Values Used section, you see the active and inactive number of picklist values and the maximum number allowed.

269 Extend Salesforce with Clicks, Not Code Customize Fields

Converting a Text Field Type to a Picklist

By default, an upper bound limit of 4,000 is applied to inactive unrestricted picklists for each field. EDITIONS If you exceed this limit when converting a text field to a picklist field, you get an error message. These rules apply to conversion: Available in: both Salesforce Classic and Lightning • The limit isn’t case-sensitive. Experience • If there are more than 4,000 unique values, the conversion fails. This conversion limit includes active picklists. Available in: All Editions • Soft-deleted values count toward the 4,000 unique value limit. To avoid values that count toward the limit, permanently delete any soft deleted records and field values by emptying the recycle bin. • Keep this setting: Remove upper bound on inactive picklist values. • You can’t convert a defined unique text field to a picklist or a multi-select picklist. 1. From the management settings for the field’s object, go to Fields. 2. Click Edit next to the custom field that you want to change. 3. Click Change Field Type. 4. Select a Picklist and click Next. 5. Enter a field label, name, and any other attributes, and then save your changes.

SEE ALSO: Change the Custom Field Type Disable Upper Bound Limit on Inactive Values Establish an Upper Bound Limit

Deactivate and Reactivate Values

Deactivate, reactivate, or remove a value from a restricted or unrestricted custom picklist. If it’s a EDITIONS global picklist value set, these actions simultaneously update all custom picklists that inherit its value set. Available in: Salesforce Note: Only a Salesforce admin can modify the values of a restricted picklist. Users can’t add Classic and Lightning unapproved values, even through the API. Experience The unrestricted picklist values for the Task.Subject and Event.Subject fields Available in: All Editions can’t be deactivated. The picklist values are deleted instead of deactivated. USER PERMISSIONS 1. Navigate to the picklist you want to modify. • For a picklist on an object, go to the fields section of the object. To create or change custom fields: • For a global picklist, from Setup, in the Quick Find box, enter picklist, then select • Customize Application Picklist Value Sets.

2. Go to the picklist’s detail page by clicking the picklist’s name. 3. In the Values section, modify the picklist value. These actions simultaneously update all custom picklists that inherit its value set. • To deactivate a value, which removes it from the picklist but keeps it on existing records, click Deactivate next to the value’s name. The value moves to the Inactive Values section. If you need the value again later, click Activate next to its name.

270 Extend Salesforce with Clicks, Not Code Customize Fields

• To remove a value from the picklist and all records that use it, click Del next to the value’s name, and select Replace value on records with blank value. Then save the changes. • To remove a value from a global picklist and any custom picklists that share its value set, click Del next to the value’s name, and then click OK. If any custom picklists use this global picklist value set, you’re prompted to replace the value with a blank value or an existing, active value. If no custom picklists use the value set, the value is deleted from the global picklist. If a global picklist value is used in historical trending, it’s deactivated but not deleted. Deleting a value in a global picklist value set or on non-global, restricted picklists goes to the background jobs queue. When the job completes, your picklist is updated and you’re notified by email. Changes to picklist values are logged in Setup Audit Trail. To view the audit history, from Setup, in the Quick Find box, enter View Setup Audit Trail, then select View Setup Audit Trail. Using the option to replace a picklist value while deleting the current value doesn’t trigger workflow rules.

Define Dependent Picklists

Tip: If your org uses record types, make sure that your controlling and dependent picklist EDITIONS values are available in the appropriate record types before defining a dependent picklist. 1. From the management settings for the object you want to add a field to, go to Fields. Custom Available in: both Salesforce task and event fields are accessible from the object management settings for Activities. Classic and Lightning Experience 2. Click Field Dependencies. Available in: All Editions 3. Click New. Standard Objects are not 4. Choose a controlling field and dependent field. available in Database.com Note: Some picklist and checkbox fields may not be available as controlling fields. USER PERMISSIONS 5. Click Continue. 6. Use the field dependency matrix to specify the dependent picklist values that are available To define dependent when a user selects each controlling field value. picklists: • Customize Application 7. Optionally, click Preview to test your selections. If your organization uses record types, choose a record type to test how it affects your controlling and dependent picklist values. The record type controls what values are available in the controlling field. The record type and the controlling field together determine what values are available in the dependent picklist. For example, a dependent value is only available if it is available in the selected record type and the selected controlling value.

Note: The Filter by Record Type option doesn’t appear in the Preview window for activity custom fields.

8. Click Save.

Dependent Picklists Using the Field Dependency Matrix Edit Dependent Picklists Delete Picklist Dependencies Dependent Picklist Considerations

271 Extend Salesforce with Clicks, Not Code Customize Fields

Dependent Picklists

Use dependent picklists to help your users enter accurate and consistent data. A dependent picklist EDITIONS is a custom or multi-select picklist for which the valid values depend on the value of another field, called the controlling field. Controlling fields can be any picklist (with at least one and fewer than Available in: both Salesforce 300 values) or checkbox field on the same record. Classic and Lightning For example, you can define a Reason custom picklist on opportunities and make its valid values Experience Stage depend on the value of the picklist as follows: Available in: All Editions • If Stage is Closed Won, the valid values for Reason are Superior features or Lower price. • If Stage is Closed Lost, the valid values for Reason are Inferior features, Higher price, or Company viability.

SEE ALSO: Define Dependent Picklists Dependent Picklist Considerations

Using the Field Dependency Matrix

The field dependency matrix lets you specify the dependent picklist values that are available when EDITIONS a user selects each controlling field value. The top row of the matrix contains the controlling field values, while the columns list the dependent field values. Available in: both Salesforce Use this matrix to include or exclude values. Included values are available in the dependent picklist Classic and Lightning when a value in the controlling field is selected. Excluded fields are not available in the dependent Experience picklist for the selected controlling field value. Available in: All Editions To include or exclude values: • Double-click values to include them. Included values are indicated with highlighting. Double-click USER PERMISSIONS any highlighted values to exclude them. • Click a value and use SHIFT+click on another value to select a range of adjacent values. Then To define picklist dependencies: click Include Values to make the values available, or Exclude Values to remove them from • Customize Application the list of available values. • Click a value and use CTRL+click to select multiple values. Then click Include Values to make the values available, or Exclude Values to remove them from the list of available values. • Click a column header to select all the values in that column. Then click Include Values to make the values available, or Exclude Values to remove them from the list of available values. To change the values in your view: • Click View All to view all available values at once. • Click Go To and choose a controlling value to view all the dependent values in that column. • Click Previous or Next to view the values in columns that are on the previous or next page. • Click View sets of 5 to view 5 columns at a time.

272 Extend Salesforce with Clicks, Not Code Customize Fields

Edit Dependent Picklists

1. From the management settings for the picklist’s object, go to Fields. EDITIONS 2. Click Field Dependencies. 3. Click Edit next to the field dependency relationship you want to change. Available in: both Salesforce Classic and Lightning 4. Use the field dependency matrix to specify the dependent picklist values that are available Experience when a user selects each controlling field value. Available in: All Editions 5. Optionally, click Preview to test your selections. 6. Save your changes. USER PERMISSIONS

SEE ALSO: To edit field dependencies: • Customize Application Find Object Management Settings

Delete Picklist Dependencies

If you no longer want the values of a dependent picklist to depend on a controlling field, delete its EDITIONS dependency. Deleting the dependency removes the logic that defines how the values of the picklist depend on the controlling field, but doesn't delete the fields or affect their data. Available in: both Salesforce 1. From the management settings for the picklist’s object, go to Fields. Classic and Lightning Experience 2. Click Field Dependencies. 3. Click Del next to the field dependency relationship you want to delete. Available in: All Editions 4. Click OK to confirm. USER PERMISSIONS

SEE ALSO: To delete picklist Find Object Management Settings dependencies: • Customize Application

Dependent Picklist Considerations

Consider the following when defining dependent picklists: EDITIONS Checkboxes Checkbox fields can be controlling fields but not dependent fields. Available in: both Salesforce Classic and Lightning Converting fields Experience When you convert existing fields to dependent picklists or controlling fields, it doesn’t affect the existing values in your records. After conversion, the dependency rules apply to new records Available in: All Editions and to any changes to existing records. Page Layouts and Leads are Default values not available in You can set default values for controlling fields but not for dependent picklists. Database.com Field-level security Field-level security settings for a controlling field and dependent picklist are independent. USER PERMISSIONS Remember to hide a controlling field whenever its correlating dependent picklist is hidden. Import To define and edit dependent picklists: The Data Import Wizard doesn’t consider field dependencies. You can import any value into a • Customize Application dependent picklist regardless of the value imported for a controlling field.

273 Extend Salesforce with Clicks, Not Code Customize Fields

Lead conversion If you create a dependency for lead fields that map to account, contact, and opportunity fields for lead conversion, create the same dependency on the account, contact, or opportunity. Dependent picklists and controlling lead fields can be mapped to account, contact, or opportunity fields with different dependency rules. Multi-select picklists Multi-select picklists can be dependent picklists but not controlling fields. Standard versus custom picklists Custom picklist fields can be either controlling or dependent fields. Standard picklist fields can be controlling fields but not dependent fields. Picklist limitations A controlling field can have up to 300 values. If a field is both a controlling field and dependent picklist, it can’t contain more than 300 values. The following fields are not available as controlling fields. Activity Fields Call Type Create recurring series of events Show Time As Subject Task Type Contact Fields Salutation Contact Currency Custom Object Fields Currency Lead Fields Converted Unread By Owner Dependency limitations Before defining a dependency, make sure that your picklist has at least one value. Standard fields like Product Family do not contain values until you add them. If a standard controlling field relies on functionality that your organization decides to disable, the dependency rules for the picklist go away. For example, if your organization disables the Self-Service portal and the Closed by Self-Service User is a controlling field, its dependent picklist displays all available values. If you replace a parent value in a controlling picklist, the picklist dependency is lost. After replacing the parent value, re-create the dependency using the new parent value. Connect Offline While controlling fields and dependent picklists are available in Connect Offline, the logic between them is not.

274 Extend Salesforce with Clicks, Not Code Customize Fields

Page layouts Page layouts that contain dependent picklists must also contain their controlling picklist fields, or the dependent picklist values don't display. For visually impaired users, make sure that the dependent picklist is lower on the page layout than its controlling field. If a dependent picklist is required and no values are available for it based on the controlling field value, users can save the record without entering a value. The record is saved with no value for that field. Record types You can define or change the record type for your dependent picklist only within the Preview dialog when creating or editing the field dependency values. The record type controls what values are available in the controlling field. The record type and the controlling field together determine what values are available in the dependent picklist. For example, a dependent value is only available if it is available in the selected record type and the selected controlling value.

Rich Text Editor Use the rich text editor to format text in custom fields with the rich text area type. You can also use the rich text editor in many other features, such as Chatter publisher and groups.

Available in: the Salesforce mobile app, Salesforce Classic, and Lightning Experience

Available in: All Editions

You can perform the following operations with the rich text editor’s WYSIWYG interface. • Format text as bold, italicized, underlined, or strikethrough • Create bullet and numbered lists • Change paragraph indentation • Insert a hyperlink • Insert an image (copying inline images from external sources and pasting them into the editor is not supported) • Remove formatting The availability of toolbar buttons varies across features. For example, the code snippet button is available in Chatter publisher but not in custom fields. Extra functions are supported for features such as Salesforce Knowledge and Ideas, like the ability to embed multimedia content.

Note: Beginning in Summer ’17, custom fields provide a rich text editor that no longer uses CKEditor in Lightning Experience and the Salesforce mobile app. Rich text editors provide a WYSIWYG interface only; you can’t edit HTML tags. When you copy content from a web page or another source and paste it into the editor, unsupported tags are removed. Text that was enclosed in unsupported tags is preserved as plain text. You aren’t notified when unsupported or potentially malicious HTML tags are removed. You can expect minor formatting or styling differences when editing a rich text field across the interfaces. We recommend using the toolbar to fix formatting or styling differences. Lightning Knowledge continues to use the CKEditor for custom rich text fields. Knowledge article rich text fields provide additional functions, such as the ability to view and edit the source HTML, support for more HTML styles, and smart links between articles.

Some features have rich text editors across Salesforce Classic, Lightning Experience, and the Salesforce mobile app. For example, the Information field in groups provides a rich text editor in all three user interfaces. The Chatter Publisher has a rich text editor only in Salesforce Classic and Lightning Experience.

275 Extend Salesforce with Clicks, Not Code Customize Fields

Salesforce Classic Lightning Experience The Salesforce Mobile App

Groups

Lightning Components (ui:inputRichText and lightning:inputRichText)

Custom Fields

Chatter Publisher

Knowledge Article

Lightning App Builder (Rich Text Component)

Experience Builder (Rich Content Editor)

Flow Builder

Idea Themes

Send Email Action

Sales Path

Notes

Rich Text Editor Considerations When you use the editor, note the following. • The maximum number of characters you can enter in the rich text editor is equal to the field length specified when creating or editing the field. The default is 32,768 characters, which includes characters used by HTML tags that apply formatting. • Clicked hyperlinks open in a new browser window. The rich text editor supports HTTP, HTTPS, and mailto hyperlinks. • The rich text editor doesn’t validate hyperlinks to web pages. Confirm that you are specifying a valid URL. • To insert an image, click and either select: – Web Address and enter the URL of the image. This option isn’t available in Lightning Experience. – Upload Image and select an image from your local host. You can upload only JPEG, PNG, or GIF files. The file cannot exceed 1 MB. You can’t add a hyperlink to an image. Copying inline images from external sources to the text editor is not supported. Optionally, enter a description that appears when you hover over the image. The image must have a URL that Salesforce can access. • The rich text editor supports all languages that Salesforce Knowledge supports. • The rich text editor does not support JavaScript or Cascading Style Sheets (CSS). • The rich text editor is disabled for users who have accessibility mode enabled. It’s replaced with a text field.

276 Extend Salesforce with Clicks, Not Code Customize Fields

Supported Formatting We recommend that you use the toolbar to format your content. When you copy content from a web page or another source and paste it into the editor, unsupported tags are removed. Text that was enclosed in unsupported tags is preserved as plain text. The rich text editor supports the tags listed in the table.


      •  

        Note: Rich text editors in custom rich text area fields have minor formatting differences in Lightning Experience and the Salesforce mobile app, as compared to Salesforce Classic. For more information, see Editing Rich Text Area Fields in Records. The tags can include the following attributes.

        alt face size

        background height src

        border href style

        class name target

        colspan rowspan width

        277 Extend Salesforce with Clicks, Not Code Customize Fields

        The following URL protocols are supported. • http: • https: • file: • ftp: • mailto: • # • / for relative links

        Rich Text Editors Using CKEditor Rich text editors in Salesforce Classic continue to use CKEditor. Beginning in Spring ’21, Salesforce uses CKEditor version 4.14.0. In Salesforce Classic, CKEditor is used by: • Chatter Publisher • Custom Fields • Email • Flow Builder • Groups • Idea Themes • Knowledge Article In Lightning Experience and the Salesforce mobile app, the following features have rich text editors that use CKEditor. • Email Composer, using the Send Email action • Lightning Knowledge These features load the rich text editor in an iframe. To load the editor correctly in an iframe, your browser must use appropriate security settings. Refer to your browser’s instructions to configure the settings. For example: Internet Explorer Make sure that the Launching programs and files in an IFRAME security setting is set to Enable or Prompt. Safari We recommend changing your Privacy settings for cookies to Allow from websites I visit. Chrome Make sure that Block third-party cookies and site data is not selected in the Content settings. To enter content in Internet Explorer 11 on touch-enabled devices running Windows, first click the rich text area field, then tab into the editor.

        Add Videos Using the HTML Editor Adding Code Samples to Posts You can paste code samples into your posts in Chatter Answers and Ideas.

        SEE ALSO: Editing Rich Text Area Fields in Records Rich Text Fields in Knowledge Articles

        278 Extend Salesforce with Clicks, Not Code Customize Fields

        Add Videos Using the HTML Editor

        Available in: Salesforce Classic and Lightning Experience USER PERMISSIONS

        Available in: Enterprise, Performance, Unlimited, and Developer Editions To create or change custom fields: • Customize Application Approved Video Sites • app.ustudio.com • dailymotion.com • documentforce.com • fast.wistia.net • force.com • ooyala.com • play.vidyard.com • player.youku.com • players.brightcove.net • salesforce.com • salesforce-sites.com • sites.com • ustream.tv • visualforce.com • videos.sproutvideo.com • vimeo.com • youtube.com (including youtube.co.uk, youtube.ca, youtube.com.br, youtube.es, youtube.fr, youtube.ie, youtube.jp, youtube.nl, youtube-nocookie.com, and youtube.pl) 1. Copy the

        You can also set the trusted external domain in the iframeDomain cookie. This method allows iframes if the _iframeDomain URL variable isn’t saved when navigating between pages in IE.

        Cookie iframeDomainCookie = ApexPages.currentPage().getCookies().get('iframeDomain');

        if (iframeDomainCookie == null) { iframeDomainCookie = new Cookie('iframeDomain','www.example.com');

        // Set the new cookie for the page ApexPages.currentPage().setCookies(new Cookie[]{iframeDomainCookie}); }

        SEE ALSO: Configuring Site Properties Enable Clickjack Protection in Experience Cloud Sites Create and Edit Salesforce Sites

        Site.com Versioning Overview

        Each time you publish your site, it’s tracked as a version. You can restore your site back to one of EDITIONS the previously published versions. You can’t select individual components when restoring; you must restore the complete site. Available in: Salesforce When working in Site.com Studio, you’re always working on an unpublished version of your site. Classic (not available in all It’s your working copy. When you restore a version, you overwrite your working copy, not your live orgs) site. You must publish the restored version before you see the change on your live site. Available for purchase in: In Site.com Studio, you’ll find your site versions in the Change History view on the Overview tab. Enterprise, Performance, Not all items in a site are reverted when you restore a version. Some things, like user roles, remain and Unlimited Editions unchanged even when you restore from a previous version. Everything in a site is under version Available (with limitations) control except: in: Developer Edition • Site name • Anonymous preview setting • Guest User Profile settings • Clickjack protection level • Domains and path prefixes • User role settings

        529 Extend Salesforce with Clicks, Not Code Site.com

        Restoring to a Previous Site Version The Change History list in Site.com Studio tracks all published versions of your site. You can select any previously published version and restore it. You can only restore an entire site, not parts of a site.

        SEE ALSO: Restoring to a Previous Site Version

        Restoring to a Previous Site Version

        The Change History list in Site.com Studio tracks all published versions of your site. You can select EDITIONS any previously published version and restore it. You can only restore an entire site, not parts of a site. Available in: Salesforce Note: The restore version feature is not available in Communities. Classic (not available in all orgs) When working in Site.com Studio, you’re always working on an unpublished version of your site. Available for purchase in: It’s your working copy. When you restore a version, you overwrite your working copy, not your live Enterprise, Performance, site. You must publish the restored version before you see the change on your live site. and Unlimited Editions Warning: You can’t restore the working copy of your site after you revert to a previous Available (with limitations) version. Therefore, it’s a good idea to back up the working copy of the site before reverting in: Developer Edition to ensure you don’t lose any unpublished changes. To revert to a previously published site version: USER PERMISSIONS 1. Select the Overview tab. To build, edit, and manage 2. From the Change History view, select the version you want to restore. Site.com sites: 3. Click > Restore Version. • Site.com Publisher User 4. Click OK at the confirmation message. field enabled on the user After you restored your working site to a previous version, you can continue to make additional detail page changes until you’re ready to publish the site. AND Site administrator or designer role assigned at the site level

        530 Extend Salesforce with Clicks, Not Code Site.com

        Creating URL Redirects in Site.com

        If you move or reorganize pages in your site, search engines may have trouble finding the new EDITIONS page locations. To avoid this, set up URL redirects to inform users and search engines that site content has moved. Available in: Salesforce You can use URL redirects to: Classic (not available in all orgs) • Maintain search engine ranking. For example, if you change a page’s name from “Gadgets” to “Widgets,” creating a redirect rule from /Gadgets to /Widgets lets you restructure the Available for purchase in: site without affecting your page ranking. Enterprise, Performance, • Make URLs more readable and memorable. For example, site visitors will find long or numeric and Unlimited Editions page names, such as /widget65AD890004ab9923, difficult to remember. Instead, you Available (with limitations) can provide them with a short, friendly URL, such as /widget, and create an alias that redirects in: Developer Edition to the correct page when the user uses the short URL alias. • Assist with migration from another system to Site.com if you’re still using the same domain. USER PERMISSIONS For example, if your old site ran on PHP, you can create a redirection rule from an old page, such as /index.php, to a new page in Site.com, such as /myNewPage. To build, edit, and manage To assign a redirect to a site page: Site.com sites: • Site.com 1. On the Overview tab, click Site Configuration > URL Redirects. Publisher User 2. Click Create a Redirect. field enabled on the user detail page 3. Specify the Redirect type: AND Option Description Site administrator or designer role assigned Permanent (301) Select this option if you want users and search at the site level engines to update the URL in their systems when visiting the page. Users visiting a page redirected with this type are sent seamlessly to the new page. Using a permanent redirect ensures that your URLs retain their search engine popularity ratings, and that search engines index the new page and remove the obsolete source URL from their indexes.

        Temporary (302) Select this option if you want users and search engines to keep using the original URL for the page. Search engines interpret a 302 redirect as one that could change again at any time, and though they index and serve up the content on the new target page, they also keep the source URL in their indexes.

        Alias Select this option if you don’t want the URL to change in the user’s browser, but you want to redirect to a different page. Search engines won’t be aware of the change or update their records.

        531 Extend Salesforce with Clicks, Not Code Site.com

        Option Description Alias redirects only work when you redirect from one Site.com page to another. You can’t create an alias to an external address.

        4. Specify the former page location in the Redirect from field. • The page location must be a relative URL. • The page can have any valid extension type, such as .html or .php, and can contain parameters. Parameter order is irrelevant. • The URL can’t contain anchors, such as /siteprefix/page.html#target. • You can create just one redirection rule from a particular URL. If you create a new rule with the same Redirect From information, the old rule is overwritten.

        5. Specify the new page location in the Redirect to field. This can be a relative URL or a fully-qualified URL with an http:// or https:// prefix. Unlike pages you’re redirecting from, pages you’re redirecting to can contain anchors. 6. To immediately enable the redirection rule, ensure Active is selected. To enable it at a later stage, deselect the property. 7. Click Save. The URL Redirects section displays all URL redirection rules you've created for your site. • Edit an assigned redirect rule by clicking > Edit Redirect. • Delete a redirect rule by clicking > Delete Redirect.

        Importing External Websites into Site.com

        With Site.com Studio, you can import your existing website and recreate it automatically as a EDITIONS Site.com site. This saves you the time of having to re-code existing HTML pages. Create a zipped file of your website and the content with the desired folder structure. Create a new Available in: Salesforce Site.com site and then import your zipped file. Classic (not available in all orgs) During the creation of the new Site.com site, all your HTML pages and assets are copied into the new site in the same locations they are in the zipped file. Here are some guidelines for importing Available for purchase in: assets. Enterprise, Performance, and Unlimited Editions • Some code in style sheets may not convert properly to the Site.com format. If this happens, you’ll receive a warning message. You can continue to import the zipped file or stop the import. Available (with limitations) If you continue, the style sheet imports and you can then manually attach it to your pages. in: Developer Edition • You can edit the section of a page using Edit Head Markup in scripts section on the properties pane. This is useful for manually editing the HTML. • The maximum file size you can import is 50 MB unless you import and unzip a .zip file. In that case, you can import a .zip file of up to 200 MB if you select Unzip files during the import process. If your site is larger than 200MB when zipped, you can create more than one zipped file and import them individually. • Site.com attempts to format links correctly when importing a page. Links are checked in content blocks, custom code, and head script markup. You can check for any links that might still be broken on your page using the link checker. Open the page, select > Find Broken Links. A dialog displays showing any broken links. To fix the link, click Edit. The link opens in the HTML editor.

        SEE ALSO: Importing a Site.com Site

        532 Extend Salesforce with Clicks, Not Code Site.com

        Copying and Overwriting a Site

        Sometimes, you might want to copy and replace your current production Site.com or Site.com EDITIONS community site with another site. You’ll first need to export a copy of your site from your . Once you have an exported .site file, Available in: Salesforce import that file into your production organization using the overwrite feature. Overwrite replaces Classic (not available in all your production site with the imported site. You can only overwrite sites that are the same type. orgs) For example, you can’t overwrite a Site.com site with a Site.com community site. Available for purchase in: 1. Create your .site file using the export feature in Site.com Studio. Enterprise, Performance, and Unlimited Editions 2. From Site.com Studio in your production site, click Site Actions > Overwrite This Site. Alternatively, if you have access to the Site.com tab in your organization, you can click next Available (with limitations) to the site name to find Overwrite. in: Developer Edition 3. Click Browse to find the .site file you exported. 4. Click OK at the overwrite warning. USER PERMISSIONS

        Warning: You can’t revert once you have overwritten a site. To overwrite sites: • Site administrator or Here are a few tips when using overwrite. designer role assigned at the site level • You’ll need to publish the site you overwrote before changes take effect. • When copying a site, the production site is overwritten. So, be sure to backup your production site by exporting a .site file. • Overwrite does not copy data changes. For example, if you created a custom object to use in a repeater in the site you are copying from, that repeater won’t work in the production site until you create the same custom object. • If there are assets that exist in the production site that do not exist in the site you are copying from, they are moved to the trash can during the overwrite process so you can restore them if needed. • If your copied site has a different name than your production site, the production name is preserved and only the contents are changed. For example, if your site is called Site One and you overwrite your production site called Site Two, the production site is still called Site Two.

        SEE ALSO: Exporting a Site.com Site Using the Metadata API to Deploy a Site

        Using the Metadata API to Deploy a Site

        As a user, you can migrate a site from sandbox to production. You can use the Metadata API to EDITIONS create a deployable package for Site.com sites and Site.com Communities sites.

        Note: For information on deploying a Lightning community or a Salesforce Tabs + Visualforce Available in: Salesforce community, see Deploy a Community from Sandbox to Production. Classic (not available in all orgs) There are several tools that you can use to create a package: Available for purchase in: • Change sets (for Site.com and Site.com Communities sites only). The component type is called Enterprise, Performance, Site.com . and Unlimited Editions • Workbench, which works for creating all site types. The metadata type is called SiteDotCom. Available (with limitations) • Lightning Platform Migration Tool for Ant, which works for creating all site types. The metadata in: Developer Edition type is called SiteDotCom.

        533 Extend Salesforce with Clicks, Not Code Site.com

        If using change sets, select Site.com from the list and follow the prompts to create your package. If using Workbench or Lightning Platform as your tool, you must create a package.xml file. That file is submitted to the Metadata API to create a package.

        Note: You can include a Guest User Profile in your package.xml file. If you do so, that Guest User Profile is linked to the site during deployment. The packaging process generates a folder that contains a content file and a metadata xml file. The content file name is [sitename].site. The metadata .xml file name is [sitename].site-meta.xml. If you deploy a package that doesn’t include a .site file, an empty site is created. If the package contains a site file, and the organization already contains a site with the same name, the site is updated.

        Note: There is a file size limitation when using the Metadata API to deploy a site from sandbox to production. The assets in the .site file can’t be larger than 40 MB. The site gets created, but the assets show in the new site as broken. To fix the assets, export the assets from the sandbox environment separately and then import them into your new site. For help with the Metadata API, see the Metadata API Developer Guide. You can find help for change sets in the online help and for the Migration Tool Guide at https://developer.salesforce.com/page/Migration_Tool_Guide.

        Sample Package.xml Files Here are some sample Site.com package.xml files.

        SEE ALSO: Change Sets Sample Package.xml Files

        Sample Package.xml Files

        Here are some sample Site.com package.xml files. EDITIONS Here is a sample package.xml file for a Site.com site. Available in: Salesforce Classic (not available in all orgs)

        Available for purchase in: Enterprise, Performance, and Unlimited Editions Available (with limitations) in: Developer Edition

        xyzsite SiteDotCom 30.0

        534 Extend Salesforce with Clicks, Not Code Site.com

        Here is an example of a package.xml for a Salesforce Communities site. The package also includes a Guest User Profile.

        xyzsite CustomSite xyzsite Network xyzsite1 SiteDotCom xyzsite Profile Profile 30.0

        535 Extend Salesforce with Clicks, Not Code Site.com

        Importing and Managing Assets

        Contributors, publishers, and site administrators can import a variety of assets, such as images, EDITIONS HTML pages, and PDFs, to use in a website. You can import assets and files individually, or use a zipped file. When importing entire websites or large numbers of assets, it’s easier to create a zipped Available in: Salesforce file of the content with the desired folder structure. When importing the zipped file for a website, Classic (not available in all Site.com recreates your website and places everything in the same folder structure. orgs)

        Note: Available for purchase in: • The maximum file size you can import is 50 MB unless you import and unzip a .zip file. In Enterprise, Performance, that case, you can import a .zip file of up to 200 MB if you select Unzip files during the and Unlimited Editions import process. Available (with limitations) in: Developer Edition The quickest way to import one or more files is to: 1. Select the files from your computer and drag them directly onto the Studio interface. This is supported for Mozilla® Firefox® and Google® Chrome only. You can drag individual files, or a USER PERMISSIONS zipped file. To build, edit, and manage 2. Depending on the types of files you’re importing, a dialog box may appear that lets you: Site.com sites: • Site.com • Select Unzip files to extract the contents of a .zip file. If the .zip file includes folders, this Publisher User structure is maintained in your site. field enabled on the user • Select Overwrite existing files to replace a file that already exists in the site. detail page • Select Convert CSS files into style sheets, if you're a site administrator or designer, to AND convert a CSS file into a style sheet that you can use to style your website. Site administrator or designer role assigned Note: If you import a .zip file that includes CSS files, and they fail to convert, they at the site level may not be valid. Try unchecking this option and then re-importing the .zip file. To edit only content in • Select Convert HTML files into pages to import HTML pages into your website. The Site.com sites: structure of the HTML page is maintained in your site, but the HTML is not validated during • Site.com import. Contributor User Alternatively, to import a single file: AND 1. Click Import.... Contributor role assigned at the site level 2. Click Browse... to locate the file. 3. Select the file and click Open. 4. Depending on the type of file you’re importing, you can: • Select Unzip files to extract the contents of a .zip file. If the .zip file includes folders, this structure is maintained in your site. • Select Overwrite existing files to replace a file that already exists in the site. • Select Convert CSS files into style sheets, if you're a site administrator or designer, to convert a CSS file into a style sheet that you can use to style your website.

        Note: If you import a .zip file that includes CSS files, and they fail to convert, they may not be valid. Try unchecking this option and then re-importing the .zip file.

        • Select Convert HTML files into pages to import HTML pages into your website. The structure of the HTML page is maintained in your site, but the HTML is not validated during import.

        5. Click Import. A message appears indicating whether the file was imported successfully.

        536 Extend Salesforce with Clicks, Not Code Site.com

        6. Click . You can add images and videos to the text areas of your site pages, or create a hyperlink to any imported asset. If you're a site administrator or designer, you can add also add images directly to the page. View the list of imported assets in the Assets view on the Overview tab. You can also access assets in the All Site Content view, which displays the folder hierarchy of your site. • To view a thumbnail of an imported image, hover over it. • To save an asset to your computer, hover over or select it and click > Download. • To remove an asset from your site if you're a site administrator or designer, hover over or select it and click > Delete. If the asset is being used in your site, you see a confirmation message with a list of locations where that asset is in use. After an asset file is deleted, it exists in the Salesforce cache for up to 24 hours. After this it is permanently deleted from our systems.

        Note: An asset may still be accessible if it's cached locally by a browser, or cached by an external system.

        • To rename an asset on your site if you're a site administrator or designer, hover over the asset and click > Rename.

        Exporting Assets Designers and site administrators can export all site assets separately from the .site file. You can export assets together or individually. Creating and Managing Folders As a site administrator or designer, you can create folders to manage your pages, style sheets, templates, and assets.

        SEE ALSO: Adding Site.com Page Elements Using Site.com Studio as a Site Administrator or Designer Using Site.com Studio as a Contributor Exporting Assets

        537 Extend Salesforce with Clicks, Not Code Site.com

        Exporting Assets

        Designers and site administrators can export all site assets separately from the .site file. You EDITIONS can export assets together or individually. When you export all assets, the assets are exported to a zipped file that is named after the site Available in: Salesforce name—for example, sitename-Assets.zip. Classic (not available in all orgs) Export your assets from the Overview tab by clicking > Export Site Assets. Available for purchase in: To export a single asset, hover over the asset and select Download from the Actions menu. Enterprise, Performance, and Unlimited Editions Note: There is a file size limitation when using the Metadata API to deploy a site from sandbox to production. The assets in the .site file can’t be larger than 40 MB. The site gets created, Available (with limitations) in: Developer Edition but the assets show in the new site as broken. To fix the assets, export the assets from the sandbox environment separately and then import them into your new site. USER PERMISSIONS SEE ALSO: To build, edit, and manage Importing and Managing Assets Site.com sites: • Site.com Publisher User field enabled on the user detail page AND Site administrator or designer role assigned at the site level

        538 Extend Salesforce with Clicks, Not Code Site.com

        Creating and Managing Folders

        As a site administrator or designer, you can create folders to manage your pages, style sheets, EDITIONS templates, and assets. To create new folders: Available in: Salesforce Classic (not available in all 1. In the All Site Content view on the Overview tab, click New Folder. orgs) 2. Type in the folder name. Available for purchase in: 3. Click Create. Enterprise, Performance, Folders are created at the top level of the folder tree. Once created, you can drag them anywhere and Unlimited Editions in the tree structure. Likewise, you can drag and drop files into the folders you create. To rename, Available (with limitations) delete, and create sub-folders, right-click the folder or use the Actions menu ( ). in: Developer Edition Note: The site map remains the same regardless of how you arrange folders in the All Site Content view. USER PERMISSIONS

        SEE ALSO: To build, edit, and manage Site.com sites: Understanding the Site Administrator and Designer's Overview Tab • Site.com Publisher User field enabled on the user detail page AND Site administrator or designer role assigned at the site level

        539 Extend Salesforce with Clicks, Not Code Site.com

        Editing Site.com Pages as a Designer or Site Administrator

        When working with page templates and site pages, you can add content, structure, and style, all EDITIONS in one place. Open a page or template on the Overview tab by double-clicking it or hovering over it and clicking > Edit. The page opens as a new tab. Available in: Salesforce Classic (not available in all orgs)

        Available for purchase in: Enterprise, Performance, and Unlimited Editions Available (with limitations) in: Developer Edition

        USER PERMISSIONS

        To build, edit, and manage Site.com sites: • Site.com Publisher User field enabled on the user detail page AND Site administrator or designer role assigned at the site level

        • Using the Page Elements and Page Structure panes (1), you can search for and add page elements to a page, and reorder the page element hierarchy.

        540 Extend Salesforce with Clicks, Not Code Site.com

        • Using the Properties, Style, and Events panes (2), you can set properties, add style, and create events for a selected page or element. • Using the toolbar (3), you can: – Undo and redo your actions. – Cut, copy, or paste page elements. – Import assets, such as images and files. – Preview pages to see how they’ll appear when live on different devices. – Preview your site or generate an anonymous preview link to send to other users. – Publish your recent changes. – Access other page actions ( ), such as renaming or deleting the page.

        • On the page canvas (4), you can lay out the page and select, edit, and move page elements.

        Tip: • Hide the side panes to increase the canvas size by clicking and . To reopen a pane, click its icon. • As you edit a page, your changes are saved and the status icon ( ) on the page tab is updated automatically. • If the site page or page template is based on another template, editable page elements are highlighted with a blue border on the page.

        Site.com Page Templates Overview Creating Site.com Page Templates Creating Editable Template Areas As the template creator, you specify which elements users can edit in pages based on the template. About Editable Page Elements When you mark a page element as Editable on a page template, that page element becomes editable in any child pages or templates derived from the parent template. Creating Site.com Pages Identifying Which Template a Site.com Page Uses Renaming, Duplicating, and Converting Pages Changing a Page’s Doctype Property The Document Type Definition (DTD) or doctype of a page defines which version of HTML it’s using. This information is used by some browsers to trigger a standard rendering mode. By default, each page’s doctype is set to HTML5, which is the latest version, but you can change it to XHTML 1.0.

        SEE ALSO: Using Site.com Studio as a Site Administrator or Designer

        541 Extend Salesforce with Clicks, Not Code Site.com

        Site.com Page Templates Overview

        Before you begin building the pages of your website, take some time to plan the pages you need, EDITIONS and in particular, which pages will have a similar layout. Once you've decided on the layout, the quickest method is to use a page template to build the basic layout. Available in: Salesforce Classic (not available in all About Page Templates orgs) A page template lets you define the layout and functionality of site pages in one location. By adding Available for purchase in: common page elements to the template and then basing site pages on it, you can achieve a Enterprise, Performance, consistent look and feel throughout your site. Page templates don't appear on your public site. and Unlimited Editions As the template creator, you specify which elements users can edit in pages based on the template. Available (with limitations) By default, a page element in a template is “locked,” so users can't edit its contents in any in: Developer Edition template-based page unless you mark the page element as “editable.” Conversely, when users edit an editable page element in a template-based page, their changes are specific to that page and don't affect your template. For example, this main page template contains a non-editable header and navigation menu that are common to all the pages in the site (1). The main template also has an editable center panel (2) to house the page-specific content of each page that's based on it.

        Note: • Page templates must contain at least one editable page element. Otherwise, users can't edit site pages that are based on the template. • Panels are ideal for adding editable areas to page templates.

        You can use page templates to: • Save time and effort by laying out the page structure and using it as a starting point when you create site pages. For example, you could design a template with a fixed header panel and side menu, and an editable center panel, to which you add page-specific page elements and content. • Quickly make global updates to the layout or style of your website, as any changes you make to the template's design are reflected immediately in all the pages that use it. • Control how other users (such as contributors or other site administrators and designers) can modify site pages. For example, you may allow contributors to edit specific content blocks only. • Ensure your template design remains pixel-perfect. When users edit a page that's based on a template, their changes don't affect your template. • Reuse common design elements by creating child templates. • Allow contributors to create site pages that are based on the template.

        542 Extend Salesforce with Clicks, Not Code Site.com

        About Child Templates Child templates are a useful way to reuse common design elements for more complicated page layouts. For example, your website will probably have elements that are the same on every page in your site, such as a navigation menu. However, several pages may have elements that are common only to them, such as pages in a subsection of your site that include a subsection header. By using a child template, which is a template that's based on another template, you can reuse the main template design. Using our main page template as a base, the child template inherits the non-editable header and navigation menu (1), and an editable center panel (2) where we add the non-editable subsection header (3). We also need to add a new editable center panel (4) because the center panel of the main template is editable only in pages directly based on the main template.

        Now, any page based on the child template includes the non-editable main header, navigation menu, and subsection header, and an editable center panel (5) for that page's content.

        Best Practices • Plan your site structure and the layout of your pages. Taking the time to plan your website first saves time when you build your site. • Identify which elements are common to all the pages of your site, such as navigation menus or headers, as these are the elements you can add to the page template. • Use page templates wherever possible to promote content reuse and save time. • Try to keep the design of your main page template as simple as possible to make it easier to modify in the future. For more complicated site designs, use child templates to achieve maximum flexibility.

        SEE ALSO: Creating Site.com Page Templates Creating Site.com Pages Setting Up the Contributor’s Studio View Identifying Which Template a Site.com Page Uses

        543 Extend Salesforce with Clicks, Not Code Site.com

        Creating Site.com Page Templates

        A page template lets you define the layout and functionality of site pages in one location. By adding EDITIONS common page elements to the template and then basing site pages on it, you can achieve a consistent look and feel throughout your site. And because a template-based page inherits the Available in: Salesforce template's elements, you can make site-wide changes from one location. Classic (not available in all You can create a page template from a layout, or if you've already created a template, you can use orgs) it as a base to create a child template, which lets you reuse the design of the main template. Available for purchase in: Enterprise, Performance, Creating a Page Template from a Layout and Unlimited Editions To start from scratch with a completely blank template or use a basic page layout: Available (with limitations) in: Developer Edition 1. Hover over Page Templates on the Overview tab and click New, or click New Page Template in the Page Templates view. 2. Enter the page template name. Template names can’t include special characters, such as #, ?, USER PERMISSIONS or @. To build, edit, and manage 3. Click Layouts and select either a blank page or a predefined page layout, such as a page with Site.com sites: a header and footer. • Site.com Publisher User Note: Predefined page layouts use panels to create columns, headers, and footers. These field enabled on the user panels use inline CSS to set their position, so you can easily modify the layout after the detail page page is created. However, if you're familiar with CSS and prefer using CSS rules, you can AND remove the inline style by selecting the panel, deleting the code from the Code tab in Site administrator or the Style pane ( ), and clicking Apply. designer role assigned at the site level 4. Choose a layout mode: • To expand the page to fill the width of the browser window, click Full width. • To set the page width, click Fixed width and enter the width.

        5. Click Create. The page template opens. Next, you must complete the template.

        Tip: • By default, any template you create is only available to other site administrators and designers in your organization. To let contributors create pages based on the template, select Available to Contributor in the Properties pane ( ). • You can also create templates by converting or duplicating other pages.

        Creating a Child Template To use an existing template as a base for a child template: • The quickest option is to: 1. Select the template in the Page Templates view on the Overview tab and click > Create Child Template. Alternatively, click Page Actions > Create Child Template if the template is open. 2. Enter the page template name. Template names can’t include special characters, such as #, ?, or @. 3. Click Create. The child template opens.

        • Alternatively:

        544 Extend Salesforce with Clicks, Not Code Site.com

        1. Hover over Page Templates on the Overview tab and click New, or click New Page Template in the Page Templates view. 2. Enter the page template name. Template names can’t include special characters, such as #, ?, or @. 3. Click Page templates and select the page template. 4. Click Create. The child page template opens.

        Completing Your Template Once you've created a template, you must take the next steps to complete it: • Lay out the page template • Add other page elements to the template • Create editable areas • Create template-based site pages

        SEE ALSO: Creating Editable Template Areas Identifying Which Template a Site.com Page Uses Site.com Page Templates Overview Setting Up the Contributor’s Studio View

        Creating Editable Template Areas

        As the template creator, you specify which elements users can edit in pages based on the template. EDITIONS To make a page element editable in derived pages or child templates, select it on the page template or in the Page Structure pane ( ) and click > Make Editable, or select Editable in the Available in: Salesforce Classic (not available in all Properties pane ( ). orgs)

        When the page template is open, editable page elements are highlighted with a blue border on Available for purchase in: the page. They also display a pencil icon ( ) in the Page Structure pane and in the information Enterprise, Performance, popup that appears when you hover over the element on the page. and Unlimited Editions Available (with limitations) in: Developer Edition

        USER PERMISSIONS

        To build, edit, and manage SEE ALSO: Site.com sites: About Editable Page Elements • Site.com Setting Up the Contributor’s Studio View Publisher User field enabled on the user Creating Site.com Page Templates detail page AND Site administrator or designer role assigned at the site level

        545 Extend Salesforce with Clicks, Not Code Site.com

        About Editable Page Elements

        When you mark a page element as Editable on a page template, that page element becomes EDITIONS editable in any child pages or templates derived from the parent template. Consider these tips when creating editable page elements. Available in: Salesforce Classic (not available in all • Editable page elements are highlighted with a blue border in child pages and templates. orgs) • If you make a page element within a panel editable, you can’t also make the container panel editable. Available for purchase in: Enterprise, Performance, • Users can't alter the events, style, or properties of an editable page element in pages based on and Unlimited Editions the template. Available (with limitations) • Users can't resize, reposition, or delete editable page elements in pages based on the template. in: Developer Edition However, if the element's Auto Height property is enabled in the template, its height will adjust to fit the content of the template-based page. • Deleting an editable element from a page template removes it from all child pages and templates. • When you enable the Editable property of a page element, any pages or child templates based on the template also inherit the enabled status. In turn, the enabled status in the child template cascades to any of its children, and so on. If you don’t want its editability to cascade to any lower levels, disable the Editable property of a page element in a child template.

        Editable Page Elements for Contributors • Contributors can modify editable content blocks in site pages based on the template. They can also edit content blocks that you place in an editable panel in template-based site pages.

        Tip: To add a content block that only other site administrators or designers can edit, use custom code instead.

        • Contributors can add content blocks to editable panels in site pages based on the template. If you make widgets available to contributors, they can also add them to editable panels. • Site administrators and designers can edit any page element you make editable.

        Default Content in Editable Page Elements The content of all editable page elements on a child page or template is linked to the content of the editable elements on its parent page template. When you update the content of an editable page element on the parent template, the changes are pushed down to any child pages or page templates. However, if you modify the content of an editable page element at the child page or template level, you break the link between the elements, and any subsequent changes made to the page element on the parent template won't trickle down to its children. (To return control of the content to the parent template, select the editable page element on the page or in the Page Structure pane and click > Revert to Parent Content. When you do this, any custom content in the editable page element is lost.) Disabling the Editable property of a panel in a parent template overrides any changes made to that panel in child pages or templates. Changes to the panel at the child level disappear, and the panel reflects only the content from the parent template. However, the changes

        546 Extend Salesforce with Clicks, Not Code Site.com

        at the child level aren’t lost. Re-enabling the Editable property of the panel in the parent template restores the custom content previously added to its children. Any changes made to the element at the parent level will no longer show up.

        SEE ALSO: Creating Editable Template Areas Setting Up the Contributor’s Studio View Creating Site.com Page Templates Editing and Working With Site.com Page Elements

        Creating Site.com Pages

        As a site administrator or designer, when you create a site page, you can choose to base it on a EDITIONS page template. If you're creating several site pages that have common page elements, such as a navigation menu, you can save time and effort and achieve a consistent look and feel by creating Available in: Salesforce a page template first and then basing your site pages on it. Alternatively, if none of your site pages Classic (not available in all have a similar structure or if you need to create a one-off site page that doesn't follow the overall orgs) site design, such as a home page, you can create a page based on a basic layout. Available for purchase in: Enterprise, Performance, Creating Site Pages from a Layout and Unlimited Editions Start from scratch with a completely blank page or use a basic page layout. Available (with limitations) 1. Hover over Site Pages on the Overview tab and click New, or click New > Site Page when in: Developer Edition the Site Pages view is open. 2. Enter the site page name. Page names can’t include spaces or special characters, such as #, ?, USER PERMISSIONS or @. To build, edit, and manage 3. Click Layouts and select either a blank page or a predefined page layout, such as a page with Site.com sites: a header and footer. • Site.com Note: Predefined page layouts use panels to create columns, headers, and footers. These Publisher User panels use inline CSS to set their position, so you can easily modify the layout after the field enabled on the user detail page page is created. However, if you're familiar with CSS and prefer using CSS rules, you can remove the inline style by selecting the panel, deleting the code from the Code tab in AND the Style pane ( ), and clicking Apply. Site administrator or designer role assigned 4. Choose a layout mode: at the site level • To expand the page to fill the width of the browser window, click Full width. • To set the page width, click Fixed width and enter the width.

        5. Click Create. The site page opens.

        Creating Site Pages from a Page Template If you created a page template, you can base your site pages on it. The quickest option is to: 1. Select the template in the Page Templates view and click > Create Page from Template. Alternatively, click Page Actions > Create Page from Template if the template is open.

        547 Extend Salesforce with Clicks, Not Code Site.com

        2. Enter the site page name. Page names can’t include spaces or special characters, such as #, ?, or @. 3. Click Create. The site page opens. Alternatively: 1. Hover over Site Pages on the Overview tab and click New, or click New > Site Page when the Site Pages view is open. 2. Enter the site page name. Page names can’t include spaces or special characters, such as #, ?, or @. 3. Click Page templates and select the page template. 4. Click Create. The site page opens.

        Tip: You can also create pages by converting or duplicating other pages.

        SEE ALSO: Editing Site.com Pages as a Designer or Site Administrator Adding Site.com Page Elements

        Identifying Which Template a Site.com Page Uses

        When you edit a template-based page, you can't modify its non-editable page elements. You also EDITIONS can't reposition, resize, or delete editable page elements, or alter the events, properties, or style associated with them. To update these elements or properties, you must edit them in the template Available in: Salesforce the page is based on. Classic (not available in all To identify which page template a site page is based on: orgs) • Hover over the site page in the Sites Pages view on the Overview tab. An information popup Available for purchase in: appears that displays the page template's name. Enterprise, Performance, and Unlimited Editions Available (with limitations) in: Developer Edition

        USER PERMISSIONS

        To build, edit, and manage Site.com sites: • Site.com Publisher User field enabled on the user • Examine the Page Structure pane when the page is open. The template's name is displayed as detail page a link that you can click to open the template. AND Site administrator or designer role assigned at the site level

        548 Extend Salesforce with Clicks, Not Code Site.com

        Tip: To view and open the site pages associated with a particular page template, select or hover over the page template in the Page Templates view of the Overview tab and click > Edit Pages Based on Template. Click a listed site page to open it.

        SEE ALSO: Creating Site.com Page Templates Site.com Page Templates Overview

        Renaming, Duplicating, and Converting Pages

        When working with pages and templates, you can perform common tasks, such as renaming, EDITIONS deleting, or duplicating pages. To access more page options, select or hover over a page on the Site Pages view of the Overview Available in: Salesforce tab and click . Classic (not available in all orgs) To access more template options, select or hover over a template in the Page Templates view of the Overview tab and click . Available for purchase in: Enterprise, Performance, Alternatively, if the page or template is open, click on the toolbar. and Unlimited Editions The available options vary for pages and templates: Available (with limitations) in: Developer Edition Select To... Edit Open the page or template for editing. Alternatively, double-click the USER PERMISSIONS page or template. To build, edit, and manage Rename Change the page or template name. Site.com sites: • Site.com Preview View the page in a browser window. Publisher User Duplicate Create a copy of the page or template. field enabled on the user detail page Duplicating a page template doesn’t duplicate the pages or templates AND based on it. Site administrator or Delete Remove a page or template. You can't delete a template that has designer role assigned at the site level pages based on it.

        549 Extend Salesforce with Clicks, Not Code Site.com

        Select To... Create Child Template Create a child template based on the selected template.

        Create Page from Template Create a page based on the template.

        Convert Site Page to Template Change the page into a template.

        Convert Template to Site Page Change the template into a page. You can't convert a template that has pages based on it.

        Edit Pages Based on Template View and open the site pages that are based on the selected page template.

        Add IP Restrictions Control access to the page or template by restricting the range of permitted IP addresses. When you create a page that’s based on a template with IP restrictions, the page inherits the IP restrictions.

        SEE ALSO: Editing Site.com Pages as a Designer or Site Administrator Using Site.com Studio as a Site Administrator or Designer

        Changing a Page’s Doctype Property

        The Document Type Definition (DTD) or doctype of a page defines which version of HTML it’s using. EDITIONS This information is used by some browsers to trigger a standard rendering mode. By default, each page’s doctype is set to HTML5, which is the latest version, but you can change it to XHTML 1.0. Available in: Salesforce When the page is open: Classic (not available in all orgs) 1. Select the page in the Page Structure pane. 2. In the Properties pane, select an option in the Doctype drop-down list. Available for purchase in: Enterprise, Performance, and Unlimited Editions SEE ALSO: Available (with limitations) Changing a Page Element’s HTML Tag in: Developer Edition Adding Custom HTML Attributes HTML5 Semantic Page-Layout Tags USER PERMISSIONS

        To build, edit, and manage Site.com sites: • Site.com Publisher User field enabled on the user detail page AND Site administrator or designer role assigned at the site level

        550 Extend Salesforce with Clicks, Not Code Site.com

        Site.com Page Elements

        Page elements are the building blocks of your site pages and page templates. Combined, they EDITIONS provide the page's structure and content. When a site page or page template is open in Site.com Studio, these page elements are available Available in: Salesforce to site administrators and designers. Classic (not available in all orgs)

        Page Element Description Available for purchase in: Content Block Contains the page text, and can also house Enterprise, Performance, images, media, and hyperlinks. Also available to and Unlimited Editions contributors if the page has editable areas. Available (with limitations) in: Developer Edition Custom Code Lets you customize your site by adding markup, such as HTML and JavaScript for elements that aren't provided in Site.com Studio.

        Image Adds images directly to the page.

        Breadcrumb Adds a breadcrumb navigation element to the page.

        Menu Creates a menu that lets users navigate through the pages of your site.

        Panel Adds structure to the page and lets you group other page elements together.

        Button Adds a button to the page. You can use the actions in the Events pane to add functionality to the button.

        Form Lets you create web-to-lead forms or gather customer feedback, and submit the data to Salesforce objects.

        Input Fields Provides several field types to add to forms or pages. When added to a form, binds to fields in the form’s object. See Input Field Types.

        Data Element Must be contained in a data repeater. Binds to a field in the data repeater’s object and acts as a placeholder that shows the content of a specified field for the current record.

        Data Function Connects to a standard or custom Salesforce object, performs calculations on the returned results, and displays the calculation on the page.

        Data Repeater Connects to a Salesforce object and returns a dataset based on filters that you specify. Combines with data elements or custom code page elements to display the results on the page.

        551 Extend Salesforce with Clicks, Not Code Site.com

        Page Element Description Data Table Connects to a standard or custom Salesforce object, retrieves a data set based on the filter criteria that you specify, and displays one or more record as rows in the table.

        Adding Site.com Page Elements Editing and Working With Site.com Page Elements Laying Out Site.com Pages Using Panels Positioning Panels Using CSS Adding Images Directly to the Page Adding Content Blocks to Pages Content blocks contain the text of your website pages, and can also house images, videos, and hyperlinks. Designers and site administrators can add content blocks to pages when in Design Mode. Adding Custom Code to Pages Custom code lets you customize your site using markup, such as HTML and JavaScript. About the Site Map and Page Hierarchy Adding Custom HTML Attributes You can add custom HTML attributes to pages and page elements, which are rendered on the HTML tag of the page element. For example, this is useful when working with third-party frameworks that render page elements differently based on certain attributes. Changing a Page Element’s HTML Tag By default, panels, data repeaters, data elements, custom code, and content blocks are each defined as a div, but you can change this to any other HTML tag using the HTML Tag property. This gives you greater flexibility and control over how the page element is displayed on the page. HTML5 Semantic Page-Layout Tags

        SEE ALSO: Adding Site.com Page Elements Editing and Working With Site.com Page Elements

        552 Extend Salesforce with Clicks, Not Code Site.com

        Adding Site.com Page Elements

        Page elements are the building blocks of your site pages and page templates. Panel elements add EDITIONS structure to your pages. You can think of both pages and panels as “containers” for the page elements that you add to them. Available in: Salesforce If a site page or page template is based on another page template, you can only add page elements Classic (not available in all to editable panels, which are highlighted with a blue border on the page. orgs) Pages, panels, data repeaters, and forms are “container” page elements, so you can add other page Available for purchase in: elements to them when the page is open. Enterprise, Performance, and Unlimited Editions • In the Page Elements pane ( ), either: Available (with limitations) – Drag the page element onto the page canvas or container page element. in: Developer Edition – Click the page element, select where to place it in the popup that appears, and click Apply.

        • In the Page Structure pane ( ), hover over a container page element and click > Add USER PERMISSIONS Page Elements. Click the item you want to add or drag it onto the container page element. To build, edit, and manage • Select a container page element on the page and click > Add Page Elements. Click the Site.com sites: item you want to add or drag it into the container page element. • Site.com When you drag a page element into an editable panel, the page element displays a permitted icon Publisher User and a green border shows where you're placing the element. field enabled on the user detail page AND Site administrator or designer role assigned at the site level

        If you try dragging a page element into a panel that isn't editable, the page element displays a not-permitted icon.

        SEE ALSO: Editing and Working With Site.com Page Elements Adding Images Directly to the Page Adding Content Blocks to Pages Adding Custom Code to Pages Adding a Navigation Menu

        553 Extend Salesforce with Clicks, Not Code Site.com

        Editing and Working With Site.com Page Elements

        The Page Structure pane ( ) displays the hierarchy of all elements on the page and is a very EDITIONS useful way of selecting, moving, and reordering elements, particularly for more complicated page designs. Available in: Salesforce Classic (not available in all • To select a page element, either click it on the page, or select it in the Page Structure pane. This orgs) highlights the element on the page and displays the item's selector bar and Actions menu ( ). Available for purchase in: • To edit a page element, such as a content block, image, or custom code, either: Enterprise, Performance, and Unlimited Editions – Double-click the element on the page. Available (with limitations) – Select the element on the page and click > Edit on its selector bar. in: Developer Edition – Select or hover over the element in the Page Structure pane and click > Edit. – Click Edit Content on the toolbar (for content blocks only). USER PERMISSIONS • To move a page element, either: To build, edit, and manage – Select the element on the page and drag it to the correct position, or click > Move Site.com sites: on its selector bar. • Site.com – Drag the item to your preferred location in the Page Structure pane, or select it and click Publisher User > Move > Direction. You can also drag all page elements other than panels to field enabled on the user your preferred location in the Page Structure pane. detail page AND • To resize a page element, select it and drag the resize handles to the correct size. If the corner Site administrator or resize handles are grayed out, it means the item's Auto Height property is enabled, which adjusts designer role assigned the height depending on its contents. To resize it to a set height, disable the property by either at the site level deselecting Auto Height in the Properties pane ( ), or by clicking one of the bottom resize handles and clicking Disable Auto Height in the popup message that appears.

        Tip: If you disable the Auto Height property on an image, but you want it to retain its aspect ratio—the relationship of height to width—press and hold down the SHIFT key while you drag to resize it. Alternatively, if you're using CSS to style the page element, adjust the style of the class or ID that styles it.

        • To delete an element, select it and either: – Click > Delete on the item's selector bar. – Press DELETE. – Click on the toolbar. – In the Page Structure pane, click > Delete.

        If a site page or page template is based on another page template: • The content of all editable page elements on a child page or template is linked to the content of the editable elements on its parent page template. When you update the content of an editable page element on the parent template, the changes are pushed down to any child pages or page templates. However, if you modify the content of an editable page element at the child page or template level, you break the link between the elements, and any subsequent changes made to the page element on the parent template won't trickle down to its children. • You can't reposition or resize its page elements. However, if the element's Auto Height property is enabled in the template, the height will adjust to fit the content in the template-based page. To edit the page element, you must edit it in the page template. • You can't delete its page elements. To delete the page element, you must delete it from the page template.

        554 Extend Salesforce with Clicks, Not Code Site.com

        • You can't alter the events, properties, or style of an editable page element, such as its color, position, and size.

        SEE ALSO: Site.com Page Elements Adding Site.com Page Elements Adding Content Blocks to Pages Laying Out Site.com Pages Using Panels About Editable Page Elements

        Laying Out Site.com Pages Using Panels

        A panel is a useful layout tool that defines the logical divisions of your page and lets you group EDITIONS page elements together for easy movement and positioning. Think of it as a container for other page elements, including other panels, or as a div that wraps around the content placed within Available in: Salesforce it. Panels are ideal for adding editable areas to page templates. Classic (not available in all When you create a page template or site page, you can use predefined page layouts that include orgs) headers, footers, and columns, which are created using panels. Once created, you can then further Available for purchase in: modify the layout to match your site's design. Enterprise, Performance, If you need to add more divisions to the page and you're not familiar with CSS, the easiest method and Unlimited Editions is to use row and column panels. This feature adds panels with predefined CSS positioning to ensure Available (with limitations) they align correctly on the page. in: Developer Edition Note: Predefined page layouts, and row and column panels use inline CSS to set their position. If you're familiar with CSS and are using CSS rules to style your site, you can remove the inline USER PERMISSIONS CSS by deleting it from the Code tab in the Style pane ( ) and clicking Apply. To build, edit, and manage To add row and column panels to a page: Site.com sites: • Site.com 1. Select the page (the top folder icon) in the Page Structure pane ( ). Publisher User 2. Click > Add Rows and Column Panels. field enabled on the user detail page 3. Select the number of row or column panels you require. If the page already contains content, it is placed in the first new panel. AND To add a row panel: Site administrator or designer role assigned • Above a panel, select the panel on the page or in the Page Structure pane and click > at the site level Add Rows and Column Panels > Insert Row Above • Below a panel, select the panel on the page or in the Page Structure pane and click > Add Rows and Column Panels > Insert Row Below To add row and column panels to another panel: 1. Select the panel on the page or in the Page Structure pane. 2. Click > Add Rows and Column Panels. 3. Select the number of row or column panels you require. If the page already contains content, it is placed in the first new panel.

        To add a single panel, drag a Panel from the Page Elements pane ( ) onto the page.

        555 Extend Salesforce with Clicks, Not Code Site.com

        By default, the height of a panel automatically adjusts when you add content to it because its Auto Height property is enabled. You can disable the property to resize and reposition panels. If you hover over a panel on the page, an information popup appears that displays the width and height of the panel.

        When you drag a page element onto a panel, the edges change color, indicating that the element is now grouped within it. To remove the element from the group, drag it outside the panel.

        SEE ALSO: Adding Site.com Page Elements Positioning Panels Using CSS Changing a Page Element’s HTML Tag

        Positioning Panels Using CSS

        A panel is a useful layout tool that defines the logical divisions of your page. Using CSS, you can EDITIONS position panels and improve the layout of the page. Available in: Salesforce Adding Padding and Margins to Panels Classic (not available in all orgs) Two CSS properties—margins and padding—can help with your page layout by creating space between the rows and columns, and the content within. The margin property controls the space Available for purchase in: outside the panel between its border and outer edge, while the padding property controls the Enterprise, Performance, space between the panel's content and border. and Unlimited Editions To add margins and padding: Available (with limitations) in: Developer Edition 1. Select the panel. 2. Open the Dimensions section of the Style pane. USER PERMISSIONS 3. In the Margins section, either: • Set the margin width for all four sides by entering a value in the All text box and selecting To build, edit, and manage the unit of measurement. Site.com sites: • Site.com • Set the margin widths for the top, right, bottom, or left sides independently by entering a Publisher User value in the appropriate text box and selecting the unit of measurement. field enabled on the user detail page 4. Similarly, in the Padding section, set the padding widths as required. Adding padding increases the total width of the panel. For example, if you have a panel with a width of 500px and you AND add padding of 20px to all sides, the total width of the panel will be 540px. Site administrator or designer role assigned Tip: You can center a panel or block page element using the margin property. Enter 0 in at the site level the All text box and select Auto in the drop-down list.

        Creating Column Panels Using the Float Property If you need to add more divisions to the page and you're not familiar with CSS, the easiest method is to use row and column panels. Alternatively, using the CSS float property, you can position panels to the left or right to create columns. (When you add panels using

        556 Extend Salesforce with Clicks, Not Code Site.com

        the row and column panels feature, they're automatically positioned using the float property.) For example, you could add two single panels to a container panel and set both panel's float and width properties to create a two-column page layout. To create a column panel: 1. Select the panel. 2. Open the Layout section of the Style pane. 3. Click to float the panel to the left, or click to float the panel to the right. If you're creating a two-column layout, for example, ensure you set the float property of both panels. 4. Adjust the width of the panel to ensure the panels align correctly by either setting the width in the Dimensions section or dragging the panel's border on the page. For example, if you're creating two columns of equal width, set the width of both panels to 50%.

        Tip: When you use the float property, remember to set the overflow property of the container panel to “hidden.” This allows the container panel to grow as the height of the column panels increase. Select the container panel and in the Layout section of the Style pane, select Hidden in the Overflow drop-down list.

        SEE ALSO: Cascading Style Sheets Overview Laying Out Site.com Pages Using Panels

        Adding Images Directly to the Page

        As a site administrator or designer, you can add images directly to your site pages and page templates EDITIONS or you can add images to content blocks. To add an image directly to the page: Available in: Salesforce Classic (not available in all 1. Open the site page or page template. orgs) 2. Drag an Image from the Page Elements pane onto the page. Available for purchase in: 3. In the Add an Image dialog box, either: Enterprise, Performance, • Find an existing image by typing its name in the Search Image text box and selecting and Unlimited Editions it from the list. Available (with limitations) • Upload an image from your computer in the Upload tab by browsing to the image, clicking in: Developer Edition Upload, and selecting it from the list.

        4. Click Apply. The image is added to the page. USER PERMISSIONS 5. Enter a brief description of the image in the Alternative Text field in the Properties To build, edit, and manage pane. The description is used by screen reader users or as a substitute if the browser can’t display Site.com sites: the image. It can also help with search engine optimization (SEO). • Site.com Publisher User SEE ALSO: field enabled on the user detail page Adding Site.com Page Elements AND Editing and Working With Site.com Page Elements Site administrator or designer role assigned at the site level

        557 Extend Salesforce with Clicks, Not Code Site.com

        Adding Content Blocks to Pages

        Content blocks contain the text of your website pages, and can also house images, videos, and EDITIONS hyperlinks. Designers and site administrators can add content blocks to pages when in Design Mode. Available in: Salesforce To add a content block when the page is open, either drag it from the Page Elements pane onto Classic (not available in all the page or target a container page element. orgs) To edit a content block, double-click it. For greater control over the text, you can edit the HTML Available for purchase in: directly by selecting the content block and clicking > Edit HTML. Enterprise, Performance, and Unlimited Editions If you make a content block in a page template editable, contributors can edit the content block in any page based on the template. To add a content block that only other site administrators or Available (with limitations) designers can edit, use custom code instead. in: Developer Edition

        Understanding the Content Editing Toolbar USER PERMISSIONS Editing Content Blocks in Design Mode To build, edit, and manage Designers and site administrators can edit content blocks on the page. Content blocks contain Site.com sites: the text for site pages, and can also house images, videos, and hyperlinks. • Site.com Adding Images to Content Blocks in Design Mode Publisher User field enabled on the user Adding Video to Content Blocks in Design Mode detail page Attaching Hyperlinks to Text and Images in Design Mode AND Adding Anchors to Pages in Design Mode Site administrator or designer role assigned at the site level SEE ALSO: Adding Images to Content Blocks in Design Mode Attaching Hyperlinks to Text and Images in Design Mode

        Understanding the Content Editing Toolbar

        Designers and site administrators can edit content blocks when in Design mode. Content blocks EDITIONS contain the site page's text, along with images, videos, and hyperlinks. Available in: Salesforce Classic (not available in all orgs)

        Available for purchase in: Enterprise, Performance, and Unlimited Editions Available (with limitations) in: Developer Edition

        558 Extend Salesforce with Clicks, Not Code Site.com

        When in Design Mode, you can use the content editing toolbar to: • Undo and redo your edits, and remove the formatting of text copied and pasted from Microsoft® Office, which can often include hidden formatting (1). • Cut, copy, and paste text (2). • Apply direct formatting (3), such as: – Font family and size – Bold, italic, underline, subscript, superscript, and strikethrough – Font and highlight color

        • Control the text style and layout (4) by: – Applying paragraph and heading styles – Setting paragraph indentation – Left-aligning, centering, right-aligning, or justifying text – Inserting numbered or bulleted lists

        • Insert a table, and add rows, columns, and spacing (5). • Add images, videos, and special characters (6). • Add and remove hyperlinks and anchors (7).

        Tip: Avoid applying formatting, such as different fonts or highlighting, directly to text whenever possible. Instead, it’s best practice to use the paragraph and heading styles to quickly apply consistent formatting throughout the site. This also ensures that all page text is updated automatically if a site administrator or designer modifies the site's paragraph and heading styles.

        559 Extend Salesforce with Clicks, Not Code Site.com

        Editing Content Blocks in Design Mode

        Designers and site administrators can edit content blocks on the page. Content blocks contain the EDITIONS text for site pages, and can also house images, videos, and hyperlinks. When the page is open in Design Mode: Available in: Salesforce Classic (not available in all 1. Double-click the content block on the page. orgs) 2. Add or edit text and format it using the content editing toolbar. Available for purchase in: Tip: Enterprise, Performance, and Unlimited Editions • If you copy and paste text from Microsoft® Office, highlight the text and click to remove any hidden formatting, which can adversely affect how the text appears on Available (with limitations) the page. in: Developer Edition • Avoid applying formatting, such as different fonts or highlighting, directly to text whenever possible. Instead, it’s best practice to use the paragraph and heading styles USER PERMISSIONS to quickly apply consistent formatting throughout the site. This also ensures that all page text is updated automatically if a site administrator or designer modifies the To build, edit, and manage site's paragraph and heading styles. Site.com sites: • Site.com 3. Add images, videos, hyperlinks, or anchors as required. Publisher User field enabled on the user 4. Click Save. detail page Note: The content of all editable page elements on a child page or template is linked to the AND content of the editable elements on its parent page template. When you update the content Site administrator or of an editable page element on the parent template, the changes are pushed down to any designer role assigned child pages or page templates. However, if you modify the content of an editable page at the site level element at the child page or template level, you break the link between the elements, and any subsequent changes made to the page element on the parent template won't trickle down to its children.

        560 Extend Salesforce with Clicks, Not Code Site.com

        Adding Images to Content Blocks in Design Mode

        Designers and site administrators can add images to content blocks when viewing a page in Design EDITIONS Mode. When the page is open: Available in: Salesforce Classic (not available in all 1. Double-click the content block on the page. orgs) 2. Position your cursor where you want to insert the image and click . Available for purchase in: 3. In the Image Properties dialog box, either: Enterprise, Performance, • Enter a URL to an image in the Image URL field. and Unlimited Editions • Select an image from your website by clicking From Website and selecting the image in Available (with limitations) the list that appears. in: Developer Edition • Upload an image from your computer by opening the Upload tab, browsing to the image, and clicking Upload. USER PERMISSIONS

        4. Enter a brief description of the image in the Alternative text field. The description is To build, edit, and manage used by screen reader users or as a substitute if the browser can’t display the image. It can also Site.com sites: help with search engine optimization (SEO). • Site.com Publisher User 5. Optionally, preview how the image appears in relation to the text on the page and set: field enabled on the user • The width and height of the image detail page • How much space surrounds the image (which is controlled by the HSpace and VSpace AND properties) Site administrator or • How it aligns with the text on the page designer role assigned at the site level • The image border (for example, to set a dotted green border that's 10 pixels wide, you enter 10px dotted green in the Border field) To edit only content in Site.com sites: 6. Click Apply. • Site.com 7. Click Save. Contributor User AND SEE ALSO: Contributor role Editing Content Blocks in Design Mode assigned at the site level Understanding the Content Editing Toolbar Importing and Managing Assets

        561 Extend Salesforce with Clicks, Not Code Site.com

        Adding Video to Content Blocks in Design Mode ® ® ® ® ® Designers and site administrators can add YouTube , Google , Adobe Flash , Windows Media , EDITIONS and Apple QuickTime® videos to content blocks when viewing a page in Design Mode. When the page is open: Available in: Salesforce Classic (not available in all 1. Double-click the content block on the page. orgs) 2. Position your cursor where you want to insert the video and click . Available for purchase in: 3. In the Video Properties dialog box, select the video type and either: Enterprise, Performance, • Enter the URL to the video in the Video URL text box—for example, and Unlimited Editions http://www.youtube.com/watch?v=123abc. Available (with limitations) • Select a video from your website by clicking From Website and selecting the video in the in: Developer Edition list that appears. • Upload a video from your computer by opening the Upload tab, browsing to the image, USER PERMISSIONS and clicking Upload. To build, edit, and manage Note: You can only select or upload Flash, Windows Media, and QuickTime videos. Site.com sites: • Site.com 4. To specify how the video is displayed on the page, you can set: Publisher User field enabled on the user • The width and height of the video detail page • How much space surrounds the video (which is controlled by the HSpace and VSpace AND properties) Site administrator or • How it aligns with the text on the page designer role assigned at the site level You can also preview the video. 5. Click Apply. The video appears as an icon in the content block. To edit only content in Site.com sites: 6. Click Save. • Site.com Note: You can view all video types, other than Windows Media videos, when you preview Contributor User a page. AND Contributor role SEE ALSO: assigned at the site level Editing Content Blocks in Design Mode Understanding the Content Editing Toolbar

        562 Extend Salesforce with Clicks, Not Code Site.com

        Attaching Hyperlinks to Text and Images in Design Mode

        When viewing a page in Design Mode, designers and site administrators can create hyperlinks to: EDITIONS • External Web pages or websites • Pages and assets in the site Available in: Salesforce Classic (not available in all • Email messages orgs) • Anchors on the page Available for purchase in: When the page is open: Enterprise, Performance, 1. Double-click the content block on the page. and Unlimited Editions Available (with limitations) 2. Select the text or image that you want to attach a hyperlink to and click . in: Developer Edition 3. Select the link type in the Link to drop-down list. To link to: • A Web page: USER PERMISSIONS a. Select A URL. To build, edit, and manage b. Type the address in the URL field—for example, Site.com sites: http://www.externalsite.com. • Site.com c. Go to step 4. Publisher User field enabled on the user • A page or item in your site: detail page a. Select An item in your site. AND b. Select the item type, such as a page or image. Site administrator or designer role assigned URL c. Select the item. (If you can’t see the list of items, place your cursor in the field and at the site level press the DOWN key on your keyboard.) d. Go to step 4.

        • An anchor that you previously added to the page: a. Select An anchor on the page. b. Select the anchor in the drop-down list. Alternatively, enter a new anchor name and create the anchor afterwards. c. Go to step 5.

        • An email message: a. Select An email. b. Enter the recipient's email address and the message information. c. Go to step 5.

        Note: For content blocks in a data repeater, you can use expressions to add a custom link, such as a URL query string, to an item in your site or to a Web page.

        4. To select which window the item should open in, select an option in the Target drop-down list: • Popup window loads the item into a popup window. When you select this option, you can set the title for the popup and control its appearance and size with the options that appear. • New window (_blank) loads the item into a new, unnamed browser window. • Same window (_self) loads the item into the same frame or window as the link. This is the default setting. • Topmost window (_top) loads the item into the topmost parent frameset or window of the frame that contains the link.

        563 Extend Salesforce with Clicks, Not Code Site.com

        • Parent window (_parent) loads the item into the parent frameset or window of the frame that contains the link.

        5. Optionally, enter a tooltip description for the link. The tooltip displays as a pop-up when the user hovers over the link. 6. Click Apply. 7. Click Save.

        To delete a hyperlink, select it and click .

        SEE ALSO: Editing Content Blocks in Design Mode Understanding the Content Editing Toolbar

        Adding Anchors to Pages in Design Mode

        An anchor is an invisible marker that identifies a particular location on a page. If you’re a designer EDITIONS or site administrator, you can add an anchor to the page and then create a hyperlink that jumps to that specific location. This can be useful if a page is particularly long; for example, if your page has Available in: Salesforce several sections, you could add links to each section at the top of the page to aid navigation. Classic (not available in all When the page is open in Design Mode: orgs) 1. Double-click the content block on the page. Available for purchase in: 2. Enterprise, Performance, Place your cursor at the beginning of the line where you want to link to and click . and Unlimited Editions 3. Enter a name for the anchor and click Apply. Ideally, use a name that helps identify the anchor’s Available (with limitations) location on the page—for example, top. in: Developer Edition 4. Now create a hyperlink that links to the anchor. USER PERMISSIONS SEE ALSO: Attaching Hyperlinks to Text and Images in Design Mode To build, edit, and manage Site.com sites: Editing Content Blocks in Design Mode • Site.com Understanding the Content Editing Toolbar Publisher User field enabled on the user detail page AND Site administrator or designer role assigned at the site level

        To edit only content in Site.com sites: • Site.com Contributor User AND Contributor role assigned at the site level

        564 Extend Salesforce with Clicks, Not Code Site.com

        Adding Custom Code to Pages

        Custom code lets you customize your site using markup, such as HTML and JavaScript. EDITIONS • Add markup to a specific location on a page using the Custom Code page element. JavaScript added using the Custom Code page element loads when that part of the page loads. Available in: Salesforce • Add markup to the page head. JavaScript in the page head loads first. Classic (not available in all orgs) • Add JavaScript to the page body. JavaScript added to the page body is positioned at the end of the body tag and only loads when the DOM is ready. Available for purchase in: Enterprise, Performance, • Add a reference to a JavaScript file or library in the page head or body. and Unlimited Editions Tip: Available (with limitations) • Scripts can't execute while you're editing a page in Site.com Studio. To test your code, in: Developer Edition preview the page. • If you are building a Site.com site from an existing HTML site, avoid using the Custom USER PERMISSIONS Code page element to paste large chunks HTML from the original site. Instead, use the available page elements, such as panels, content blocks, and data tables. This will let you To build, edit, and manage make future updates and design changes much more easily. Site.com sites: • Site.com Publisher User Adding Markup Directly to the Page field enabled on the user detail page 1. Drag a Custom Code page element from the Page Element pane onto the page. AND 2. Enter the code in the Edit Code dialog box. Site administrator or 3. Click Save and Close to add the code directly to the page. designer role assigned at the site level Adding Markup to the Page Head 1. In the Scripts section of the Properties pane, click Configure in the Edit Head Markup section. 2. Enter the markup in the Edit HTML Code dialog box. 3. Click Save and Close to insert the markup into the page head.

        Adding JavaScript to the Page Body 1. In the Scripts section of the Properties pane, click Configure in the Edit Body Scripts section. 2. Enter the code in the Edit JavaScript Code dialog box. Don't add

        oncomplete="refreshFeed();"/>

        Account:
           
        Contact: 
        Status: 
           
        Priority: 
           
        Case Origin: 

        Note: When you redirect to a URL internal to your org, the action dialog closes upon completion or programmatically navigating away. If you set up the redirect to point to an external URL, the behavior can vary because an external URL opens in a new browser tab.

        732 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Requirements for Refreshing Host Pages If you want an object-specific or global custom action to refresh the feed on the page that hosts it, the Visualforce page you create to use as that action must: • Reference the publisher JavaScript file:

        Subject: 
        Account:
           
        Contact: 

        734 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        style="width:500px;height:92px;margin-top:4px;" />

        Status: 
           
        Priority: 
           
        Case Origin: 
        {!lastError}

        Requirements for Refreshing Host Pages To have an object-specific or global custom action refresh the feed on the page that hosts it, the Visualforce page you create to use as that action must: • Reference the publisher JavaScript file:

        784 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Override Standard Buttons and Tab Home Pages

        You can override the behavior of standard buttons—like New, View, or Edit—in Salesforce Classic, EDITIONS Lightning Experience, and mobile independently. You can also override the tab home page that displays when a user clicks a standard, custom, or external object tab. Available in: Salesforce Button overrides are global. For example, if you override the New button on opportunities, your Classic (not available in all replacement action takes effect wherever that action is available, such as: orgs) and Lightning Experience • Opportunities home page • Any opportunities related lists on other objects, such as accounts Available in: Enterprise, Performance, Unlimited, • Create New dropdown list in the Salesforce Classic sidebar and Developer Editions • Any browser bookmarks for this Salesforce page Visualforce overrides also 1. From the object management settings for the object you want to set an override for, go to available in: Contact Buttons, Links, and Actions. Manager, Group, and 2. Click Edit next to the button or tab home page you want to override. Professional Editions Record types available in: 3. For each experience—Salesforce Classic, Lightning Experience, or mobile—click the type of Professional, Enterprise, override you want associated with the action. Performance, Unlimited, • No override (use default)—Use a custom override provided by an installed package. If and Developer Editions there isn't one installed, the standard Salesforce behavior is used. • Standard page—This option is available only for subscribers who are overriding the actions on an installed custom object. If selected, the standard Salesforce behavior is used. USER PERMISSIONS • Custom s-control—Use the behavior from an s-control. This option isn’t supported for To override standard buttons mobile. and tab home pages: • Customize Application Important: Visualforce pages supersede s-controls. Organizations that haven’t previously used s-controls can’t create them. Existing s-controls are unaffected, and To reset button and tab home page overrides: can still be edited. • Customize Application • Lightning component—Use the behavior from a Lightning component. Supported only for the Edit, New, New Event, Tab and View actions. This option isn’t supported for Salesforce Classic. • Lightning page—Use the behavior from the Lightning record page assigned as the org default for the object. This option is available only for the View action in Lightning Experience. • Visualforce page—Use the behavior from a Visualforce page. • Use the Salesforce Classic override—Inherits the behavior from the Salesforce Classic Override setting.

        Important: Before you override a standard button with a Lightning component or Visualforce page, review implementation details in the respective developer guides.

        4. Select the name of the s-control, Lightning component, Lightning page, or Visualforce page you want to run when users click the button or tab. When overriding the New button with a Visualforce page, you can choose to skip the record type selection page. If you do, new records you create aren’t forwarded to the record type selection page. Salesforce assumes that your Visualforce page is already handling record types.

        Important: When a Salesforce mobile app user clicks New to create a product, the user must select a record type even if the Skip record type selection page option is selected in Setup.

        5. Click Save.

        785 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Note: A standard button (New, Edit, View, Delete, and Clone) overridden with a Visualforce page doesn’t show up in the Salesforce mobile app unless the Visualforce page is enabled for Salesforce mobile apps. Overriding standard list and tab controls isn’t supported in mobile.

        Standard Action Overrides For standard actions, such as Delete, Edit, List, New, Tab, and View, you can provide a custom user interface for the action, called an action override. Use action overrides when your business model requires a more customized user experience than the Salesforce standard page provides. Considerations for Overriding Standard Buttons Before you override a standard button, review these considerations. Remove Overrides for Standard Buttons and Tab Home Pages

        SEE ALSO: Considerations for Overriding Standard Buttons Remove Overrides for Standard Buttons and Tab Home Pages Visualforce Developer Guide : Overriding Buttons, Links, and Tabs with Visualforce Lightning Aura Components Developer Guide : Standard Actions and Overrides Basics

        Standard Action Overrides

        For standard actions, such as Delete, Edit, List, New, Tab, and View, you can provide a custom user EDITIONS interface for the action, called an action override. Use action overrides when your business model requires a more customized user experience than the Salesforce standard page provides. Available in: Salesforce You can specify a different override for each user experience, with the following guidelines. Classic (not available in all orgs) and Lightning • Salesforce Classic—Use a Visualforce page as the action override. Experience • Lightning Experience and the Salesforce mobile app —You can override the Edit, New, Tab, and View standard actions on most standard and all custom objects. Available in: Enterprise, Performance, Unlimited, • Lightning Experience—Use a Lightning component as the action override for the Edit, New, and Developer Editions and Tab actions. Use a Lightning page or a Lightning component as the action override for the View action. Visualforce overrides also available in: Contact • Experience Builder sites—Use a custom Lightning component to replace standard forms when Manager, Group, and users click the New or Edit button. The action you choose in Lightning Experience is the same Professional Editions action that you use to override actions in Experience Builder sites. Record types available in: • Salesforce app—Use a Lightning component as the action override. Professional, Enterprise, • Managed packages—Developers can include action overrides as package defaults, and managed Performance, Unlimited, package subscribers can specify local overrides as alternatives to the default overrides. and Developer Editions

        Note: For Salesforce Classic, usually a Visualforce page is the only supported override option. Under certain conditions, you can use existing s-controls as overrides for Salesforce Classic. USER PERMISSIONS However, s-controls have been deprecated since the Spring ’09 release. We recommend using Visualforce pages instead. To override standard buttons: • Customize Application

        786 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Assign Action Overrides To assign a Visualforce page or Lightning component as an override, first create the page or component (or use one created by a Salesforce developer in your org). It’s important to understand the action override options for each user experience and how your selections for each one can affect the others. Assign a Lightning Record Page Override for the View Action When you create an override for the View action for Lightning Experience, you can use either a Lightning record page or a Lightning component. To use a Lightning record page as an override, you must activate the page as the org default in the Lightning App Builder. Action Overrides in Managed Packages In a managed package, overrides specified by the package developer are included as default overrides. The package subscriber can specify local overrides for each user experience to use instead of the package default overrides. Package default overrides impact the options and behaviors of local overrides. Action Overrides in Experience Builder Sites Personalize your Experience Builder site users’ experience by adding a custom Lightning component to replace standard forms when users click the New or Edit button. Use action overrides when your site and portal users require a more customized user experience than the Salesforce standard page provides.

        SEE ALSO: Trailhead: Introduction to Creating Visualforce Pages Trailhead: Build a Lightning Component to Override a Standard Action

        Assign Action Overrides

        To assign a Visualforce page or Lightning component as an override, first create the page or EDITIONS component (or use one created by a Salesforce developer in your org). It’s important to understand the action override options for each user experience and how your selections for each one can Available in: Salesforce affect the others. Classic (not available in all When assigning overrides, keep in mind the following requirements. orgs) and Lightning Experience • Salesforce Classic—To use a Visualforce page to override an action, the Visualforce page must use the standard controller for the object on which the action appears. To use a Visualforce Available in: Enterprise, page to override a tab, the Visualforce page must use the standard list controller for that tab’s Performance, Unlimited, associated object. and Developer Editions • Lightning Experience and the Salesforce mobile app—To make a Visualforce page available Visualforce overrides also for use as an override, select Available for Lightning Experience, Experience Builder sites, available in: Contact and the mobile app in the Visualforce Pages setup panel. Manager, Group, and Professional Editions 1. Click Setup, select Object Manager, and select the object that you want to modify. Record types available in: 2. In the Object Manager settings list, select Buttons, Links, and Actions. Professional, Enterprise, 3. In the row for the action you want to modify, select Edit from the dropdown menu. Performance, Unlimited, and Developer Editions 4. Specify the override option for each user experience.

        USER PERMISSIONS

        To override standard buttons: • Customize Application

        787 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Example: This Override Properties panel specifies a Visualforce page for Salesforce Classic and a Lightning component for Lightning Experience. The mobile override specifies the Salesforce Classic override, so mobile users see the Visualforce page.

        SEE ALSO: Trailhead: Introduction to Creating Visualforce Pages Trailhead: Build a Lightning Component to Override a Standard Action

        Assign a Lightning Record Page Override for the View Action

        When you create an override for the View action for Lightning Experience, you can use either a EDITIONS Lightning record page or a Lightning component. To use a Lightning record page as an override, you must activate the page as the org default in the Lightning App Builder. Available in: Salesforce 1. Click Setup, enter Lightning App in the Quick Find box, and select Lightning App Classic (not available in all Builder. orgs) and Lightning Experience 2. In the Setup panel for the Lightning App Builder, click Edit next to the Lightning page that you want to use as an override. Available in: Enterprise, Performance, Unlimited, 3. In the Lightning App Builder, click Activation. and Developer Editions 4. On the Activation page, select Org Default and click Close. After you activate the Lightning Visualforce overrides also page as the org default, the page is selected as the Lightning Experience override for the View available in: Contact action in the Override Properties panel. Manager, Group, and 5. To remove the Lightning page as the override, return to the Activation page in the Lightning Professional Editions App Builder, click Remove as Org Default, and click Close.. Record types available in: Professional, Enterprise, Performance, Unlimited, and Developer Editions

        USER PERMISSIONS

        To override standard buttons: • Customize Application

        788 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Example: In this Override Properties panel, the Lightning page Account_Lightning_Page_Test is the specified Lightning Experience override for the View action.

        SEE ALSO: Create and Configure Lightning Experience Record Pages

        Action Overrides in Managed Packages

        In a managed package, overrides specified by the package developer are included as default EDITIONS overrides. The package subscriber can specify local overrides for each user experience to use instead of the package default overrides. Package default overrides impact the options and behaviors of Available in: Salesforce local overrides. Classic (not available in all Several rules determine local override behaviors in a managed package. orgs) and Lightning Experience • For each user experience—When a package subscriber specifies a local override, the local override takes precedence over the package default override. If no local override is specified Available in: Enterprise, for a user experience, the package default override for that user experience is used. Performance, Unlimited, • For Lightning Experience and the Salesforce mobile app—If no local override is specified and and Developer Editions no package default override is specified, the local override inherits from Salesforce Classic. Either Visualforce overrides also the Salesforce Classic local override (if it is specified) is used, or the Salesforce Classic package available in: Contact default override (if no Salesforce Classic local override is specified) is used. Manager, Group, and Professional Editions • A package developer can remove or replace the default overrides when updating a managed package. The new default overrides are available for package subscribers when they install the Record types available in: updated package. Professional, Enterprise, Performance, Unlimited, Example: The Override Properties panel for a managed package identifies the override and Developer Editions defaults and the local override options for each user experience. The available local override options vary based on the override defaults. • No override (use default)—Uses either the override default Visualforce page or the USER PERMISSIONS Salesforce standard page if no Visualforce page is specified. To override standard • Standard page—Available for package subscribers only if the package default override buttons: for the given user experience is a Visualforce page or Lightning component. • Customize Application • Lightning component—The specified component takes precedence over the package default override for the given user experience.

        789 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        • Use the package default override—Available for package subscribers only if the package default override for the given user experience is a Lightning component. • Use the Salesforce Classic override—Available for package subscribers only if the package default override for the given user experience is the Salesforce standard page. Option inherits from the local Salesforce Classic override.

        Action Overrides in Experience Builder Sites

        Personalize your Experience Builder site users’ experience by adding a custom Lightning component EDITIONS to replace standard forms when users click the New or Edit button. Use action overrides when your site and portal users require a more customized user experience than the Salesforce standard page Available in: Salesforce provides. Classic (not available in all To override actions in an Experience Builder site: orgs) and Lightning Experience 1. In Salesforce Setup, enter Digital Experiences in the Quick Find box and select All Sites. Available in: Essentials,Enterprise, 2. Next to the site that you want to override, click Workspaces. Performance, Unlimited, 3. Click Administration. and Developer Editions 4. Select Override standard actions with the Lightning component. 5. Click Save. USER PERMISSIONS

        Note: The action you choose in Lightning Experience is the same action that you use to To override standard override actions in Experience Builder sites. buttons: • Customize Application

        790 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Considerations for Overriding Standard Buttons

        Before you override a standard button, review these considerations. EDITIONS

        Implementation Tips Available in: Salesforce Classic (not available in all Important: Before you override a standard button with a Lightning component or Visualforce orgs) and Lightning page, review implementation details in the respective developer guides. Experience

        • If you override a standard button in Salesforce, that button is still available in Connect Offline, Available in: Enterprise, but it retains its original behavior. Performance, Unlimited, • The View standard button refers to all links in Salesforce that display the detail page for a record. and Developer Editions Overriding the View standard button reroutes all these links. Visualforce overrides also • The View action is the only one that supports overrides with a Lightning record page. To make available in: Contact a Lightning record page available for a View action override, assign the page as the org default Manager, Group, and for its associated object by activating it in the Lightning App Builder. Professional Editions • If you have the View action overridden with a Visualforce page in Salesforce Classic, the Setup Record types available in: menu on that object record page in Lightning Experience displays the Edit Page option. Selecting Professional, Enterprise, Edit Page in Lightning Experience on an object page that’s overridden with a Visualforce page Performance, Unlimited, in Salesforce Classic lets you create a custom Lightning Experience record page for that object and Developer Editions in the Lightning App Builder. • If a button isn’t available for overrides, you can still hide it on the page layout. USER PERMISSIONS • Button overrides affect everywhere that action or behavior is available. For example, overriding the New button on an account also overrides the account option in the Create New drop-down To override standard list in the Salesforce Classic sidebar. buttons: • Customize Application • Person Account records use any standard button overrides you make for accounts. Person Account records also use any overrides for the View Self-Service and Enable Self-Service buttons you make for contacts. • If your organization uses the Console tab, overrides for the Edit and View buttons for an object don’t affect the Edit and View buttons in the mini page layouts. Pages that display due to overrides display in the console without the header or sidebar. • To replace a standard button with a custom button, first define the custom button, then customize the page layout to hide the standard button and display the custom one in its place. • When you override the Edit button with a Visualforce page, you’re also overriding default logic that checks whether the record has been locked for approval. However, you can perform the same check by implementing the Approval.lock Apex method.

        Limitations • You can override buttons on the detail page but not the edit page of a record. • You can only override these standard buttons: New, View, Edit, and Delete. • For tasks and events in Salesforce Classic, you can only override standard buttons and links, with the exception of the New Event button. Overrides for that button aren’t supported in Salesforce Classic. In Lightning Experience, you can override the New Event button on the Calendar page with a Lightning component for a custom object, but clicking a timeslot always creates a standard event. • You can’t change buttons on lookup dialogs, reports, or tabs. However, you can change the buttons on list view and search result layouts under search layouts. • Action overrides on the New standard button don't work on New Object links in lookup searches.

        791 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        • Action overrides on the New standard button for objects with multiple record types aren’t supported in the Outlook and Gmail integrations unless you choose to skip the record type selection page. • You can’t relabel or relocate standard buttons on a record detail page. • When overriding tabs or buttons with a Lightning component, you can select only Lightning components that implement the lightning:actionOverride interface. • A standard button (New, Edit, View, Delete, and Clone) overridden with a Visualforce page doesn’t show up in the Salesforce mobile app unless the Visualforce page is enabled for Salesforce mobile apps. Overriding standard list and tab controls isn’t supported in mobile. • When overriding tabs with a Visualforce page, you can select only Visualforce pages that use the standard list controller for that tab’s associated object, pages with a custom controller, or pages with no controller. • When overriding lists with a Visualforce page, you can select only Visualforce pages that use a standard list controller. • When overriding buttons with a Visualforce page, you can select only Visualforce pages that use the standard controller for the object on which the button appears. For example, if you want to use a page to override the Edit button on accounts, the page markup must include the standardController="Account" attribute on the tag:

        ... page content here ...

        SEE ALSO: Override Standard Buttons and Tab Home Pages Visualforce Developer Guide : Overriding Buttons, Links, and Tabs with Visualforce Lightning Aura Components Developer Guide : Standard Actions and Overrides Basics

        792 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Remove Overrides for Standard Buttons and Tab Home Pages

        To remove overrides for actions that support overrides for Classic, Lightning, and mobile web: EDITIONS 1. From the management settings for the object whose button you want to edit, go to Buttons, Links, and Actions. Available in: Salesforce Classic (not available in all 2. Click Edit next to the overridden button or tab link. orgs) and Lightning 3. Select No override (use default) for the Salesforce Classic override Experience

        4. To also remove overrides for Lightning Experience or Mobile, select Use the Salesforce Classic Available in: Enterprise, override. Performance, Unlimited, 5. Click Save and Developer Editions Visualforce overrides also available in: Contact Manager, Group, and Professional Editions Record types available in: Professional, Enterprise, Performance, Unlimited, and Developer Editions

        USER PERMISSIONS

        To override standard buttons and tab home pages: • Customize Application To reset button and tab home page overrides: • Customize Application

        To remove overrides for actions that support only Classic: 1. From the management settings for the object whose button you want to edit, go to Buttons, Links, and Actions. 2. Click Edit next to the overridden button or tab link. 3. Select No override (use default) for Salesforce Classic Override. 4. Click Save

        793 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Custom Button and Link Samples

        Use samples of custom Salesforce buttons and links to determine whether they can work for you. USER PERMISSIONS

        Custom Link Example: Link to Documents To create or change custom buttons or links: Use custom links to reference documents from a Salesforce record detail page. • Customize Application Custom Link Example: Link to Files in Chatter Use custom links to reference files from Chatter. EDITIONS Custom Link Example: Link to Reports Use custom links to run reports with filtered results from a Salesforce record detail page. For Available in: Salesforce example, let’s say you frequently run a mailing list report for the contacts related to an account. Classic (not available in all You can create a custom link for accounts that links directly to a report that is automatically orgs) filtered to the account you are viewing. In this case, your custom link must pass the account’s Custom buttons and links unique record ID to the report. are available in: All Editions Create a Custom Button for Performing Mass Deletes Visualforce pages and This example creates a JavaScript custom button for Salesforce Classic that can be added to s-controls are available in: activity-related lists and list views and allows users to delete selected records at the same time. Contact Manager, Group, Displaying Alerts Professional, Enterprise, Performance, Unlimited, This example creates a button that opens a popup dialog with a welcome message containing and Developer Editions the user's first name. Getting Record IDs This example creates a button that opens a popup window listing record IDs for user selected records. This is useful when testing to ensure you have the correct record IDs before processing them further. Passing Record IDs to an External System You can use Salesforce record IDs as unique identifiers for integrating with an external system. This example creates a button that calls a Visualforce page to determine the record IDs of selected records and passes them in a URL query parameter to an external Web page called “www.yourwebsitehere.com.” Launching Record Create Page with Default Field Values Construct custom buttons and links that pass default field values to a record create page. This feature applies to Lightning Experience in all editions. This feature doesn’t apply to Lightning Out, Experience Builder sites, or the Salesforce mobile app. Reopening Cases This example creates a button that can be added to cases related lists so users can reopen several cases on an opportunity at once.

        794 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        International Maps This example creates a link that displays a country-specific Google map.

        SEE ALSO: Define Custom Buttons and Links

        Custom Link Example: Link to Documents

        Use custom links to reference documents from a Salesforce record detail page. EDITIONS 1. Create a folder on the Documents tab to which all users have access. 2. Upload the document to that folder. Available in: Salesforce Classic (not available in all 3. From the Documents tab, choose the folder and click Go. orgs)

        4. Click View next to the document. Custom buttons and links 5. Copy the document’s URL from the browser. For example, are available in: All Editions Visualforce pages and s-controls are available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions

        USER PERMISSIONS

        To create or change custom buttons or links: • Customize Application

        https://MyDomainName.my.salesforce.com/servlet/servlet.FileDownload?file=015300000000xvU. 6. Use everything after the domain portion of the URL to create your custom link. Using the example in the previous step, your link would point to /servlet/servlet.FileDownload?file=015300000000xvU.

        SEE ALSO: Constructing Effective Custom URL Buttons and Links Custom Link Example: Link to Files in Chatter Custom Link Example: Link to Reports

        795 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Custom Link Example: Link to Files in Chatter

        Use custom links to reference files from Chatter. EDITIONS 1. Upload a file to the Files tab. 2. When the upload is finished, from the Upload dialog box, click Share settings. Available in: Salesforce Classic (not available in all 3. Click Anyone with link. orgs)

        4. Copy the document’s URL from the Share via Link dialog box. For example, Custom buttons and links are available in: All Editions Visualforce pages and s-controls are available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions

        USER PERMISSIONS

        To create or change custom buttons or links: • Customize Application

        https://MyDomainName.my.salesforce.com/sfc/p/D0000000JsES/a/D000000001dd/aiq8UPJ5q5i6Fs4Sz.IQLKUERsWYdbAm320cjqWnkfk=. 5. Use everything after the domain portion of the URL to create your custom link. Using the example in the previous step, your link would point to /sfc/p/D0000000JsES/a/D000000001dd/aiq8UPJ5q5i6Fs4Sz.IQLKUERsWYdbAm320cjqWnkfk=.

        SEE ALSO: Constructing Effective Custom URL Buttons and Links Custom Link Example: Link to Documents Custom Link Example: Link to Reports

        796 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Custom Link Example: Link to Reports

        Use custom links to run reports with filtered results from a Salesforce record detail page. For example, EDITIONS let’s say you frequently run a mailing list report for the contacts related to an account. You can create a custom link for accounts that links directly to a report that is automatically filtered to the Available in: Salesforce account you are viewing. In this case, your custom link must pass the account’s unique record ID Classic (not available in all to the report. orgs) 1. Copy the ID for the type of record by which you want to filter your report (in this example, an Custom buttons and links account). To do so, view the record and copy the 15-character ID from the last part of the URL. are available in: All Editions For example, https://MyDomainName.my.salesforce.com/001200030012j3J. Visualforce pages and s-controls are available in: 2. From the Reports tab, create the report you want by either customizing a standard report or Contact Manager, Group, creating a custom report. Professional, Enterprise, 3. Filter the report by the record ID you copied. For example, “Account ID equals 001200030012j3J”. Performance, Unlimited, and Developer Editions 4. Run the report to verify that it contains the data you expect. 5. Click Customize. USER PERMISSIONS 6. Click Save or Save As to save the report to a public folder accessible by the appropriate users. Save doesn’t create a custom report, whereas Save As does. To create or change custom 7. Run the report and copy the report’s URL from the browser. buttons or links: • Customize Application 8. Begin creating your custom link. Set the Content Source field to URL. In the large formula text area, paste the report URL you copied. Remember to omit the domain portion https://MyDomainName.my.salesforce.com. 9. Add the custom link to the appropriate page layouts. 10. Verify that the new custom link works correctly.

        Tip: When creating a report for use in a custom link, set date ranges and report options generically so that report results include data that can be useful for multiple users. For example, if you set a date range using the “Created Date” of a record, set the Start Date far enough in the past to not exclude any relevant records and leave the End Date blank. If you scope the report to just “My” records, the report might not include all records that a user can see. Try setting the report options to “All visible” records.

        SEE ALSO: Constructing Effective Custom URL Buttons and Links Custom Link Example: Link to Documents Custom Link Example: Link to Files in Chatter

        797 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Create a Custom Button for Performing Mass Deletes

        This example creates a JavaScript custom button for Salesforce Classic that can be added to USER PERMISSIONS activity-related lists and list views and allows users to delete selected records at the same time. To create or change custom Note: JavaScript custom buttons are supported in all editions, in Salesforce Classic only. The buttons or links: mass delete function described here doesn’t work in editions where the API isn’t enabled. • Customize Application 1. Define a button for events with the following attributes. • Display Type List Button EDITIONS Note: Select Display Checkboxes (for Multi-Record Selection) so users can select Available in: Salesforce multiple records in the list before clicking the button. Classic (not available in all • Behavior Execute JavaScript orgs) • Content Source OnClick JavaScript Custom buttons and links • Use the following sample code. are available in: All Editions Visualforce pages and s-controls are available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions

        {!REQUIRESCRIPT("/soap/ajax/9.0/connection.js")}

        var records = {!GETRECORDIDS( $ObjectType.Event )}; var taskRecords = {!GETRECORDIDS( $ObjectType.Task)}; records = records.concat(taskRecords);

        if (records[0] == null) { alert("Please select at least one record.") } else {

        var errors = []; var result = sforce.connection.deleteIds(records); if (result && result.length){ var numFailed = 0; var numSucceeded = 0; for (var i = 0; i < result.length; i++){ var res = result[i]; if (res && res.success == 'true'){ numSucceeded++; } else { var es = res.getArray("errors"); if (es.length > 0) { errors.push(es[0].message); } numFailed++; } }

        798 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        if (numFailed > 0){ alert("Failed: " + numFailed + "\nSucceeded: " + numSucceeded + " \n Due to: " + errors.join("\n")); } else { alert("Number of records deleted: " + numSucceeded); } } window.location.reload(); }

        2. Add the button to your activity list views. 3. Add the button to any page layout that contains an activity-related list. The button deletes any selected task or event in the list. You can install custom buttons from the Mass Delete app at http://sites.force.com/appexchange.

        SEE ALSO: Custom Button and Link Samples

        Displaying Alerts

        This example creates a button that opens a popup dialog with a welcome message containing the USER PERMISSIONS user's first name. 1. Define a button with the following attributes. To create or change custom buttons or links: • Display Type Detail Page Button • Customize Application • Behavior Execute JavaScript • Content Source OnClick JavaScript EDITIONS • Use the following sample code. Available in: Salesforce Classic (not available in all orgs)

        Custom buttons and links are available in: All Editions Visualforce pages and s-controls are available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions

        alert ("Hello {!$User.FirstName}");

        2. Add the button to the appropriate page layout.

        SEE ALSO: Custom Button and Link Samples

        799 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Getting Record IDs

        This example creates a button that opens a popup window listing record IDs for user selected USER PERMISSIONS records. This is useful when testing to ensure you have the correct record IDs before processing them further. To create or change custom 1. Define a button with the following attributes. buttons or links: • Customize Application • Display Type List Button

        Note: Select Display Checkboxes (for Multi-Record Selection) so users can select EDITIONS multiple records in the list before clicking the button. Available in: Salesforce • Behavior Execute JavaScript Classic (not available in all • Content Source OnClick JavaScript orgs) • Use the following sample code. Custom buttons and links are available in: All Editions Visualforce pages and s-controls are available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions

        idArray = {!GETRECORDIDS($ObjectType.Contact)}; alert("The Ids you have selected are: "+idArray);

        Note: This example is for contacts. Change the object type for a different type of record.

        2. Add the button to the appropriate related list on a page layout or list view layout.

        SEE ALSO: Custom Button and Link Samples

        800 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Passing Record IDs to an External System

        You can use Salesforce record IDs as unique identifiers for integrating with an external system. This USER PERMISSIONS example creates a button that calls a Visualforce page to determine the record IDs of selected records and passes them in a URL query parameter to an external Web page called To create or change custom “www.yourwebsitehere.com.” buttons or links: • Customize Application 1. Create a Visualforce page that uses the GETRECORDIDS function to retrieve a list of selected records: EDITIONS

        Available in: Salesforce Classic (not available in all orgs)

        Custom buttons and links are available in: All Editions Visualforce pages and s-controls are available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions

        Note: Replace www.yourwebsitehere.com with your own URL.

        2. Define a button for accounts with the following attributes. • Display Type List Button

        Note: Select Display Checkboxes (for Multi-Record Selection) so users can select multiple records in the list before clicking the button.

        • Behavior Display in existing window with sidebar • Content Source Visualforce Page • Select the Visualforce page you created in the first step.

        3. Add the button to the appropriate page layout or list view layout.

        SEE ALSO: Custom Button and Link Samples

        801 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Launching Record Create Page with Default Field Values Construct custom buttons and links that pass default field values to a record create page. This feature applies to Lightning Experience in all editions. This feature doesn’t apply to Lightning Out, Experience Builder sites, or the Salesforce mobile app. To construct a custom button or link, encode any field that is read from a record and contains special characters, like commas. Use this sample formula:

        /lightning/o/Account/new?defaultFieldValues= Name={!URLENCODE(Account.Name)}, OwnerId={!Account.OwnerId}, AccountNumber={!URLENCODE(Account.AccountNumber)}, NumberOfEmployees=35000, CustomCheckbox__c={!IF(Account.SomeCheckbox__c, true, false)}

        Important: The URLENCODE function works only when creating custom buttons and links. You can’t use it for custom fields. The TEXT function is supported for custom number fields, but it returns only the numbers without any separators, like commas.

        Note: Passing the RecordTypeId to defaultFieldValues isn’t yet supported. The recordTypeId influences routing behavior, layout assignment, and page assignment, so you can see unexpected results if you try to use it.

        Reopening Cases

        This example creates a button that can be added to cases related lists so users can reopen several USER PERMISSIONS cases on an opportunity at once. 1. Define a button for cases with the following attributes. To create or change custom buttons or links: • Display Type List Button • Customize Application Note: Select Display Checkboxes (for Multi-Record Selection) so users can select multiple records in the list before clicking the button. EDITIONS • Behavior Execute JavaScript Available in: Salesforce • Content Source OnClick JavaScript Classic (not available in all • Use the following sample code. orgs) Custom buttons and links are available in: All Editions Visualforce pages and s-controls are available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions

        {!REQUIRESCRIPT ("/soap/ajax/13.0/connection.js")} var records = {!GETRECORDIDS($ObjectType.Sample)}; var newRecords = []; if (records[0] == null) { alert("Please select at least one row") } else { for (var n=0; n

        802 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        Note: This example references the AJAX Toolkit, which is available if API access is enabled. See https://developer.salesforce.com/page/Integration.

        2. Add the button to your opportunity page layouts by editing the Cases related list.

        Tip: Use this button on any page layout that contains the cases related list, such as account or contact page layouts.

        Note: Notice the check for records[0] == null, which displays a message to users when they don’t select at least one record in the list.

        SEE ALSO: Custom Button and Link Samples

        International Maps

        This example creates a link that displays a country-specific Google map. USER PERMISSIONS 1. Define a link for accounts with the following attributes. To create or change custom • Display Type Detail Page Link buttons or links: • Behavior Display in new window • Customize Application • Content Source URL • Use the following sample code. EDITIONS

        Available in: Salesforce Classic (not available in all orgs)

        Custom buttons and links are available in: All Editions Visualforce pages and s-controls are available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions

        {! IF(Sample.BillingCountry = "US", "http://maps.google.com/maps?q="&Sample.BillingStreet& "+"&Sample.BillingCity&"+"&Sample.BillingState&"+"&Sample.BillingCountry, (IF(Sample.BillingCountry = "UK", "http://maps.google.co.uk/maps?q="&Sample.BillingStreet &"+"&Sample.BillingCity&"+"&Sample.BillingCountry, "http://maps.google.com"))) }

        803 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        2. Add the link to your account page layout.

        SEE ALSO: Custom Button and Link Samples

        Custom Button and Link Considerations

        Keep these considerations in mind when working with custom buttons and links. EDITIONS

        Implementation Tips Available in: Salesforce Classic (not available in all • Custom buttons display at the top and bottom of the detail page to the right of all standard orgs) buttons. • Custom buttons aren't distinguished from standard buttons in any graphical way. However, Custom buttons and links you can recognize them by their location on the right of all standard buttons. are available in: All Editions • If the button bar gets too wide on the detail page layout, the browser displays a horizontal Visualforce pages and scroll bar. If the button bar gets too wide on the list view, search result, tagging result, or related s-controls are available in: Contact Manager, Group, list layouts, the buttons wrap. Professional, Enterprise, • Custom buttons are available for activities under the individual setup links for tasks and events. Performance, Unlimited, To add a custom button to an activity list view or search layout, first create a custom list button and Developer Editions in tasks or events. Next, add it to your activity list view or search result layouts. You can override a button that applies to both tasks and events. • Person Account records use the custom buttons and links you have made for accounts. USER PERMISSIONS

        • If your organization uses the Console tab, list buttons are available in Mass Action. List To create or change custom buttons don’t display in the mini page layouts. Pages that display due to custom buttons and buttons or links: links display in the console without the header or sidebar. • Customize Application • If you get an error message when overriding a button that appears in a list, try calling the s-control using the URLFOR function. • When creating custom buttons, be aware of any validation rules your organization has for records on that object. For example, some custom list buttons that change case status conflict with a case validation rule. In this scenario, Salesforce displays the error message for the validation rule when users click the custom button. • To replace a standard button with a custom button, first define the custom button, then customize the page layout to hide the standard button and display the custom one in its place. • Visualforce pages used as custom links on the home page can’t specify a controller. • Visualforce pages used as custom buttons or links on detail pages must specify a standard controller of the same object. • Visualforce pages used as custom list buttons must use a standard list controller of the same object. • A Web tab or custom link could display a blank page if the embedded site: – Has been set to deny the loading of its content in a frame. – Has been set to allow the loading of its content in a frame only if the same site is delivering the content. – Contains a mix of secure and unsecure content, and the user’s browser has been configured to block mixed active content. To resolve this issue, try these workarounds. – Set your custom link to either open in a new window or display in the existing window without the sidebar or header. – Move the URL from a Web tab into a custom link instead, and set the URL to either open in a new window or display in the existing window without the sidebar or header.

        804 Extend Salesforce with Clicks, Not Code Provide Actions, Buttons, and Links

        – If the site you’re embedding has an HTTP prefix and mixed active content, try changing the prefix to HTTPS. If the embedded site has a valid security certificate and it hasn’t blocked itself from being displayed in frames, using HTTPS as the prefix allows the site to display.

        Best Practices • Use formula functions in custom buttons with caution. Because functions run on the server before your HTML or JavaScript is passed to the browser, they can only evaluate information that exists at that time. Don't use functions like IF to evaluate conditions that only exist when the code reaches the browser, such as the value of a JavaScript variable that your code returns. • To prevent a user from performing a particular action, such as creating or editing, change the user's permissions rather than hiding the standard button. Hiding a standard button removes it from a page layout, but the link is still available and users can navigate to the new or edit page manually. • Use global variables to access special merge fields for components like custom buttons, links, and s-controls. For example, the $Request global variable allows you to access query parameters inside a snippet, s-control, or custom button. • When you create a custom list button, select Display Checkboxes (for Multi-Record Selection) only if your list button requires users to select individual records in a list. If your list button doesn’t require users to select individual records, don’t select this option. Don’t select Display Checkboxes (for Multi-Record Selection) if your list button links to a URL that doesn’t support POST operations, such as a URL that links to a Lightning component. • In Lightning Experience, when you select Display Checkboxes (for Multi-Record Selection), the related list type must be set to Enhanced List. You can set the related list type for a related list on a record page in the Lightning App Builder. • If you create multiple custom list buttons on a list and select Display Checkboxes (for Multi-Record Selection) for at least one of the list buttons, checkboxes appear next to records in the list. But those checkboxes aren’t activated for custom list buttons without Display Checkboxes (for Multi-Record Selection) selected.

        Limitations • A custom link's label can't exceed 1,024 characters. • A link URL can be up to 2,048 bytes. When data is substituted for the tokens in the URL, the link can exceed 3,000 bytes. Some browsers enforce limits on the maximum URL length. • Custom buttons that call JavaScript aren’t supported in Lightning Experience. • Custom buttons with a content source of OnClick JavaScript aren’t supported in the Salesforce app. • Using URL custom buttons to pass parameters to standard pages in Salesforce Classic—such as prepopulating fields when creating a record—doesn’t work in the Salesforce mobile app. • On record detail pages for external objects that are associated with high-data-volume external data sources, custom buttons, and links that call JavaScript aren’t supported. • Custom buttons aren’t available for Web-to-Lead, Web-to-Case, the Case Teams related list, or the user object. • Custom buttons on search results pages aren’t supported in Lightning Experience. • When you redirect to an external website with merge fields, use the Text Field data type field. If you use the URL data type field, the link breaks because symbols in the link are converted to hexadecimal code.

        Considerations for the Salesforce Mobile App • Custom buttons that are added to the Button section of a page layout and that define the content source as URL or Visualforce are supported in the Salesforce mobile app. Remember that Visualforce pages must be enabled for use in the Salesforce mobile app. Custom links, custom buttons that are added to list views, and custom buttons that define the content source as OnClick JavaScript aren’t available in the Salesforce mobile app.

        805 Extend Salesforce with Clicks, Not Code External Services

        • Using URL custom buttons to pass parameters to standard pages in Salesforce Classic—such as prepopulating fields when creating a record—doesn’t work in the Salesforce mobile app. • Custom images used for action icons must be less than 1 MB in size.

        SEE ALSO: Define Custom Buttons and Links Custom Button and Link Samples

        Viewing References to Salesforce Components

        You can view a list of all the areas in Salesforce that reference a component. For example, view the EDITIONS custom links, custom buttons, or page layouts that reference another component, such as a Visualforce page or static resource. To do this, click Where is this used? from the detail page of Available in: Salesforce the component. Salesforce lists the type of component that references the component and the Classic label for that component. Click any item in the list to view it directly. Custom buttons and links are available in: All Editions SEE ALSO: Visualforce pages and Define Custom Buttons and Links custom components available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions

        USER PERMISSIONS

        To create or change custom buttons or links: • Customize Application To create, edit, and delete Visualforce pages and custom components: • Customize Application To clone, edit, or delete static resources: • Customize Application

        External Services Connect your Salesforce org to an external API using zero lines of code. Use declarative tools and OpenAPI specifications to describe the external API functionality, and External Services creates invocable actions within Salesforce. Use the invocable actions to create a flow that interacts with the external API source.

        What Can I Do with External Services? To illustrate how External Services work, let’s say you want to connect Salesforce to an external credit service that determines if credit is extended to a Salesforce account. You also want to know the payment terms.

        806 Extend Salesforce with Clicks, Not Code External Services

        Current and Legacy Versions The current version of External Services became generally available in Spring ’20 release and has replaced the legacy version. Compared to the legacy version, this version provides significant improvements and adds a broader feature set, including support for larger and more complex schemas, and offers better error messaging and error recovery. External Services Registration To register and use External Services, provide an API spec that describes the services and methods for tools such as Flow Builder or Einstein Bots to consume. The API spec’s schema generates the External Service flow actions with corresponding input and output parameters. Import MuleSoft APIs Import your MuleSoft Anypoint Platform APIs in a few clicks with External Services for MuleSoft. To use External Services for MuleSoft, you need a valid MuleSoft license or demo account. Create a Flow with External Services Design and test the automation that sends a user’s information from Salesforce to the external employee banking system. Create the variables for user phone numbers, and combine different phone numbers into one piece of data. Then use the external service action to create the user. Add Actions to an Einstein Bot Integrating your Einstein bot with a registered external service is now as easy as adding an action to a dialog. You can add an external service action to your bot from Einstein’s Bot Builder. Edit, Delete, Save As, and View an External Service Find services that you already registered, view actions for a previously defined service, edit, clone, and delete a service. You can’t edit or delete an external service that is in use by a flow. Recreate an External Service Recreate your external service, and update the related flows. External Services and Packaging You can install or create packages containing an external service. Read these tips before you begin. Testing External Service Actions in Flow Test the example flow MyAtmFlow with a flow external service action MyAtmExternalService by implementing the HttpCalloutMock interface that provides a test response without performing the callout to the external service endpoint.

        What Can I Do with External Services?

        To illustrate how External Services work, let’s say you want to connect Salesforce to an external EDITIONS credit service that determines if credit is extended to a Salesforce account. You also want to know the payment terms. Available in: Lightning Example: First, you create a Named Credential by supplying a URL and authentication Experience settings for the credit service. Salesforce uses these items to make callouts to the external Available in: Enterprise, service. With the External Services wizard, you then select whether you will get your API spec Performance, Unlimited, from Mulesoft Anypoint Platform, or from an API spec provided elsewhere. To register an API and Developer Editions spec: 1. Enter a URL (or endpoint) to the location of the hosted OpenAPI specification (”API spec”) for the external service, or provide (paste in) the complete schema from the API spec. For Mulesoft, provide your credentials and select the ASPI spec. 2. Select the operations from the schema you want to make available in Salesforce as invocable actions, and complete the registration.

        807 Extend Salesforce with Clicks, Not Code External Services

        The External Services wizard walks you through it so that you don’t directly touch the API. You can also skip writing Apex code to make the callout. Once you have registered your new external service, use a Salesforce point-and-click automation tool, such as Flow Builder or Einstein Bots. Create a flow using the External Service type for flow actions automatically generated from your External Services registration. When the flow runs, the output contains the credit decision and, if applicable, payment terms.

        Example: Another use case involves saving time when you add new users to an org. For instance, you want new users to automatically become collaborators for all external org-related applications. Create a flow using inputs such as user ID, which you can define in your API spec’s schema. Then you add triggers in your flow. When a user is created, the triggers engage and add the new user as a collaborator to your other applications.

        Current and Legacy Versions

        The current version of External Services became generally available in Spring ’20 release and has EDITIONS replaced the legacy version. Compared to the legacy version, this version provides significant improvements and adds a broader feature set, including support for larger and more complex Available in: Lightning schemas, and offers better error messaging and error recovery. Experience External Services (Current version) Available in: Enterprise, Here are some of the key enhancements and additions for OpenAPI support: Performance, Unlimited, • More complex OpenAPI 2.0 schema. and Developer Editions – Nested parameters - rendered as Dynamic Apex-defined data type in Flow Builder – Header parameters in HTTP request.

        • Named arrays, anonymous arrays, or inline arrays, supported as collection type in Flow Builder • Access to the latest product enhancements. • Normal packaging support. • Shows up as External Service type for flow actions. • External Services operations show up as External Service action type in Flow builder.

        Note: Legacy External Services has been retired in Summer ’21. If you still have legacy registrations, they are visible in the list. You can delete them. You can’t do anything else with your legacy External Services registrations, including editing them, recreating them, or using legacy registrations in a flow. For more information, see Knowledge Article Legacy External Services Retirement.

        SEE ALSO: Register an External Service Edit, Delete, Save As, and View an External Service External Services Considerations

        808 Extend Salesforce with Clicks, Not Code External Services

        External Services Registration

        To register and use External Services, provide an API spec that describes the services and methods EDITIONS for tools such as Flow Builder or Einstein Bots to consume. The API spec’s schema generates the External Service flow actions with corresponding input and output parameters. Available in: Lightning When you create your API spec, keep the following in mind. Experience • An API spec can include up to 4,000,000 characters (4.0MB). Available in: Enterprise, • You can use the GET, PATCH, PUT, POST, and DELETE methods in a schema. Performance, Unlimited, and Developer Editions • A property must include a value. • Each parameter must have a name. • Request headers are supported. • Response headers aren’t supported. • Form parameters are supported. • Security settings defined in the API spec are ignored and defer to security settings in the Named Credential. Supported data types: • boolean • date • datetime • double • float • integer • long • string • any type (as Apex Object) • object: top level named and nested anonymous objects • anonymous and top level named lists (can nest both named and anonymous arrays) • additionalProperties as maps • allOf as an object composition

        Note: Legacy External Services has been retired in Summer ’21. If you still have legacy registrations, they are visible in the list. You can delete them. You can’t do anything else with your legacy External Services registrations, including editing them, recreating them, or using legacy registrations in a flow. For more information, see Knowledge Article Legacy External Services Retirement.

        Register an External Service Registering an external service takes only a few steps and no code. External Services Considerations Here are the semantic, service, and usage constraints to keep in mind when integrating your services into External Services. Examples: External Services Schema These API spec examples highlight various scenarios with JSON schemas supported by External Services and can help you avoid common mistakes with syntax and code placement. The API spec examples also cover schema elements like HTTP header as input parameters.

        809 Extend Salesforce with Clicks, Not Code External Services

        MIME Type Mapping in External Service Registrations You can register OpenAPI specifications with non-permitted consumes or produces MIME types directives by mapping the MIME types to permitted MIME types.

        SEE ALSO: Register an External Service External Services Named Credentials

        Register an External Service

        Registering an external service takes only a few steps and no code. EDITIONS Before you begin, ensure that you have the OpenAPI version 2.0 endpoint information for the service that you’re registering. Then set up a named credential. A named credential specifies the URL of a Available in: Lightning callout endpoint (the service you want to access) and its authentication parameters. For example, Experience https://my_endpoint.example.com. Available in: Enterprise, Note: If you use OpenAPI 2.0, your endpoint is relative to the base URL. So if your named Performance, Unlimited, credential URL is https://my_endpoint.example.com and the basePath is and Developer Editions /basepath, they combine as the final endpoint of https://my_endpoint.example.com/basepath. USER PERMISSIONS External Services supports all named credential authoring schemes. To manage connections: Note: OpenAPI 2.0 security schemes are ignored. • Customize Application

        1. From Setup in Lightning Experience, enter External Services in the Quick Find box, and select External Services. 2. Click New External Service. 3. On the Select an API Source screen, select whether you are importing an API spec From Mulesoft Anypoint Platform, or From API Specification. 4. Enter a service name and an optional description. 5. Choose a named credential. 6. If your schema includes operations that are not supported, you can filter them out by toggling on Only include supported operations (default). To learn why operations can't be included, disable this toggle. If you aren’t sure, leave this toggle on. 7. Enter a schema URL path (or endpoint), or provide a complete schema. If you enter a schema URL path, it must begin with “/” and be a relative path. For example, /accountSchema.json. If you provide a schema, it must be complete, valid OpenAPI 2.0, and JSON-compliant. 8. Click Save & Next. 9. Select the operations you want to import into your external service registration. Note that you can select up to 625 operations per org, and up to 625 active objects per org. If you exceed either of these limits, divide the operations in your schema across separate registrations. For information about limits, see External Services Considerations on page 811. For information about “objects” in Open API schemas, see https://swagger.io/docs/specification/2-0/basic-structure/ 10. Click Next.

        810 Extend Salesforce with Clicks, Not Code External Services

        11. Click Done.

        SEE ALSO: External Services Define a Named Credential Choose an Authentication Protocol

        External Services Considerations Here are the semantic, service, and usage constraints to keep in mind when integrating your services into External Services.

        OpenAPI 2.0 Support • The following MIME types are permitted: – application/json — Structured data in JSON format – application/x-www-form-urlencoded -- URL encoded form – text/plain -- Unstructured data as plain text

        • Non-permitted MIME types can be mapped to permitted MIME types for request and response content serialization. To do this, see MIME Type Mapping in External Service Registrations. • Form data parameters are supported. • Supports all Java runtime supported character set encodings. UTF-8 is the default encoding. • Server and operation level consumes and produces directives.

        Supported Schema Format • OpenAPI 2.0, JSON schema format • UTF-8, with full character set for names and identifiers

        Unsupported Schema Formats • Interagent hyper-schema format • OpenAPI 2.0 schema, YAML format • OpenAPI 3.0

        Unsupported OpenAPI 2.0 Schema Constructs • The combined schema keywords: oneOf, anyOf, not • Media types such as xml, png, and pdf

        OpenAPI 2.0 Schema Definitions • A schema can have up to 4,000,000 characters (4.0 MB). • You can use up to 25 External Services registrations per org. • You can have up to 625 active operations per org. The sum of active (selected) and inactive operations can’t exceed 5,000 per org.

        811 Extend Salesforce with Clicks, Not Code External Services

        • You can have up to 625 active, unique, Apex-defined objects per org. Apex-defined objects are derived from the object schemas in the OAS. The sum of active and inactive objects can’t exceed 5,000 per org. • You can have up to 200,000 properties per org. • You can use the GET, PATCH, PUT, POST, and DELETE methods in a schema. • The following MIME types are permitted: – application/json — Structured data in JSON format. – text/plain -- Unstructured data as plain text. – application/x-www-form-urlencoded -- URL encoded form.

        • The following OpenAPI schema components are ignored: – security requirement objects and security definitions – tag objects – external documentation objects – For allOf, the schema object property discriminator is ignored. The discriminator property determines the schema referenced by its type name. The discriminator property must be set in your flow to the appropriate schema property name. Only properties from the base schema are accessible, not the composition properties from the schema designated by the discriminator schema type value. For more information, see the Swagger 2.0 Specification OpenAPI Specification.

        • The operation name is derived from the schema's path operationId. If missing, it's derived from the HTTP method and resource path. • Use case consistently for object name definitions, property names, parameter names, and field names in a schema. • The derived Apex class name for an OpenAPI schema input or output parameter object can be a maximum of 255 characters. Ensure that class names are the correct length by choosing a short service name, or edit the schema object name definition to create a shorter name if errors are encountered during registration. The operation or object developer name is derived from the registered API specification. The name must fit within a maximum of 80 characters. If the individual objects or operations in the nested data structure don't themselves exceed 80 characters, then nested data structures can go up to 255 characters. • The derived Apex class name and Apex object property names require valid Apex identifier characters. Ensure that the object name in the schema object definition section matches the naming convention and the object property names. • External Services can handle up to 1,333 characters for any optional description string used to describe operations and parameters in your JSON schema definition. If the description string exceeds this limit, External Services stores only the first 1,333 characters of the description. Truncating the operation or parameter description doesn’t affect the integrity of your schema definition. • consumes/produces directives: – Unsupported consumes/produces directives invalidate the API spec registration. – consumes/produces directives that are incompatible with a request body or response entity schema declaration cause errors during callout. – Missing consumes/produces directives are defaulted to: • application/json—if the request body or the response body schema is either an object or an array • text/plain—if the request or response schema body is a primitive type such as a string or an integer number

        – If no request body parameter is defined for methods POST, PUT, and PATCH, form data request parameters are sent in the request body as application/x-www-form-urlencoded. – The applicable media type in the produces list or a default (json or text/plain) is set as the HTTP Accept header.

        • Character set encodings:

        812 Extend Salesforce with Clicks, Not Code External Services

        – The request body is encoded by the character set in the operation’s resolved consumes directive. For example, application/json; charset=ISO-8859-1 encodes the HTTP request in Latin-1 before sending it to the server – The response body is encoded by the character set in the operation’s resolved produces directive. For example, application/x-www-form-urlencoded; charset=SHIFT_JIS decodes the percent URL encoded form with the Shift JIS character set. – The default character set for encoding request bodies is UTF-8 – The default character set for decoding server response entities is defined by the server response’s Content-Type header or UTF-8 if it’s missing. – Reserved HTTP request header characters aren’t escaped and are encoded by the request body’s character set – The supported encoding set is as defined by the Java JDK. For example, for version 11, supported encoding is documented here (replace the “11” in this URL with your Java SE Platform version number): https://docs.oracle.com/en/java/javase/11/intl/supported-encodings.html - and it’s recommended to use the standard character set encoding name as described by the IANA Charset Registry.

        • Considerations for properties and additionalProperties – In OpenAPI 2.0, the named properties are accessible as Apex properties with matching property type. additionalProperties allow for free form map or dictionary properties with a common property value type that are accessible in Apex as a Map property. – properties and additionalProperties under an OpenAPI 2 schema directive show as formal object properties and as a dictionary property. If declared under a property or additionalProperties type, then the OpenAPI 2 parser ignores one or the other. The registration process doesn't throw an error – OpenAPI 2.0 named properties are properties in Apex with the same name and property type. – OpenAPI 2.0 additionalProperties are grouped in the Apex property with name properties and type Map, where Type is the declared additionalProperties type. – OpenAPI 2.0 additionalProperties are always declared as an Apex object map property, even if it could be declared as a standalone Apex Map type. The result is consistently handled named object properties defined together with additionalProperties. – OpenAPI 2.0 properties and additionalProperties can both be declared under an OpenAPI parameter schema or schema in the definitions section. The OpenAPI 2.0 parser ignores either properties or additionalProperties if declared as an object property type. An object property type must only define named properties or additionalProperties, but not both. To work around, place the object property definition as a named schema under definitions and reference it by name. – The OpenAPI 2.0 parser doesn't differentiate between literal declarations or untyped schemas. Declarations like additionalProperties: true, additionalProperties: false or additionalProperties: {} are interpreted as untyped. Untyped additionalProperties are ignored. There isn't a workaround to define additionalProperties that can be of any type. – Flow doesn't allow access or manipulation of Apex object types with Map properties, but transparently preserves the content when assigned to variables of the same Apex object type. To manipulate map data structure in flow, call an Apex invocable action that can access the map data structure. For an example with External Service maps in action, see the “External Services Schema Example 9” section of Examples: External Services Schema.

        External Service support for Apex reserved keywords Although not a best practice, External Services doesn’t prohibit schema entities with the same name as the Apex reserved keywords. If your schema name conflicts with an Apex reserved keyword, External Services creates a unique name by encoding it to be compatible with Apex identifier rules.

        813 Extend Salesforce with Clicks, Not Code External Services

        For example, you have an account object with property name type. Because the property name type conflicts with the Apex reserved keyword type, External Services encodes the property name type as z0type to make it Apex compliant. During callout, the property name type is used according to the original OpenAPI schema. Special characters that aren’t valid Apex identifiers are UTF-8 encoded. For example, 5getOpen-bankingV2.2Atms is encoded as x35getOpenx2dbankingV2x2e2Atms for a valid Apex identifier. Flow • You can’t edit an external service used in a flow. • External service callouts aren’t allowed when there are pending, uncommitted transactions. Close your transaction, and resume Flow using the flow element Pause. Array definition in OpenAPI 2.0 External Services supports inline array definitions and referenceable named arrays. List types in External Services are identified by their object element type. Supported Inline Array Definition with Reference to Array Items Definition

        { "swagger": "2.0", ... "name": "myObjects", "in": "body", "schema": { "type": "array", "items": { "$ref": "#definitions/MyObject" } } ... "definitions": { "MyObject": { "type": "object", "properties": {...} } } }

        In Flow Builder, declare a variable for the myObjects parameter by marking the variable as a collection and picking its Apex element type ExternalService__RegistrationName_MyObject. Inline Array Definition with Inline Array Items Definition

        { "swagger": "2.0", ... "name": "myObjects", "in": "body", "schema": { "type": "array", "items": { "type": "object", "properties": {...} } }

        814 Extend Salesforce with Clicks, Not Code External Services

        ... "definitions": { ... } }

        In Flow Builder, declare a collection variable for the myObjects parameter and Apex element type ExternalService__RegistrationName_OperationName_IN_myObjects. Referenceable Array Definition with Reference to Array Item Definitions

        { "swagger": "2.0", ... "name": "myObjects", "in": "body", "schema": { "$ref": "#definitions/MyObjectList" } ... "definitions": { "MyObjectList": { "type": "array", "items": { "$ref": "#definitions/MyObject" } } "MyObject": { "type": "object", "properties": {...} } } }

        In Flow Builder, declare a collection variable for the myObjects parameter and Apex element type ExternalService__RegistrationName_MyObject. Referenceable Array Definition with Inline Array Items Definition

        { "swagger": "2.0", ... "name": "myObjects", "in": "body", "schema": { "$ref": "#definitions/MyObjectList" } ... "definitions": { "MyObjectList": { "type": "array", "items": { "type": "object", "properties": {...} } }

        815 Extend Salesforce with Clicks, Not Code External Services

        } }

        In Flow Builder, declare a collection variable for the myObjects parameter and Apex element type ExternalService__RegistrationName_MyObjectList.

        Note: Legacy External Services has been retired in Summer ’21. If you still have legacy registrations, they are visible in the list. You can delete them. You can’t do anything else with your legacy External Services registrations, including editing them, recreating them, or using legacy registrations in a flow. For more information, see Knowledge Article Legacy External Services Retirement.

        Examples: External Services Schema

        These API spec examples highlight various scenarios with JSON schemas supported by External EDITIONS Services and can help you avoid common mistakes with syntax and code placement. The API spec examples also cover schema elements like HTTP header as input parameters. Available in: Lightning External Services API Spec Example 1 Experience Here’s an example of a an API spec that contains a supported JSON schema for OpenAPI 2.0. The Available in: Enterprise, parameters (in bold) contain the definition for the accountId input. The responses (also in bold) Performance, Unlimited, contain the definition for the output, which is creditRating. Parameters and responses and Developer Editions translate to inputs and outputs, respectively, for your flow actions.

        { "swagger":"2.0", "info":{ "description":"A service for checking credit for an account.", "version":"1.0.0", "title":"Credit Decision", "termsOfService":"http://swagger.io/terms/", "contact":{ "email":"[email protected]" }, "license":{ "name":"Apache 2.0", "url":"http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host":"", "paths":{ "/account/lastCreditRating":{ "get":{ "summary":"Evaluates credit rating and decides what payment terms to offer.",

        "description":"", "consumes":[ "application/json", "application/xml" ], "produces":[ "application/xml", "application/json" ], "parameters":[{ "in":"body",

        816 Extend Salesforce with Clicks, Not Code External Services

        "name":"body", "description":"Specifies input parameters to calculate payment term", "required":true, "schema":{ "$ref":"#/definitions/accountId" } }], "responses":{ "200":{ "description":"success", "schema":{ "$ref":"#/definitions/creditRating" } }, "405":{ "description":"Invalid input" } } } } }, "definitions":{ "accountId":{ "type":"object", "properties":{ "accountIdString":{ "type":"string" } }, "xml":{ "name":"accountId" } }, "creditRating":{ "type":"object", "properties":{ "creditRatingString":{ "type":"string" } }, "xml":{ "name":"creditRating" } } } }

        External Services API Spec Example 2 Basic Setup • For the named credential that your org uses to access the banking system, assign the Bank label and the https://api.example.com URL. The named credential URL corresponds to the declared host of the JSON schema and one of its schemes or URL protocols. The URL can point to a different endpoint as long as it hosts the same external service. The base path is added to the named credential URL on callout.

        817 Extend Salesforce with Clicks, Not Code External Services

        • Register the employee banking system’s external service. Use the Bank name and the Bank named credential, and then copy one of the following schemas provided. • The banking system's external service shows two ways to define parameters with object types: a named object type under a “definitions” block or an anonymously declared object type inline.

        Note: The defined or derived parameter object type name, or a property with an object type, must be fewer than 255 characters to be used in Flow Builder.

        Here’s a schema with the named object type defined under the “definitions” block. The phone object type's name is ExternalService__Bank_Phone in Flow Builder.

        { "swagger": "2.0", "info": { "title": "bankService", "description": "API description in Markdown.", "version": "1.0.0" }, "host": "api.example.com", "basePath": "/v1", "schemes": [ "https" ], "definitions": { "User": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "phones":{ "type":"array", "items":{ "type": "object", "$ref": "#/definitions/Phone" } } } }, "Phone":{ "properties":{ "typeofphone":{ "type":"string" }, "phone":{ "type":"string" } } } }, "paths": { "/users/{userId}": {

        818 Extend Salesforce with Clicks, Not Code External Services

        "get": { "summary": "Returns a user by ID.", "parameters": [{ "in": "path", "name": "userId", "required": true, "type": "integer" }], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/User" } } } } }, "/users": { "post": { "summary": "Creates a new user.", "parameters": [{ "in": "body", "name": "user", "schema": { "$ref": "#/definitions/User" } }], "responses": { "200": { "description": "OK" } } } } } }

        External Services API Spec Example 3 Here’s an API spec with a JSON schema with anonymous object types defined inline. The derived phone object type's name is ExternalService__Bank_getUsers_OUT_200_phones.

        Note: For anonymous object types, Salesforce automatically derives object type names based on the external service, parent operation, operation parameter, parent object, and object property names. The derived name must be fewer than 255 characters. Object types with names longer than 40 characters and object types that reference through their properties’ object types with names longer than 40 characters can't be used in Flow Builder.

        { "swagger": "2.0", "info": { "title": "bankService", "description": "API description in Markdown.", "version": "1.0.0" },

        819 Extend Salesforce with Clicks, Not Code External Services

        "host": "api.example.com", "basePath": "/v1", "schemes": [ "https" ], "paths": { "/users/{userId}": { "get": { "summary": "Returns a user by ID.", "parameters": [{ "in": "path", "name": "userId", "required": true, "type": "integer" }], "responses": { "200": { "description": "OK", "schema": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "phones": { "type":"array", "items": { "type": "object", "properties": { "typeofphone": { "type":"string" }, "phone": { "type":"string" } } } } } } } } } }, "/users": { "post": { "summary": "Creates a new user.", "parameters": [{ "in": "body", "name": "user", "schema": {

        820 Extend Salesforce with Clicks, Not Code External Services

        "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "phones": { "type":"array", "items": { "type": "object", "properties": { "typeofphone": { "type":"string" }, "phone": { "type":"string" } } } } } } }], "responses": { "200": { "description": "OK" } } } } } }

        External Services API Spec Example 4 Here's an API spec registered with external service name BankingAutomaticTellerMachine. However, the derived object names: • ExternalService__BankingAutomaticTellerMachine_VeryImportantCustomer_phone • ExternalService__BankingAutomaticTellerMachine_getBalanceAccountTypeChecking_OUT_200 Must be no longer than 255 characters. To use Flow Builder, you must shorten the external service schema name and the schema (shown in Example 5).

        Tip: If the derived object name is longer than 255 characters, try one of the following methods to resolve the issue. • Shorten the external service name. • If the object is declared inline under an operation parameter, shorten the operation name by adding an operationId to the schema. • If the object is declared inline under a parent object property, shorten the parent object name in the schema. • Declare the nested object as a top-level object under schema “definitions”.

        { "swagger": "2.0",

        821 Extend Salesforce with Clicks, Not Code External Services

        ... "paths": { "/balance/account/{accountId}/type/checking": { "get": { "parameters": [{ "in": "path", "name": "accountId", "required": true, "type": "integer" }], "responses": { "200": { "schema": { "type": "object", "properties": { "balance": { "type": "integer" }, "owner": { "$ref": "#/definitions/VeryImportantCustomer" } } } } } } } }, "definitions": { "VeryImportantCustomer": { "type": "object", "properties": { "name": { "type": "string" }, "phone": { "type": "object", "properties": { "number": { "type": "string" } } } } } } }

        External Services API Spec Example 5 Here's an example of an API spec with a schema that results in shortened names. It's registered with the shortened name BankAtm. Shorten the external service schema name to BankAtm, the schema object name to VIP and add operationId as getBalance: • ExternalService__BankAtm_VIP_phone

        822 Extend Salesforce with Clicks, Not Code External Services

        • ExternalService__BankAtm_getBalance_200

        { "swagger": "2.0", ... "paths": { "/balance/account/{accountId}/type/checking": { "get": { "operationId": "getBalance", "parameters": [{ "in": "path", "name": "accountId", "required": true, "type": "integer" }], "responses": { "200": { "schema": { "type": "object", "properties": { "balance": { "type": "integer" }, "owner": { "$ref": "#/definitions/VIP" } } } } } } } }, "definitions": { "VIP": { "type": "object", "properties": { "name": { "type": "string" }, "phone": { "type": "object", "properties": { "number": { "type": "string" } } } } } } }

        External Services API Spec Example 6

        823 Extend Salesforce with Clicks, Not Code External Services

        Here's an example with an inline array definition.

        { "swagger": "2.0", "host": "Employees.org", "basePath": "/", ... "paths": { "/employees/{employeeId}": { "get": { "operationId": "getEmployee", "parameters": [{ "in": "path", "name": "employeeId", "required": true, "type": "string" }], "responses": { "200": { "schema": { "type": "object", "properties": { "employee": {"$ref": "#/definitions/Employee"}, "manager": {"$ref": "#/definitions/Employee"}, "team": { "type": "array", "items": {"$ref": "#/definitions/Employee"} } } } } } } } }, "definitions": { "Employee" : { "type": "object", "properties": { "employeeId": {"type": "string"}, "firstName": {"type": "string"}, "middleName": {"type": "string"}, "lastName": {"type": "string"}, "dateOfHire": {"type": "date"} } } } }

        External Services API Spec Example 7 Here’s how a header parameter is declared in an OpenAPI schema. In Flow, the name “apiKey” shows up as a string parameter. Now when you set any string value in a flow to apiKey, it functions as an HTTP parameter when making a callout request.

        { "swagger": "2.0",

        824 Extend Salesforce with Clicks, Not Code External Services

        "info": { "description": "A service for checking credit for an account.", "version": "1.0.0", "title": "Credit Decision", "termsOfService": "http://swagger.io/terms/", "contact": { "email": "[email protected]" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "", "paths": { "/account/lastCreditRating": { "get": { "summary": "Evaluates credit rating and decides what payment terms to offer.", "description": "", "consumes": [ "application/json", "application/xml" ], "produces": [ "application/xml", "application/json" ], "parameters": [{ "name": "body", "description": "Specifies input parameters to calculate payment term", "in": "body", "required": true, "schema": { "$ref": "#/definitions/accountId" } },{ "name": "apiKey", "description": "Your API Key for calling the credit rating service", "in": "header", "type": "string" }], "responses": { "200": { "description": "success", "schema": { "$ref": "#/definitions/creditRating" } }, "405": { "description": "Invalid input" } } } }

        825 Extend Salesforce with Clicks, Not Code External Services

        }, "definitions": { "accountId": { "type": "object", "properties": { "accountIdString": { "type": "string" } }, "xml": { "name": "accountId" } }, "creditRating": { "type": "object", "properties": { "creditRatingString": { "type": "string" } }, "xml": { "name": "creditRating" } } } }

        External Services API Spec Example 8 Request and response form data is declared alongside the matching consumes and produces directives.

        { "swagger": "2.0", "info": { "description": "Apply here for your next mortgage", "version": "1.0.0", "title": "My Mortgage Buddy", "contact": { "email": "[email protected]" }, }, "host": "MyMortgageBuddy.org", "basePath": "/mortgages", "paths": { "/apply": { "post": { "operationId": "applyMortgage", "consumes": [ "application/x-www-form-urlencoded; charset=utf-8" ], "produces": [ "application/x-www-form-urlencoded; charset=utf-8" ], "parameters": [{ "description": "Desired mortgage terms",

        826 Extend Salesforce with Clicks, Not Code External Services

        "name": "terms", "in": "formData", "type": "array", "items": { "type": "integer" }, "collectionFormat": "multi", "required": true },{ "description": "Full Name", "name": "fullName", "in": "formData", "type": "string", "required": true },{ "description": "Loan amount", "name": "loanAmount", "in": "formData", "type": "number", "required": true }], "responses": { "200": { "description": "200", "schema": { "type": "object", "properties": { "formApplicationId": { "type": "string" }, "loanOfficerFullName": { "type": "string" } } } } } } } }

        External Services API Spec Example 9 This JSON schema definition highlights the constructs allOf for schema object composition and additionalProperties for dictionary values. The sample schema is registered as external service MyBank with named credential MyBank. The registration is invoked by a sample flow that accesses the dictionary properties with an Apex invocable action. A flow Apex unit test ties it all together. The schema defines a banking service that gets customer details for a customer ID. • The Customer schema object has dictionary properties of type schema object CreditRating. In Apex, the class ExternalService.MyBank_Customer has property properties of type Map with the customer’s credit ratings.

        827 Extend Salesforce with Clicks, Not Code External Services

        • Phones and Emails compose their own properties together with the common allOf properties from the schema object Contact.

        { "swagger": "2.0",

        "info": { "title": "myBank", "description": "Sample Banking Service with allOf and additionalProperties schema constructs", "version": "1.0.0" },

        "host": "api.mybank.com", "basePath": "/v1", "schemes": [ "https" ],

        "definitions": { "Customer": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "phones": { "type":"array", "items": { "$ref": "#/definitions/Phone" } }, "emails": { "type": "array", "items": { "$ref": "#/definitions/Email" } } }, "additionalProperties": { "$ref": "#/definitions/CreditRating" }, "required": [ "id", "name" ] },

        "Contact": { "type": "object", "properties": { "primary": { "type": "boolean"

        828 Extend Salesforce with Clicks, Not Code External Services

        }, "timeOfDay": { "type": "string" } }, "required": [ "primary" ] }, "Phone": { "allOf": [ { "$ref": "#/definitions/Contact" }, { "type": "object", "properties": { "typeOfPhone": { "type":"string" }, "phoneNumber":{ "type":"string" } } } ] }, "Email": { "allOf": [ { "$ref": "#/definitions/Contact" }, { "type": "object", "properties": { "email": { "type":"string" } } } ] },

        "CreditRating": { "type": "object", "properties": { "rating": { "type": "string" }, "score": { "type": "number", "format": "double" } }

        829 Extend Salesforce with Clicks, Not Code External Services

        } },

        "paths": { "/customers/{customerId}": { "get": { "summary": "Get the customer by ID.", "parameters": [{ "in": "path", "name": "customerId", "required": true, "type": "integer" }], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Customer" } } } } } } }

        Here is the Apex invokable action that gets the customer credit ratings as a list demonstrating how to work with map data types from flow:

        public class MyBankGetCreditRatings { @InvocableMethod( label='Get Credit Ratings' description='A list of credit ratings for a customer' category='MyBank' ) public static List getCreditRatings(List inCustomers) {

        List outCreditRatingsList = new List(); for (Customer inCustomer: inCustomers) { ExternalService.MyBank_Customer customer = inCustomer.customer; CustomerCreditRatings outCreditRatings = new CustomerCreditRatings(); outCreditRatings.customerId = customer.id; outCreditRatings.creditRatings = new List();

        Map creditRatings = customer.properties; for (String ratingProperty: creditRatings.keySet()) { ExternalService.MyBank_CreditRating creditRating = creditRatings.get(ratingProperty); outCreditRatings.creditRatings.add(creditRating); }

        830 Extend Salesforce with Clicks, Not Code External Services

        outCreditRatingsList.add(outCreditRatings); }

        return outCreditRatingsList; }

        public class Customer { @InvocableVariable( label='Customer' description='Banking customer' required=true ) public ExternalService.MyBank_Customer customer; }

        public class CustomerCreditRatings { @InvocableVariable( label='Customer ID' description='Bank customer ID' required=true ) public Integer customerId;

        @InvocableVariable( label='Credit Ratings' description='Credit ratings for a customer' required=true ) public List creditRatings; } }

        The flow starts by calling the external MyBank service action getCustomerById to get the customer details given a customer ID. The Apex invokable flow action getCreditRatings gets the list of credit ratings from the customer details. Phone and email contact details are formatted as a list of customer contacts by looping through the phones and emails properties and assigning the formatted value to the contacts list.

        831 Extend Salesforce with Clicks, Not Code External Services

        The HTTP callout mock asserts an expected request and responds with a sample customer as application/json:

        public class MyBankGetCustomerCalloutMock implements HttpCalloutMock { public HTTPResponse respond(HTTPRequest request) { // Assert expected request test data: customer ID in the request path System.assertEquals('GET', request.getMethod()); System.assertEquals('callout:MyBank/v1/customers/42', request.getEndpoint());

        // Send response test data: customer details with sample ratings // as additional properties and sample contacts HttpResponse response = new HttpResponse(); response.setHeader('Content-Type', 'application/json'); response.setBody('{' + '"id": 42, "name": "Foo Bar", "phones": [' + ' {"primary": true, "timeOfDay": "Daytime", ' + ' "typeOfPhone": "Mobile", "phoneNumber": "555-5555"},' + ' {"primary": false, "timeOfDay": "Evening", ' + ' "typeOfPhone": "Landline", "phoneNumber": "222-5555"}' + '], "emails": [' + ' {"primary": true, "timeOfDay": "AllDay", "email": "[email protected]"}' + '],' + '"rating1": {"rating": "Rating 1", "score": 0.95}, ' + '"rating2": {"rating": "Rating 2", "score": 0.78}' + '}'); response.setStatusCode(200); return response; } }

        Tip: You can also use JSON to serialize a sample response matching the external service response type if the HTTP response mime type is application/json and the JSON properties are compliant with Apex identifier characters:

        ExternalService.MyBank_Customer customer = new ExternalService.MyBank_Customer(); customer.id = 42; ... customer.properties = new Map(); ExternalService.MyBank_CreditRating creditRating = new ExternalService.MyBank_CreditRating(); creditRating.rating = 'Rarging 1'; creditRating.score = 0.95; customer.properties.put('rating1', creditRating); ... response.setBody(System.JSON.serialize(customer)); ....

        The Apex unit test sets up the HTTP callout mock and asserts the expected credit ratings and customer contacts:

        @IsTest public class MyBankFlowTest { @IsTest static public void testGetCustomer() { // Set HTTP callout mock to match flow's external service action invocation Test.setMock(HttpCalloutMock.class, new MyBankGetCustomerCalloutMock());

        // Set flow input variables and create the flow interview Map inputVariables = new Map(); inputVariables.put('customerId', 42);

        832 Extend Salesforce with Clicks, Not Code External Services

        Flow.Interview myBankFlow = Flow.Interview.createInterview('MyBank', inputVariables);

        // Start flow interview with set input variables myBankFlow.start();

        // Assert customer's expected credit ratings List creditRatings = (List)myBankFlow. getVariableValue('creditRatings'); System.assertEquals(2, creditRatings == null ? 0 : creditRatings.size()); ExternalService.MyBank_CreditRating actualRating = creditRatings.get(1); ExternalService.MyBank_CreditRating expectedRating = new ExternalService.MyBank_CreditRating(); expectedRating.rating = 'Rating 2'; expectedRating.score = 0.78; System.assertEquals(expectedRating.toString(), actualRating.toString());

        // Assert customer's contacts: List contacts = (List)myBankFlow.getVariableValue('*contacts*'); System.assertEquals(3, contacts == null ? 0 : contacts.size()); System.assertEquals('Phone Number: 555-5555', contacts.get(0)); System.assertEquals('Phone Number: 222-5555', contacts.get(1)); System.assertEquals('Email: [email protected]', contacts.get(2)); } }

        For another example of a flow Apex unit test, see Testing External Service Actions in Flow on page 850.

        MIME Type Mapping in External Service Registrations You can register OpenAPI specifications with non-permitted consumes or produces MIME types directives by mapping the MIME types to permitted MIME types. OpenAPI consumes MIME types: • The Content-Type header is the specified consumes MIME type. • The request body is serialized with the mapped permitted media type. OpenAPI produces MIME types: • The request Accept header is the specified produces MIME type. • The response Content-Type header, if present, is mapped to the permitted MIME type to deserialize the response body. Non-permitted MIME types must be mapped to permitted MIME types as mappings in the field serviceBinding of the ExternalServiceRegistration metadata file.

        MIME Type Mapping Example Acme bank specifies an OpenAPI 2.0 service for their credit rating service. It defines its own MIME type for handling the JSON compatible payload: application/x-acme-json:

        { "swagger":"2.0", "info":{

        833 Extend Salesforce with Clicks, Not Code External Services

        "description":"A service for checking credit for an account.", "version":"1.0.0", "title":"Credit Decision" }, "host":"", "paths":{ "/account/credit-rating":{ "get":{ "operationId":"getCreditRating", "summary":"Evaluates credit rating for offered payment terms.", "consumes":[ "application/x-acme-json" ], "produces":[ "application/x-acme-json" ], "parameters":[{ "description":"Account", "in":"body", "name":"body", "required":true, "schema":{ "$ref":"#/definitions/Account" } }], "responses":{ "200":{ "description": "Credit rating", "schema":{ "$ref":"#/definitions/CreditRating" } } } } } }, "definitions":{ "Account":{ "type":"object", "properties":{ "accountId":{ "type":"string" }, "accountHolder":{ "type":"string" } } }, "CreditRating":{ "type":"object", "properties":{ "creditRating":{ "type":"string" }

        834 Extend Salesforce with Clicks, Not Code External Services

        } } } }

        To map the BankService MIME type to the permitted MIME type application/json, open a command-line terminal. Create a directory in which to retrieve the external service’s metadata.

        > mkdir BankService > cd BankService

        Create the manifest package.xml for the external service metadata for your BankService to retrieve from your organization:

        > touch package.xml

        Edit the package.xml:

        BankService ExternalServiceRegistration 53.0

        Retrieve the metadata for the external service with the Salesforce CLI command after successful authentication to your organization:

        > sfdx force:mdapi:retrieve -r . -k package.xml

        Unzip the package zip with the metadata and navigate to the directory with the external service:

        > unzip unpackaged.zip > cd unpackaged/externalServiceRegistrations

        Edit service bindings in the external service registration metadata file BankService.externalServiceRegistration:

        BankServiceEndpoint true getcreditrating Custom { ... } OpenApi {"compatibleMediaTypes" :{"application/x-acme-json" :"application/x-acme-json"}} Complete

        Note that the section (in bold, above) should not be broken by line breaks as it may break deserialization.

        835 Extend Salesforce with Clicks, Not Code External Services

        The service binding specifies in JSON format the non-permitted MIME types defined by this external service registration:

        {"compatibleMediaTypes":{ "application/x-acme-json":"application/x-acme-json" }}

        Map the non-permitted MIME type to the permitted MIME type for the external service payload serialization:

        {"compatibleMediaTypes":{ "application/x-acme-json":"application/json" }}

        The updated metadata for the bank rating external service sample registration respects the MIME type mapping to the permitted MIME type when deployed in a package:

        BankService true getcreditrating Custom { ... } OpenApi {"compatibleMediaTypes" :{"application/x-acme-json" :"application/json"}} Complete

        Note that the section should not be broken by line breaks as it may break deserialization. Save the edited external service registration metadata file and deploy it:

        > cd ../.. > sfdx force:mdapi:deploy -d unpackaged

        For more information see Salesforce DX Developer Guide.

        Import MuleSoft APIs Import your MuleSoft Anypoint Platform APIs in a few clicks with External Services for MuleSoft. To use External Services for MuleSoft, you need a valid MuleSoft license or demo account.

        Configure a Connected App and Named Credentials To use External Services for MuleSoft, complete these setup steps. Register a MuleSoft-Hosted External Service Registering an external service for MuleSoft Anypoint Platform takes only a few steps and no code.

        836 Extend Salesforce with Clicks, Not Code External Services

        Configure a Connected App and Named Credentials To use External Services for MuleSoft, complete these setup steps.

        Create a Connected App in MuleSoft Anypoint Platform Set up a connected app in MuleSoft Anypoint Platform that allows Salesforce to call MuleSoft APIs. Create an Authentication Provider Use the ID and the secret from your MuleSoft Anypoint Platform connected app to create an authentication provider. Update Your MuleSoft Anypoint Platform Connected App Use the Salesforce authentication provider callback URL to update your MuleSoft Anypoint Platform connected app. Create a Named Credential Create a named credential to access your MuleSoft Anypoint Platform connected app from Salesforce.

        Create a Connected App in MuleSoft Anypoint Platform Set up a connected app in MuleSoft Anypoint Platform that allows Salesforce to call MuleSoft APIs. To use the External Services for MuleSoft wizard, you need a valid MuleSoft license or demo account. The MuleSoft user account must have full permissions for the API Manager and Exchange in your MuleSoft Anypoint Platform org. Complete these steps in MuleSoft Anypoint Platform. 1. Log in to MuleSoft Anypoint Platform. 2. Under Management Center, click Access Management. 3. In the Access Management menu, select Connected Apps. 4. Click Create app. 5. Enter a name for your app. 6. Ensure that App acts on behalf of a user is selected for Type. 7. Under Grant types, select Authorization Code, and then select Refresh Token. 8. In Website URL, enter https://www.salesforce.com. 9. In Redirect URIs, enter https://www.salesforce.com, and click Add.

        Note: This redirect URI is a temporary value that is updated after you create an authentication provider in your Salesforce org.

        10. For Who can use this application? select Members of this organization only. 11. Under Scopes, click Add Scopes. 12. In Add scopes, enable Background Access and Read-Only Access, and click Add scopes. 13. Save your changes. 14. On the Connected Apps page, click Copy Id, and paste the id into a text file. 15. Click Copy Secret, and paste it into the same text file. Create an authentication provider.

        837 Extend Salesforce with Clicks, Not Code External Services

        Create an Authentication Provider

        Use the ID and the secret from your MuleSoft Anypoint Platform connected app to create an EDITIONS authentication provider. To use External Services for MuleSoft, you need a valid MuleSoft license or demo account. Available in: Lightning Experience This setup requires the ID and secret that can be copied when you created your connected app in MuleSoft Anypoint Platform. Available in: Enterprise, Complete these steps. Performance, Unlimited, and Developer Editions 1. From Setup, in the Quick Find box, enter Auth. Providers, and then select Auth. Providers. 2. Click New. 3. For Provider Type, select Open ID Connect. 4. Specify a name like MuleSoft Anypoint Platform. 5. For Consumer Key, enter the ID that you copied when you created your connected app in MuleSoft Anypoint Platform. 6. For Consumer Secret, enter the secret that you copied when you created your connected app in MuleSoft Anypoint Platform. 7. For Authorize Endpoint URL, enter https://anypoint.mulesoft.com/accounts/api/v2/oauth2/authorize. 8. For Token Endpoint URL, enter https://anypoint.mulesoft.com/accounts/api/v2/oauth2/token. 9. Save your changes. 10. On the Auth. Provider Detail page, under Salesforce Configuration, copy the Callback URL. Update the connected app in MuleSoft Anypoint Platform.

        Update Your MuleSoft Anypoint Platform Connected App Use the Salesforce authentication provider callback URL to update your MuleSoft Anypoint Platform connected app. To use External Services for MuleSoft, you need a valid MuleSoft license or demo account. This setup requires the callback URL that can be copied when you created your authentication provider in Salesforce. Complete these steps in MuleSoft Anypoint Platform. 1. In Access Management, on the Connected Apps page, click the name of the connected app you created in MuleSoft Anypoint Platform. 2. On the Update App page, in Redirect URIs, enter the callback URL that you copied when you created an authentication provider in Salesforce, and click Add. 3. Delete the Redirect URI for https://www.salesforce.com. 4. Save your changes. Create a named credential.

        838 Extend Salesforce with Clicks, Not Code External Services

        Create a Named Credential

        Create a named credential to access your MuleSoft Anypoint Platform connected app from Salesforce. EDITIONS To use the External Services for MuleSoft wizard, you need a valid MuleSoft license or demo account. 1. From Setup, in the Quick Find box, enter Named Credentials, and then select Named Available in: Lightning Experience Credentials. 2. Click New Named Credential. Available in: Enterprise, Performance, Unlimited, 3. Enter a label for your named credential. The label can contain no spaces or special characters. and Developer Editions 4. (Optional) Enter a name for your named credentials, or use the name that the system generated based on the label you entered. 5. For URL, enter https://anypoint.mulesoft.com. 6. Select an Identity Type. a. To require that each Salesforce user log into MuleSoft Anypoint Platform from within their personal settings to get a token for their own use, select Per User. b. To allow one named credential to be shared by all users in your org, select Named Principal.

        7. For Authentication Protocol, select OAuth 2.0. 8. Select an Authentications Provider. For Authentication Provider, click the magnifying glass and select the name of the auth provider that you created. 9. For Scope, enter read:full offline_access. 10. Ensure that Start Authentication Flow on Save is enabled. 11. Save your changes.

        Note: If you receive the “No_Oauth_State: State was not sent back” error when saving the named credential, ensure that the selected scopes for your MuleSoft Anypoint Platform connected app are Read-Only Access and Background Access. You can also receive the error if the read:full offline_access scope you specified has a period at the end of it.

        12. (Optional) If you’re not already logged into MuleSoft Anypoint platform, log in now. 13. Grant read-only access and background access to your Salesforce user. 14. On the Named Credential Setup page, Authentication Status is now set to Authenticated. Import MuleSoft Anypoint Platform APIs.

        Register a MuleSoft-Hosted External Service

        Registering an external service for MuleSoft Anypoint Platform takes only a few steps and no code. EDITIONS To use External Services for MuleSoft, you need a valid MuleSoft license or demo account. 1. From Setup, in the Quick Find box, enter External Services, and then select External Available in: Lightning Experience Services. 2. Select New External Service, and click Next. Available in: Enterprise, Performance, Unlimited, 3. In the Select an API Source window, select From MuleSoft Anypoint Platform, and click and Developer Editions Next.

        Note: If you’re in an operationally isolated environment (OIE), the MuleSoft Anypoint Platform tile can’t be selected.

        839 Extend Salesforce with Clicks, Not Code External Services

        4. In the Select a MuleSoft Anypoint Platform Account window, select the named credential with the most access to MuleSoft.

        Important: External Services for MuleSoft use this credential to log in to MuleSoft Anypoint Platform and list MuleSoft APIs available for import. In a later step, you can specify a different named credential with more targeted access to MuleSoft to run the external service in the next step.

        5. In the Configure Your MuleSoft Anypoint Platform Service window, set up the details for your external service. a. Select a MuleSoft API. b. Enter a name for your external service. The name must start with a letter, can’t contain spaces or special characters, and be no longer than 80 characters. c. (Optional) Enter a description of your external service. If you don’t enter a description, the system-generated description is used. d. Select a named credential to use to run the external service. e. Ensure that Only include supported operations is enabled.

        Important: External Services for MuleSoft use this credential to run a MuleSoft API operation when the external service is called from a flow. You can select a named credential with more targeted access than the one you chose in the previous step.

        f. Click Save & Next.

        Note: Clicking Save & Next creates an external service record in Salesforce. After this step, you can’t change the MuleSoft API name or version associated with the external service. You can only change the external service name, description, named credential, and included MuleSoft API operations.

        6. In the Select Operations window, select up to 625 operations to include in your external service.

        Note: For limits, including the maximum number of operations allowed in your org, see External Services Considerations.

        7. Click Next. 8. Review your changes, and click Done. Use your external service in a flow.

        Create a Flow with External Services Design and test the automation that sends a user’s information from Salesforce to the external employee banking system. Create the variables for user phone numbers, and combine different phone numbers into one piece of data. Then use the external service action to create the user. 1. Define a named credential For the named credential that your org uses to access the banking system, assign the Bank label and the https://api.example.com URL. The named credential URL corresponds to the declared host of the API spec and one of its transfer protocol schemes or URL protocols. The URL can point to a different endpoint as long as it hosts the same external service. The base path is added to the named credential URL on callout.

        2. Register the employee banking system’s external service, using the steps described in Register an External Service on page 810 as a guide. Use the BankService name and the Bank named credential, and then copy the schema from one of the API spec examples. 3. Create a flow.

        840 Extend Salesforce with Clicks, Not Code External Services

        This example uses static values for simplicity. In contrast, a production flow with user data includes elements to get user records, store values to variables, and communicate these values to the external service.

        4. To handle the multiple phone numbers nested below the BankService_Phone value, add the two variable resources. a. Click Manager, and then click New Resource. b. For the resource type, select Variable. c. For the API name, enter WorkPhone. d. For the data type, select Apex-Defined. e. For the Apex class, select ExternalService__BankService_Phone.

        f. Click Done. g. Repeat these steps using the API name CellPhone.

        5. Add the variable resource that acts as the array for the phone number values. a. Click New Resource. b. For the resource type, select Variable. c. For the API name, enter Phones. d. For the data type, select Apex-Defined, and select the Allow multiple values (collection) option. e. For the Apex class, select ExternalService__BankService_Phone.

        841 Extend Salesforce with Clicks, Not Code External Services

        f. Click Done.

        6. Add the variable resource that stores the user’s name. a. Click New Resource. b. For the resource type, select Variable. c. For the API name, enter User. d. For the data type, select Apex-Defined. e. For the Apex class, select ExternalService__BankService_User. f. Click Done.

        7. Assign values to the work phone variable. a. From the Toolbox, click Elements. b. Drag an Assignment element to the canvas. c. For Label, enter Assign Work Phone, and let the API name autopopulate. d. Click Search variables, select WorkPhone, then select phone. The variable {!WorkPhone.phone} appears. e. For Value, enter 1234567890. f. Click Add Assignment.

        842 Extend Salesforce with Clicks, Not Code External Services

        g. Click Search variables, select WorkPhone, then select typeofphone. The variable {!WorkPhone.typeofphone} appears. h. For Value, enter Work.

        i. Click Done. j. Connect the Start element to this assignment element.

        8. Assign values to the cell phone variable. a. Drag an Assignment element to the canvas. b. For Label, enter Assign Cell Phone, and let the API name autopopulate. c. Click Search variables, select CellPhone, then select phone. The variable {!CellPhone.phone} appears. d. For Value, enter 0987654321 e. Click Add Assignment. f. Click Search variables, select CellPhone, then select typeofphone. The variable {!CellPhone.typeofphone} appears. g. For Value enter Cell. h. Click Done. i. Connect the last element to this one.

        843 Extend Salesforce with Clicks, Not Code External Services

        9. Assign multiple phone values to the single phone array variable. a. Drag an Assignment element to the canvas. b. For Label, enter Assign Phones, and let the API name autopopulate. c. Click Search variables then select Phones. The variable {!Phones} appears. d. Change the Operator to Add. e. For Value, select Workphone. f. Click Add Assignment. g. Click Search variables then select Phones again. h. Change the Operator to Add. i. For Value select Cellphone.

        j. Click Done. k. Connect the last element to this one.

        10. Assign the user values. a. Drag an Assignment element to the canvas.

        844 Extend Salesforce with Clicks, Not Code External Services

        b. For Label, enter Assign User, and let the API name autopopulate. c. Click Search variables, select User, then id. The variable {!User.id} appears. d. For Value, enter 1234. e. Click Add Assignment. f. Click Search variables, select User, then name. The variable {!User.name} appears. g. For Value, enter Maria. h. Click Add Assignment. i. Click Search variables, select User, then phones. The variable {!User.phones} appears. j. For Value, select Phones.

        k. Click Done. l. Connect the last element to this one.

        11. To create users on the external bank system, add the action generated by your external service schema.

        845 Extend Salesforce with Clicks, Not Code External Services

        a. Drag an Action element to the canvas. b. Filter the actions by type, and select External Service. c. Select postUser. d. For Label, enter Create a new user, and let the API name autopopulate. e. Next to >_user, click the toggle to include input values. f. From the lookup, select User.

        g. Click Done. h. Connect the last element to this one. Your canvas includes these elements.

        12. Save and debug the flow. A successful debug includes the assignment and External Service callout.

        846 Extend Salesforce with Clicks, Not Code External Services

        SEE ALSO: External Services Build a Flow

        Add Actions to an Einstein Bot Integrating your Einstein bot with a registered external service is now as easy as adding an action to a dialog. You can add an external service action to your bot from Einstein’s Bot Builder. Sometimes the data that your Einstein bot needs to personalize customer requests is stored outside of Salesforce. For example, a banking customer wants to update their account password and billing address in a single bot conversation. Or a retail customer starts a return process for a purchase and expects the bot to return a unique tracking number. Now you can automate these multi-platform requests directly from the Bot Builder, without writing a single line of code.

        SEE ALSO: Add an External Service Action

        847 Extend Salesforce with Clicks, Not Code External Services

        Edit, Delete, Save As, and View an External Service

        Find services that you already registered, view actions for a previously defined service, edit, clone, EDITIONS and delete a service. You can’t edit or delete an external service that is in use by a flow. Available in: Lightning Locate Registered External Services Experience To find your registered services, go to Setup, in the Quick Find box enter External Services, Available in: Enterprise, and then select External Services. Performance, Unlimited, and Developer Editions 1. Actions that you can select for your external service registration: View Actions, Edit, Save As, and Delete. 2. Service recreated with Save As and has the provided prefix of CopyOf in front of the name. Remember to change the name to something more descriptive of the service.

        View Actions To view actions available for a service that you defined with your schema, click the arrow in the service’s Actions column, and select View Actions.

        Edit To edit an external service, click the arrow in the service’s Actions column, and select Edit. You can modify these service settings: • Named Credential • Description • Service Schema (URL or JSON) • Operations

        Save As Save As allows you to recreate your external service registration. Use this action to clone an existing service without changing anything except the name of the new service. 1. To save settings to a new external service, click the arrow in the service’s Actions column, and select Save As. 2. On the Save External Service As page, enter a unique External Service Name

        Note: By default, External Services automatically adds the prefix CopyOf in front of the existing external service name. Modify the default name so that it’s unique and descriptive of the external service.

        3. Optionally change: • Named Credential • Description • Service Schema Relative URL or Complete JSON • Operations

        4. Click Next, then click Done from the External Service Actions page.

        848 Extend Salesforce with Clicks, Not Code External Services

        Delete To delete an external service, click the arrow in the service’s Actions column, and select Delete.

        Note: Legacy External Services has been retired in Summer ’21. If you still have legacy registrations, they are visible in the list. You can delete them. You can’t do anything else with your legacy External Services registrations, including editing them, recreating them, or using legacy registrations in a flow. For more information, see Knowledge Article Legacy External Services Retirement.

        Recreate an External Service

        Recreate your external service, and update the related flows. EDITIONS 1. From Setup in Lightning Experience, enter External Services in the Quick Find box, and select External Services. Available in: Lightning Experience 2. Under Actions, next to the name of the external service that you want to recreate, click Save As. Available in: Enterprise, Performance, Unlimited, 3. Note: External Services fills in most of the necessary information, including a modified and Developer Editions external service’s name, named credential used, description, and schema URL or JSON. Modify the external service name so that it’s different from the original registration. If you don’t USER PERMISSIONS provide a name, External Services automatically adds the prefix CopyOf in front of the existing external service name. To manage connections: 4. Verify or change the named credential used, description, schema URL, or JSON. • Customize Application 5. Click Save & Next. 6. If needed, modify the selected operations. 7. Click Next. 8. Click Done. 9. Update the flows that use the actions from the original external service. To locate actions for External Services registrations, filter the actions by type, and select External Service. To find actions that aren’t from External Services registrations, filter by type, and select Apex Action. 10. Return to External Services in Setup. 11. Under Actions, for the original external service that you recreated, click Delete.

        SEE ALSO: Register an External Service

        External Services and Packaging

        You can install or create packages containing an external service. Read these tips before you begin. EDITIONS Consuming an External Services Package Any flow within the package or newly added flows outside the package can reference external Available in: Lightning Experience service actions. Creating an External Services Package Available in: Enterprise, Performance, Unlimited, To ensure that subscriber orgs that install a package can use the External Service actions from the and Developer Editions External Services registration: Add named credential components to the external services registration

        849 Extend Salesforce with Clicks, Not Code External Services

        package. Alternatively, a subscriber can create a named credential in the subscriber org using the same name as the one specified in the external services registration that references it.

        Note: Legacy External Services has been retired in Summer ’21. If you still have legacy registrations, they are visible in the list. You can delete them. You can’t do anything else with your legacy External Services registrations, including editing them, recreating them, or using legacy registrations in a flow. For more information, see Knowledge Article Legacy External Services Retirement.

        SEE ALSO: External Services Components Available in Managed Packages

        Testing External Service Actions in Flow Test the example flow MyAtmFlow with a flow external service action MyAtmExternalService by implementing the HttpCalloutMock interface that provides a test response without performing the callout to the external service endpoint. MyAtmExternalService is registered with a Named Credential MyAtmNamedCredential, has operation getBalance with String accountId as path parameter and Integer pin as header parameter. Its output is a JSON data structure with the account ID, account holder, balance and account type. The HTTP callout mock implementation reacts to an expected test request by responding with the appropriate HTTP response output:

        global class MyAtmHttpCalloutMock implements HttpCalloutMock { global HTTPResponse respond(HTTPRequest request) { // Assert expected request test data System.assertEquals('GET', request.getMethod()); System.assertEquals('callout:MyAtmNamedCredential/A123-456', request.getEndpoint());

        System.assertEquals('1234', request.getHeader('pin'));

        // Send response test data HttpResponse response = new HttpResponse(); response.setHeader('Content-Type', 'application/json'); response.setBody('{"availableBal": 0, "name": "Account Holder", ' + '"type": "Checking", "accountId": "A123-456"}'); response.setStatusCode(200); return response; } }

        The flow test class sets up the HTTP callout mock for the external service action it’s calling. It creates a flow interview with input parameter values to test, runs the flow interview and then asserts the actual flow output parameters with expected test values:

        @IsTest public class MyAtmFlowTest { @IsTest static public void testMyAtmFlow() { // Set HTTP callout mock to match flow's external service action invocation Test.setMock(HttpCalloutMock.class, new MyAtmHttpCalloutMock());

        // Set flow input variables and create the flow interview Map inputVariables = new Map(); Flow.Interview myAtmFlow = Flow.Interview.createInterview('MyAtmFlow', inputVariables);

        850 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        // Start flow interview with set input variables myAtmFlow.start();

        // Assert flow output variables System.assertEquals('expected', (String)myAtmFlow.getVariableValue('myFlowOutput')); } }

        Access External Data With Salesforce Connect Salesforce Connect lets your users view, search, and modify data that’s stored outside your Salesforce org. Instead of copying the data into standard or custom objects, use external objects to access the data in real time via web service callouts.

        Salesforce Connect Salesforce Connect provides seamless integration of data across system boundaries by letting your users view, search, and modify data that’s stored outside your Salesforce org. For example, perhaps you have data that’s stored on premises in an enterprise resource planning (ERP) system. Instead of copying the data into your org, you can use external objects to access the data in real time via web service callouts. External Data Sources With Salesforce Connect Salesforce Connect uses external data sources to access data that's stored outside your Salesforce org. You must configure an external data source and synchronize it to map its tables with external objects in Salesforce. Salesforce Platform Features Supported by Salesforce Connect Salesforce Connect provides seamless integration with the Salesforce Platform and enables users to view, search, and modify external object data. Access Data in Another Salesforce Org with the Cross-Org Adapter for Salesforce Connect Connect your users to data that's stored in another Salesforce org. Access External Data with the OData 2.0 or 4.0 Adapter for Salesforce Connect Connect your users to data that's exposed via the Open Data Protocol. Access External Data with a Custom Adapter for Salesforce Connect Connect your users to any data anywhere by developing your own custom adapter with the Apex Connector Framework.

        851 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Salesforce Connect

        Salesforce Connect provides seamless integration of data across system boundaries by letting your EDITIONS users view, search, and modify data that’s stored outside your Salesforce org. For example, perhaps you have data that’s stored on premises in an enterprise resource planning (ERP) system. Instead Available in: both Salesforce of copying the data into your org, you can use external objects to access the data in real time via Classic (not available in all web service callouts. orgs) and Lightning Traditionally, we’ve recommended importing or copying data into your Salesforce org to let your Experience (not for users access that data. For example, extract, transform, and load (ETL) tools can integrate third-party high-data-volume external systems with Salesforce. However, doing so copies data into your org that you don’t need or that objects) quickly becomes stale. Available in: Developer In contrast, Salesforce Connect maps Salesforce external objects to data tables in external systems. Edition Instead of copying the data into your org, Salesforce Connect accesses the data on demand and in Available for an extra cost real time. The data is never stale, and we access only what you need. We recommend that you use in: Enterprise, Performance, Salesforce Connect when: and Unlimited Editions • You have a large amount of data that you don’t want to copy into your Salesforce org. • You need small amounts of data at any one time. • You want real-time access to the latest data. Even though the data is stored outside your org, Salesforce Connect provides seamless integration with the Lightning Platform. External objects are available to Salesforce tools, such as global search, lookup relationships, record feeds, and the Salesforce mobile app. External objects are also available to Apex, SOSL, SOQL queries, Salesforce APIs, and deployment via the Metadata API, change sets, and packages. For example, you store product order information in a back-office ERP system. You want to view those orders as a related list on each customer record in your Salesforce org. Salesforce Connect enables you to set up a lookup relationship between the customer object (parent) and the external object (child) for orders. Then you can set up the page layouts for the parent object to include a related list that displays child records. Going a step further, you can update the orders directly from the related list on the customer record. By default, external object records are read only. But you can define the external data source to enable writable external objects. For information about using Apex DML write operations on external object records, see the Apex Developer Guide.

        Note: If transmitting potentially sensitive information, including sensitive or regulated data such as personal health data or financial data, Salesforce recommends that customers encrypt their external data sources at rest. Transmissions through the Salesforce Connect service are already encrypted using mTLS.

        Example: This screenshot shows how Salesforce Connect can provide a seamless view of data across system boundaries. A record detail page for the Business_Partner external object includes two related lists of child objects. The external lookup relationships and page layouts enable users to view related data from inside and from outside the Salesforce org on a single page. • Account standard object (1) • Sales_Order external object (2)

        852 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Salesforce Connect Adapters Salesforce Connect uses a protocol-specific adapter to connect to an external system and access its data. When you define an external data source in your organization, you specify the adapter in the Type field. Salesforce Connect Adapters Included per Add-On License Using Salesforce Connect to access external data in an org requires one or more Salesforce Connect add-on licenses. General Limits for Salesforce Connect Understand the limits that are applicable to all Salesforce Connect adapters.

        SEE ALSO: External Data Sources With Salesforce Connect External Object Relationships Salesforce Platform Features Supported by Salesforce Connect Set Up Salesforce Connect to Access Data in Another Org with the Cross-Org Adapter Set Up Salesforce Connect to Access External Data with the OData 2.0 or 4.0 Adapter Set Up Salesforce Connect to Access External Data with a Custom Adapter

        853 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Salesforce Connect Adapters

        Salesforce Connect uses a protocol-specific adapter to connect to an external system and access EDITIONS its data. When you define an external data source in your organization, you specify the adapter in the Type field. Available in: both Salesforce These adapters are available for Salesforce Connect. Classic (not available in all orgs) and Lightning Salesforce Description When to Use Experience (not for Connect high-data-volume external Adapter objects) Cross-org Uses the Lightning Platform REST API to To seamlessly connect data between Available in: Developer access data that’s stored in other your Salesforce orgs. For example, Edition Salesforce orgs. provide your service representatives a Available for an extra cost unified view of customer transactions by in: Enterprise, Performance, integrating data from different Salesforce and Unlimited Editions orgs.

        OData 2.0 Uses Open Data Protocol to access data To integrate external data sources into OData 4.0 that’s stored outside Salesforce. The your org that support the ODATA external data must be exposed via OData protocol and publish an OData provider. producers. For example, give your account executives a unified data view by pulling data from legacy systems such as SAP, Microsoft, and Oracle in real time.

        Custom You use the Apex Connector Framework To develop your own adapter with the adapter to develop your own custom adapter Apex Connector Framework when the created via when the other available adapters aren’t other available adapters aren’t suitable Apex suitable for your needs. for your needs. For example, when you A custom adapter can obtain data from want to retrieve data via callouts from a anywhere. For example, some data can REST API. be retrieved from anywhere in the Internet via callouts, while other data can be manipulated or even generated programmatically.

        SEE ALSO: Salesforce Connect OData 2.0 or 4.0 Adapter for Salesforce Connect Cross-Org Adapter for Salesforce Connect Custom Adapter for Salesforce Connect Salesforce Connect Adapters Included per Add-On License

        854 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Salesforce Connect Adapters Included per Add-On License

        Using Salesforce Connect to access external data in an org requires one or more Salesforce Connect EDITIONS add-on licenses. Each Salesforce Connect add-on license includes a set number of connections per adapter type. A Available in: both Salesforce Salesforce Connect add-on license is associated with a single Salesforce org. Classic (not available in all orgs) and Lightning Salesforce Connect Adapter Number of Connections per License Experience (not for high-data-volume external Cross-org 5 objects)

        OData 2.0, OData 4.0, or a custom adapter 1 Available in: Developer Edition Available for an extra cost The number of Salesforce Connect add-on licenses you need depends on where the data is stored in: Enterprise, Performance, and which type of connections are required. These are some common data integration scenarios and Unlimited Editions and the number of licenses required. • Your primary Salesforce org accesses data stored in six other Salesforce orgs. You need two Salesforce Connect add-on licenses. Both Salesforce Connect add-on licenses are assigned to the primary org. • Your primary Salesforce org accesses data stored in one secondary Salesforce org. The secondary org accesses the primary org data. You need two Salesforce Connect add-on licenses, one for each org. • Your primary Salesforce org accesses data stored in five other Salesforce orgs and one external data source. You need one Salesforce Connect add-on license, which is assigned to the primary org.

        SEE ALSO: Salesforce Connect Salesforce Connect Adapters OData 2.0 or 4.0 Adapter for Salesforce Connect Cross-Org Adapter for Salesforce Connect Custom Adapter for Salesforce Connect

        General Limits for Salesforce Connect

        Understand the limits that are applicable to all Salesforce Connect adapters. EDITIONS The assigned user license determines the maximum number of custom objects that each user can access. You can also grant object permissions up to that same number of external objects. External Available in: both Salesforce objects don’t count toward the amount for custom objects. Classic (not available in all orgs) and Lightning Maximum external objects per org1 200 Experience (not for high-data-volume external Note: If the default value for external objects in your org is 100, create objects) a support case to increase your org limit to 200. Available in: Developer Maximum joins per query across external objects and other types of objects 4 Edition Available for an extra cost Maximum length of the OAuth token that’s issued by the external system 4,000 characters in: Enterprise, Performance, Maximum new rows retrieved by SOSL and Salesforce searches per hour. 100,000 and Unlimited Editions

        855 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        This limit doesn’t apply to high-data-volume external data sources.

        Maximum new rows retrieved or created per hour. 100,000 This limit doesn’t apply to: • High-data-volume external data sources • Rows that are retrieved only as search results and aren’t opened or edited • Other rows that have already been retrieved

        Maximum page size for server-driven paging 2,000 rows

        1 The amount of 200 external objects applies regardless of how many Salesforce Connect add-ons you purchase for your org. External objects don’t count toward the amount for custom objects.

        Callout Limits for Salesforce Connect Adapters Salesforce Connect accesses the external data in real time via Web service callouts to external data sources. • Cross-org adapter: No callout limits. However, each callout counts toward the API usage limits of the provider org. See API Request Limits and Allocations. • OData 2.0 and OData 4.0 adapter – 20,000 OData callouts per hour for Enterprise, Performance, and Unlimited editions. If you require higher limits, create a support case. – 1,000 OData callouts per hour for Developer Edition.

        • Custom adapter: See Callout Limits and Limitations and Execution Governors and Limits in the Apex Developer Guide.

        SEE ALSO: Salesforce Connect Salesforce Platform Features Supported by Salesforce Connect

        External Data Sources With Salesforce Connect

        Salesforce Connect uses external data sources to access data that's stored outside your Salesforce EDITIONS org. You must configure an external data source and synchronize it to map its tables with external objects in Salesforce. Available in: both Salesforce Classic (not available in all Identity Type for External Data Sources orgs) and Lightning On the external data source configured for Salesforce Connect, the Identity Type field Experience (not for high-data-volume external specifies whether your organization uses one set or multiple sets of credentials to access the objects) external system. Each set of credentials corresponds to a login account on the external system. Sync an External Data Source for Salesforce Connect Available in: Developer Edition When you validate and sync an external data source, it creates or overwrites Salesforce external objects that map to the external system’s schema. Syncing doesn’t copy any data into your Available for an extra cost Salesforce org or write data from your org to the external system. in: Enterprise, Performance, and Unlimited Editions

        856 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        External Objects in Salesforce Connect External objects behave similar to custom objects except that they map to data stored outside Salesforce in an external data source. Each external object maps to a data table, and the object fields map to accessible table columns. Record IDs for Salesforce Connect External Objects The first time a data row is retrieved from an external system, the external object record is assigned a Salesforce ID. Each record ID remains associated with the same external data row, unless the external object is deleted from the org. Writable External Objects in Salesforce Connect Select Writable External Objects when you define an external data source and use Salesforce Connect external objects to create, update, and delete data. External objects are read only by default.

        SEE ALSO: Salesforce Connect Salesforce Platform Features Supported by Salesforce Connect Work with External Data Sources

        Identity Type for External Data Sources

        On the external data source configured for Salesforce Connect, the Identity Type field EDITIONS specifies whether your organization uses one set or multiple sets of credentials to access the external system. Each set of credentials corresponds to a login account on the external system. Available in: both Salesforce If you select Named Principal, your organization uses only one login account on the external Classic (not available in all system. orgs) and Lightning Experience (not for If you select Per User, your organization uses multiple login accounts on the external system. Each high-data-volume external of your users can have a unique set of credentials, or you can group your users—for example, by objects) function or business unit—and have each group share a set of credentials. After you grant user access to the external data source through permission sets or profiles, users can set up and manage Available in: Developer their own authentication settings for the external system. Edition Available for an extra cost Note: For an external data source with Per User Identity Type, site members in Experience in: Enterprise, Performance, Cloud can’t set up their own credentials. However, as an admin you can set up and manage and Unlimited Editions each user’s authentication settings for external systems from Lightning Experience or Salesforce Classic.

        Identity Type is Named Principal Identity Type is Per User To access the external system’s... The system uses the credentials that are defined in the... Data External data source definition User’s personal authentication settings for (search or view external objects) the external system

        Metadata External data source definition External data source definition (sync to create external objects)

        857 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Tip: Train your users on how to set up their authentication settings for external systems. Make sure that they know which credentials to enter for each external system. If you’re using OAuth 2.0, test the OAuth flow for potentially confusing prompts or redirects, and train your users as needed. OAuth flows vary, depending on your external system, authentication provider, and specified scopes.

        SEE ALSO: Define an External Data Source for Salesforce Connect—Cross-Org Adapter Define an External Data Source for Salesforce Connect—OData 2.0 or 4.0 Adapter Define an External Data Source for Salesforce Connect—Custom Adapter Grant Access to Authentication Settings for External Data Sources Store Authentication Settings for External Systems

        Sync an External Data Source for Salesforce Connect

        When you validate and sync an external data source, it creates or overwrites Salesforce external EDITIONS objects that map to the external system’s schema. Syncing doesn’t copy any data into your Salesforce org or write data from your org to the external system. Available in: both Salesforce Syncing fails if it causes your org to exceed 200 external objects. Syncing also fails if it tries to create Classic (not available in all an external object with an API name that conflicts with an existing object in the org. In such cases, orgs) and Lightning determine whether the existing object is needed. Experience (not for high-data-volume external • If the object isn’t needed, delete that object, and sync again. objects) • If the object is needed, change the API name of the existing object to no longer conflict with the table that you're trying to sync. However, if the existing object is an external object that Available in: Developer Edition was previously synced, you can’t resync it. Manually update the external object and its fields as needed for schema changes on the external system. Available for an extra cost in: Enterprise, Performance, Tip: We recommend that you create your external data sources and external objects in a and Unlimited Editions Developer Edition org. Then use managed packages to deploy the external data sources and external objects to your other orgs. Doing so prevents your external object names from conflicting with other objects in your org by applying a namespace prefix. When an external object is created via syncing, its Deployment Status is set to In Development. When you’re ready to expose the external object to users, set the status to Deployed. If the external system’s schema changes, the modifications aren’t automatically synced to your Salesforce org. To reflect the changes in the external system, resync the objects. After resyncing, all users who have the same profile as the user who initiated the resync are granted field-level access to the external objects. When you resync an external object: • The Display URL Reference Field is set to None. • If a custom field has the Is Name Field attribute, the attribute is removed. The External ID standard field is used as the name field of the external object. • The Deployment Status doesn’t change.

        858 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        To understand how syncing affects relationship fields on external objects, see Relationships on External Objects on page 173.

        SEE ALSO: Salesforce Connect Salesforce Platform Features Supported by Salesforce Connect Deployment Status for Custom Objects and External Objects Validate and Sync an External Data Source

        External Objects in Salesforce Connect

        External objects behave similar to custom objects except that they map to data stored outside EDITIONS Salesforce in an external data source. Each external object maps to a data table, and the object fields map to accessible table columns. Available in: both Salesforce As with custom objects, you must create custom tabs to display external object data in Salesforce. Classic (not available in all When you add a custom tab to an app in Salesforce Classic, it appears as a tab. When you add a orgs) and Lightning custom tab to an app in Lightning Experience, it appears as an item in the app’s navigation bar and Experience (not for in the App Launcher. See Create a Custom Object Tab. high-data-volume external objects) To know the field types that you can create for external objects, see Custom Field Types. Some special behavior for text and number fields on external objects. Available in: Developer Edition • Text fields: Ensure that the field length matches the length of the associated field on the external object to avoid any display or edit issues. Available for an extra cost in: Enterprise, Performance, • Number fields: Ensure that the specified length can contain all digits to the left of the decimal and Unlimited Editions point in external values. If the numeric value from an external system doesn’t fit within the length of the associated number field on the external object, the value is blank in your Salesforce org. If you notice blank numeric field values, adjust Length and Decimal Places for the number field on the external object to accommodate more digits to the left of the decimal point. If the digits to the right of the decimal point in the external values don’t fit within the specified decimal places, the value is truncated. When a custom field on an external object record is displayed, leading and trailing spaces are removed from the field value. Keep this behavior in mind when you filter by a field that contains leading or trailing spaces. For example, include the leading and trailing spaces in the following SOQL query to match the values that are stored in the external system. However, the spaces aren’t displayed in the query results.

        SELECT FirstName__c FROM Buyers__x WHERE FirstName__c = ' Test '

        Note: Formulas and Roll-up Summary fields can’t reference fields on external objects.

        Features Not Supported • Set up Data with External Objects – Merge Fields – Schema Builder – Validation Rules – Custom fields • Field types not supported – Auto-Number (available only with the cross-org adapter for Salesforce Connect)

        859 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        – Currency (available only with the cross-org adapter for Salesforce Connect) – Formula – Geolocation – Master-Detail Relationship – Picklist and Picklist (Multi-select) (available only with the cross-org adapter for Salesforce Connect) – Roll-up Summary – Text (Encrypted) – Text Area (Rich)

        • Lookup filter on relationship fields • Default field values

        • Record-level security to manage data access for external objects • Record types to customize external data • Productivity Tools – Activities, Events, and Tasks – Attachments – Notes

        SEE ALSO: External Object Relationships Considerations for Relationships External Data Sources With Salesforce Connect Manage Custom Objects

        Record IDs for Salesforce Connect External Objects

        The first time a data row is retrieved from an external system, the external object record is assigned EDITIONS a Salesforce ID. Each record ID remains associated with the same external data row, unless the external object is deleted from the org. Available in: both Salesforce Note: Classic (not available in all orgs) and Lightning • Salesforce IDs aren’t assigned to external object records that are associated with Experience high-data-volume external data sources. Available in: Developer • In a near future release, temporary Salesforce record IDs will be assigned to external object Edition records that are retrieved by SOSL and Salesforce searches, rather than permanent IDs. To prepare for this change, don’t create code or use third-party integrations that require Available for an extra cost these record IDs to remain associated with the same external data rows. For existing code in: Enterprise, Performance, and Unlimited Editions

        860 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        and integrations, we recommend removing dependencies on external object record IDs to avoid issues when this change is rolled out.

        SEE ALSO: Record IDs and External IDs for External Objects in Salesforce Connect—Cross-Org Adapter Salesforce Connect External Data Sources With Salesforce Connect

        Writable External Objects in Salesforce Connect

        Select Writable External Objects when you define an external data source and use Salesforce EDITIONS Connect external objects to create, update, and delete data. External objects are read only by default. External systems execute write operations initiated from Salesforce and also handle write conflicts, Available in: both Salesforce if any. Classic (not available in all orgs) and Lightning • It can take some time for changes to external object records to take effect. If you don’t see Experience (not for recent changes when you view or query an external object record, try again later. high-data-volume external • It can’t be guaranteed that all write operations that are initiated from Salesforce are applied in objects) case of write conflicts. Available in: Developer If Salesforce attempts to save changes to an external object and a standard or custom object in the Edition same transaction, an error occurs. As a best practice, we recommend you use a separate transaction Available for an extra cost to access or modify data in an external system. in: Enterprise, Performance, Write operations on external object records initiated from different contexts can occur in varying and Unlimited Editions order. When you create, update, or delete external object records via the user interface, processes or flows, operations occur synchronously. When Apex is used to perform external records operations, operations occur asynchronously and an active background queue minimizes potential save conflicts. To monitor an asynchronous job progress, use BackgroundOperation.

        Note: When a custom field on an external object record is edited, leading and trailing spaces are removed from the field value.

        SEE ALSO: Salesforce Connect Salesforce Platform Features Supported by Salesforce Connect External Data Sources With Salesforce Connect Apex Developer Guide: Writable External Objects

        861 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Salesforce Platform Features Supported by Salesforce Connect

        Salesforce Connect provides seamless integration with the Salesforce Platform and enables users EDITIONS to view, search, and modify external object data. Available in: both Salesforce Reports Classic (not available in all Depending on network latency and the availability of the external system, reports that include orgs) and Lightning an external object can take a long time to run. Experience (not for high-data-volume external Record Feed objects) View the Chatter feed associated with external object records you follow to see updates about the record. Following records helps keep you up to date on important changes to the external Available in: Developer Edition objects. Available for an extra cost Quick Actions in: Enterprise, Performance, External objects support quick actions, except when the actions involve features or functionality and Unlimited Editions that are incompatible with external objects. Flows and Processes You can build flows and processes that include external objects and automate your organization’s repetitive business tasks. Salesforce App You can view and search external objects from the Salesforce mobile app, Salesforce on the go! Salesforce Console You can access external objects from the Salesforce console only in Salesforce Classic. Other consoles, such as the Salesforce console in Lightning Experience, aren’t supported. More Features Supported by Salesforce Connect External objects are available to Salesforce APIs, SOQL queries, SOSL and Salesforce searches, SOQL queries, packages, Metadata API, change sets, and Lightning Experience app.

        SEE ALSO: Salesforce Connect External Data Sources With Salesforce Connect Cross-Org Adapter for Salesforce Connect OData 2.0 or 4.0 Adapter for Salesforce Connect Custom Adapter for Salesforce Connect

        862 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Reports

        Depending on network latency and the availability of the external system, reports that include an EDITIONS external object can take a long time to run. When you run a report that includes external objects, your org performs a request callout for each Available in: both Salesforce external object in the report. And if it’s a joined report, your org performs separate request callouts Classic (not available in all for each block. If the URL of a report callout approaches or exceeds 2 KB, the request is split into orgs) and Lightning multiple HTTP calls, with each URL being less than 2 KB Experience (not for high-data-volume external A report that includes an external object fetches up to 20,000 records for the primary object. If the objects) report is customized to include child objects, the total number of rows can be greater or less than 10,000, depending on how many child records are fetched. To obtain more relevant external object Available in: Developer rows, try customizing the report. Edition For custom reports that include external objects as the primary object Available for an extra cost in: Enterprise, Performance, • If the deployment status of the external object changes, custom report type’s Deployment and Unlimited Editions Status changes similarly from Deployed to In Development. See Deployment Status for Custom Objects and External Objects. • If the external object is deleted, custom report type and reports created from it are deleted. For large external data sets, report callouts typically access only a subset of the external data. If the report includes summary fields and formulas, those aggregate values likely reflect only a subset of your data. To improve the accuracy of the aggregate values and obtain more relevant data, try customizing the report. As is true for all callouts for external objects, report callouts are limited by the Salesforce Connect adapters in use. • Cross-org adapter: No callout limits. However, each callout counts toward the API usage limits of the provider org. See API Request Limits and Allocations. • OData 2.0 and OData 4.0 adapter – 20,000 OData callouts per hour for Enterprise, Performance, and Unlimited editions. If you require higher limits, create a support case. – 1,000 OData callouts per hour for Developer Edition.

        • Custom adapter: See Callout Limits and Limitations and Execution Governors and Limits in the Apex Developer Guide.

        Features Not Supported • Converted currency fields • Cross filters • Buckets and bucket fields • Historical trend reporting

        SEE ALSO: Reports and Dashboards Limits, Limitations, and Allocations Troubleshoot Reports External Object Relationships Salesforce Platform Features Supported by Salesforce Connect

        863 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Record Feed

        View the Chatter feed associated with external object records you follow to see updates about the EDITIONS record. Following records helps keep you up to date on important changes to the external objects. Available in: both Salesforce Features Not Supported Classic (not available in all orgs) and Lightning • Field history tracking. Experience (not for • External objects that map to high-data-volume external data sources. high-data-volume external objects)

        SEE ALSO: Available in: Developer Records and List Views Edition Salesforce Connect Available for an extra cost Salesforce Platform Features Supported by Salesforce Connect in: Enterprise, Performance, and Unlimited Editions

        Quick Actions

        External objects support quick actions, except when the actions involve features or functionality EDITIONS that are incompatible with external objects. With custom quick actions, you can make your users’ navigation and workflow as smooth as possible Available in: both Salesforce by giving them convenient access to information that’s most important. For example, you can let Classic (not available in all users quickly create or update records, send emails, and more in the context of the external object. orgs) and Lightning Experience (not for high-data-volume external Features Not Supported objects) • Log a Call action: Creating tasks isn’t available for external objects. Available in: Developer • Predefined Field Values for Quick Action Fields: Formulas can’t reference external object fields. Edition Available for an extra cost SEE ALSO: in: Enterprise, Performance, Action Types and Unlimited Editions Salesforce Connect Salesforce Platform Features Supported by Salesforce Connect

        864 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Flows and Processes

        You can build flows and processes that include external objects and automate your organization’s EDITIONS repetitive business tasks. If a flow or a process accesses standard or custom objects along with external objects, you must Available in: both Salesforce commit the changes to the standard or custom object before accessing the external objects. We Classic (not available in all recommend using a separate transaction to access data from the external system. orgs) and Lightning Experience (not for • In Flow Builder, add a screen, local action, or Pause element that pauses until a flow-based time high-data-volume external occurs. See Flow Elements. objects) • In Process Builder, add a scheduled action. See Add Actions to Your Process. Available in: Developer To understand how processes interact with external objects, see Compatibility Considerations for Edition Processes. Available for an extra cost To know the limits while building flows with external objects, see External Object Considerations in: Enterprise, Performance, for Flows. and Unlimited Editions

        Features Not Supported These are the automation tool features that aren’t available for external objects in Salesforce Connect. • Approval Processes • Workflow Rules

        SEE ALSO: Flow Builder Process Builder Salesforce Connect Salesforce Platform Features Supported by Salesforce Connect

        Salesforce App

        You can view and search external objects from the Salesforce mobile app, Salesforce on the go! EDITIONS As with custom objects, external objects must be assigned to tabs that users can access, and object permissions must be granted via profiles or permission sets. When you search for an external object, Available in: both Salesforce click More in the Recent section to view the search results. Classic (not available in all orgs) and Lightning When external objects are used with Salesforce for iOS and Salesforce mobile web on iOS devices, Experience (not for you must select Enable Search in the associated external data sources. Only then external objects high-data-volume external appear in these apps. This requirement doesn’t apply to custom adapters for Salesforce Connect. objects)

        Available in: Developer SEE ALSO: Edition Salesforce Mobile App Available for an extra cost Salesforce Connect in: Enterprise, Performance, Salesforce Platform Features Supported by Salesforce Connect and Unlimited Editions

        865 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Salesforce Console

        You can access external objects from the Salesforce console only in Salesforce Classic. Other consoles, EDITIONS such as the Salesforce console in Lightning Experience, aren’t supported. External objects haven’t been fully adapted to a console and can cause unexpected behaviors. Available in: both Salesforce Unlike other objects that haven’t been fully adapted to a console, external objects aren’t marked Classic (not available in all with asterisks in the console setup area. orgs) and Lightning Experience (not for high-data-volume external SEE ALSO: objects) Salesforce Console in Salesforce Classic Available in: Developer Salesforce Classic Console Limitations Edition Salesforce Connect Available for an extra cost Salesforce Platform Features Supported by Salesforce Connect in: Enterprise, Performance, and Unlimited Editions

        More Features Supported by Salesforce Connect

        External objects are available to Salesforce APIs, SOQL queries, SOSL and Salesforce searches, SOQL EDITIONS queries, packages, Metadata API, change sets, and Lightning Experience app. • API Query Available in: both Salesforce Classic (not available in all – To know how Salesforce Connect accesses the external data in real time via Web service orgs) and Lightning callouts, see query(), queryAll(), and queryMore(). Experience (not for – To understand the limitations that apply to queryAll() and queryMore() calls high-data-volume external on external data, see External Objects in the SOAP API Developer Guide. objects) – To implement server-driven or client-driven paging for external object data that’s obtained Available in: Developer by a custom adapter, see Paging with the Apex Connector Framework. Edition • SOQL Available for an extra cost – To know about the specific limits SOQL applies to external objects, see External objects in in: Enterprise, Performance, SOQL Limits on Objects. and Unlimited Editions – To understand the limitations for external objects when you design SOQL relationship queries, see Understanding Relationship Query Limitations.

        • SOSL and Salesforce searches – To know about the specific limits SOSL applies to external objects in search results, see SOSL Limits on External Object Search Results. – To learn about how to add RETURNING clause to a SOSL query with external objects, see RETURNING FieldSpec. – To understand how search works with external objects, look for external objects in Searchable Fields by Object in Lightning Experience and Searchable Fields by Object in Salesforce Classic. – (Salesforce Classic only) Search results for external object display only the top 25 rows.

        • Packaging – To understand how packaging affects external data sources and external objects, see Special Behavior of Components in Packages. – To know what components are automatically included in the package when you add external data sources and external objects, see Components Automatically Added to Packages.

        866 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        – To learn about the behavior of external data sources and external objects with permission sets or profile settings, see About Permission Sets and Profile Settings.

        • Deployment via the Metadata API: In Metadata API, external objects are represented as CustomObject. • Change Sets: External objects are included in the Custom Object component. See Components Available in Change Sets. • Lightning Experience app: When you access external objects from the Lightning Experience app, the associated external data sources must have the High Data Volume option deselected. This requirement doesn’t apply to the cross-org adapter for Salesforce Connect.

        SEE ALSO: Salesforce Connect Salesforce Platform Features Supported by Salesforce Connect Writable External Objects in Salesforce Connect

        Access Data in Another Salesforce Org with the Cross-Org Adapter for Salesforce Connect Connect your users to data that's stored in another Salesforce org.

        Cross-Org Adapter for Salesforce Connect Collaborate more effectively and improve processes by connecting the data across your Salesforce orgs. With the cross-org adapter, Salesforce Connect uses Lightning Platform REST API calls to access records in other Salesforce orgs. Nevertheless, setup is quick and easy with point-and-click tools. Set Up Salesforce Connect to Access Data in Another Org with the Cross-Org Adapter Provide users with seamless access to data in your other Salesforce orgs so that they have a complete view of the business. Setting up the cross-org adapter for Salesforce Connect is quick and easy with point-and-click tools. Considerations for Salesforce Connect—Cross-Org Adapter Understand the special behaviors, limits, and recommendations for using the cross-org adapter for Salesforce Connect.

        Cross-Org Adapter for Salesforce Connect

        Collaborate more effectively and improve processes by connecting the data across your Salesforce EDITIONS orgs. With the cross-org adapter, Salesforce Connect uses Lightning Platform REST API calls to access records in other Salesforce orgs. Nevertheless, setup is quick and easy with point-and-click tools. Available in: both Salesforce Your users and the Lightning Platform interact with other orgs’ data via external objects. The Classic (not available in all cross-org adapter for Salesforce Connect converts each of those interactions into a Lightning orgs) and Lightning Platform REST API call. Experience (not for high-data-volume external Suppose that you store your inventory of products in one Salesforce org. You want your regional objects) and local branch offices, who have their own orgs, to see the latest information about your stock. With the cross-org adapter for Salesforce Connect, those other organizations can easily access your Available in: Developer data while respecting access restrictions that you control. Edition The cross-org adapter makes a Lightning Platform REST API call each time that: Available for an extra cost in: Enterprise, Performance, • A user clicks an external object tab for a list view. and Unlimited Editions • A user views a record detail page of an external object.

        867 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        • A user views a record detail page of a parent object that displays a related list of child external object records. • A user performs a Salesforce global search. • A user creates, edits, or deletes an external object record. • A user runs a report. • The preview loads in the report builder. • An external object is accessed via flows, processes, APIs, Apex, SOQL, or SOSL. • You validate or sync an external data source. To set up Salesforce Connect with the cross-org adapter, you use only point-and-click tools.

        Subscriber and Provider Orgs in Salesforce Connect—Cross-Org Adapter The provider org stores the data that the subscriber org accesses. API Names for External Objects and Custom Fields in Salesforce Connect—Cross-Org Adapter If external objects and custom fields are created in the subscriber org via syncing, their API names are derived from the corresponding API names in the provider org. Record IDs and External IDs for External Objects in Salesforce Connect—Cross-Org Adapter External object record IDs are derived from the corresponding record IDs in the provider organization. External ID values in external object records match the record IDs in the provider organization. User Access to External Data in Salesforce Connect—Cross-Org Adapter A user’s access to external data is determined by settings on both subscriber and provider orgs.

        SEE ALSO: Salesforce Connect Set Up Salesforce Connect to Access Data in Another Org with the Cross-Org Adapter Considerations for Salesforce Connect—Cross-Org Adapter

        Subscriber and Provider Orgs in Salesforce Connect—Cross-Org Adapter

        The provider org stores the data that the subscriber org accesses. EDITIONS You define the external data source and external objects in the subscriber org. Manually create the external objects and their fields, or automatically create them by syncing the provider org’s metadata. Available in: both Salesforce When users view or search those external objects in the subscriber org, the data is obtained from Classic (not available in all the provider org and displayed in the subscriber org. When users create or edit external object orgs) and Lightning records in the subscriber org, the data is saved in the provider org. Experience (not for high-data-volume external • An org can serve as both a subscriber and a provider. objects) • A subscriber org can access data from multiple provider orgs. Available in: Developer • A provider org can let multiple subscriber orgs access its data. Edition Available for an extra cost SEE ALSO: in: Enterprise, Performance, Cross-Org Adapter for Salesforce Connect and Unlimited Editions

        868 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        API Names for External Objects and Custom Fields in Salesforce Connect—Cross-Org Adapter

        If external objects and custom fields are created in the subscriber org via syncing, their API names EDITIONS are derived from the corresponding API names in the provider org. Each external object’s API name ends with __x. Custom fields on external objects use the traditional Available in: both Salesforce __c suffix in the API name. Specifically for objects and custom fields that are synced with the Classic (not available in all cross-org adapter for Salesforce Connect: orgs) and Lightning Experience • For an API name with no suffix in the provider org, the API name is reused in the subscriber org, but with an applied __x suffix for an object or __c suffix for a field. Available in: Developer • For an API name with a suffix in the provider org, the API name is reused in the subscriber org. Edition But one of the underscores (_) from the original suffix is removed, and a new __x or __c Available for an extra cost suffix is applied. in: Enterprise, Performance, and Unlimited Editions Example: If you sync the provider org’s Account object, the subscriber org creates: • An external object with the API name Account__x • Custom fields including one with the API name Account__x.Name__c If you sync the provider org’s CustObj__c object, the subscriber org creates: • An external object with the API name CustObj_c__x • Custom fields including one with the API name CustObj_c__x.Name__c If the provider org’s object has a custom field, the subscriber org creates the custom field on the equivalent external object, for example: • Account__x.MyCustField_c__c • CustObj_c__x.MyOtherCustField_c__c If you sync the provider org’s Account__x external object, the subscriber org creates: • An external object with the API name Account_x__x • Custom fields including one with API name Account_x__x.Name_c__c

        SEE ALSO: Cross-Org Adapter for Salesforce Connect

        Record IDs and External IDs for External Objects in Salesforce Connect—Cross-Org Adapter

        External object record IDs are derived from the corresponding record IDs in the provider organization. EDITIONS External ID values in external object records match the record IDs in the provider organization. Each object in Salesforce has an object ID with a key prefix as the first three characters. When an Available in: both Salesforce external object is created, it’s assigned a unique key prefix. Classic and Lightning Experience Each external object record has a record ID that uses the same key prefix as the external object ID. The rest of the external object record ID matches the original record ID that’s in the provider Available in: Developer organization, excluding its original key prefix. Edition Each record ID that comes from the provider organization becomes a case-insensitive 18-character Available for an extra cost alphanumeric string in the subscriber organization. in: Enterprise, Performance, and Unlimited Editions The original record ID is available in the subscriber organization as the value of the External ID standard field on the external object record.

        869 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Each external object has an External ID standard field. Its values uniquely identify each external object record in your org. When the external object is the parent in an external lookup relationship, the External ID standard field is used to identify the child records.

        Example: You sync the provider organization’s Account object, and the subscriber organization’s Account__x object is assigned the key prefix x00. An account in the provider organization with the ID 001B0000003SVC7IAO appears in the subscriber organization with the ID x00B0000003SVC7IAO and the external ID 001B0000003SVC7IAO.

        SEE ALSO: Cross-Org Adapter for Salesforce Connect

        User Access to External Data in Salesforce Connect—Cross-Org Adapter

        A user’s access to external data is determined by settings on both subscriber and provider orgs. EDITIONS The credentials that are used by the subscriber org to connect to the provider org are associated with a user in the provider org. We refer to this user as the connected user. Available in: both Salesforce Classic (not available in all A user in the subscriber org can access only data that the connected user can access within the orgs) and Lightning provider org. In other words, the subscriber org’s user access respects the connected user’s access Experience (not for restrictions, which are determined by these settings in the provider org. high-data-volume external • Object-level security—permission sets and profiles objects)

        • Field-level security—permission sets and profiles Available in: Developer • Record-level security—organization-wide sharing settings, role hierarchies, and sharing rules Edition In the subscriber org, grant users access to external objects via permission sets and profiles. Available for an extra cost in: Enterprise, Performance, and Unlimited Editions SEE ALSO: Cross-Org Adapter for Salesforce Connect Set Up Salesforce Connect to Access Data in Another Org with the Cross-Org Adapter

        Set Up Salesforce Connect to Access Data in Another Org with the Cross-Org Adapter

        USER PERMISSIONS EDITIONS

        To create and edit external data sources: Customize Application Available in: both Salesforce Classic and Lightning To create and edit external objects: Customize Application Experience To define or change object-level help: Customize Application Available in: Developer To create and edit custom fields: Customize Application Edition Available for an extra cost To edit permission sets and user profiles: Manage Profiles and Permission Sets in: Enterprise, Performance, To edit another user’s authentication settings Manage Users and Unlimited Editions for external systems:

        Provide users with seamless access to data in your other Salesforce orgs so that they have a complete view of the business. Setting up the cross-org adapter for Salesforce Connect is quick and easy with point-and-click tools. Setting up Salesforce Connect with the cross-org adapter involves these high-level steps.

        870 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        1. Define an external data source of type Salesforce Connect: Cross-Org. Create an external data source for each provider org.

        2. Create the external objects. Perform this task only if you don’t sync to automatically create the external objects. In the subscriber org, create an external object for each object in the provider org that you want to access.

        3. Create help content for the external objects. Help your users distinguish between external objects and the other objects in the subscriber org, which can have similar names and types of data. On the subscriber org, create Visualforce pages to describe the external objects. When your users click Help for this Page on an external object, they read your custom help content.

        4. Add custom fields and relationships to the external objects. Create relationships between objects. If you didn’t sync to automatically create the external objects and their fields on the subscriber org, create a custom field for each of the provider org’s fields that you want to access.

        5. Enable user access to external objects. Grant object permissions through permission sets or profiles.

        6. Enable user access to the fields on the external objects. Grant field permissions through permission sets or profiles.

        7. If the external data source uses per-user authentication: a. Let users authenticate to the external system. Grant users access to authentication settings for the external data source through permission sets or profiles.

        b. Set up each user’s authentication settings. You or your users can perform this task.

        Tip: Train your users on how to set up their authentication settings for external systems. Make sure that they know which credentials to enter for the provider org. If you’re using OAuth 2.0, the OAuth flow displays the Salesforce login page twice: first to log in to the provider org to obtain an access token, and then to log back in to the subscriber org. Test the OAuth flow for potentially confusing prompts or redirects, and train your users as needed. OAuth flows vary, depending on your external system, authentication provider, and specified scopes.

        SEE ALSO: Cross-Org Adapter for Salesforce Connect Considerations for Salesforce Connect—Cross-Org Adapter Developer Guide: Visualforce Developer Guide External Object Relationships Subscriber and Provider Orgs in Salesforce Connect—Cross-Org Adapter

        871 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Define an External Data Source for Salesforce Connect—Cross-Org Adapter

        Give your users seamless access to data across your Salesforce orgs. EDITIONS 1. From Setup, enter External Data Sources in the Quick Find box, then select External Data Sources. Available in: both Salesforce Classic and Lightning 2. Click New External Data Source, or click Edit to modify an existing external data source. Experience 3. Complete the fields. Available in: Developer Edition Field Description Available for an extra cost Label A user-friendly name for the external data source. The label is displayed in: Enterprise, Performance, in the Salesforce user interface, such as in list views. and Unlimited Editions If you set Identity Type to Per User, this label appears when your users view or edit their authentication settings for external systems. USER PERMISSIONS To create and edit external Name A unique identifier that’s used to refer to this external data source data sources: definition through the API. • Customize Application The name can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.

        Type Select Salesforce Connect: Cross-Org.

        Connect to Determines which URL is used to connect to the provider org.

        URL If you selected Connect to Custom URL, enter the login URL for the provider org.

        API Version Select an API version that the provider org supports. The API version determines which of the provider org’s objects, fields, and types you can access from the subscriber org.

        Connection Number of seconds to wait for a response from the provider org before Timeout timing out. By default, the value is set to the maximum of 120 seconds.

        Writable Lets the Lightning platform and users in this org create, update, and External delete records for external objects associated with the external data Objects source. The external object data is stored outside the org. By default, external objects are read only.

        Enable Search Determines whether global searches in the subscriber org also search the external objects’ data, which is stored in the provider org. When selected, you can control which external objects are searchable by selecting or deselecting Allow Search on each external object. Only text, text area, and long text area fields on external objects can be searched. If an external object has no searchable fields, searches on that object return no records.

        872 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Field Description Identity Type Determines whether the subscriber org uses one set or multiple sets of credentials to access the provider org. See Identity Type for External Data Sources on page 857.

        4. Select the authentication protocol. • If you select Password Authentication, enter the username and password for accessing the external system. • If you select OAuth 2.0, complete the following fields.

        Field Description Authentication Select a Salesforce authentication provider. See “Configure a Salesforce Authentication Provider” Provider in the Salesforce Help.

        Note: On a production org, an external data source can’t use an authentication provider that directs authorization or token requests to a sandbox org. Similarly, on a sandbox org, an external data source can’t use an authentication provider that directs authorization or token requests to a production org.

        Scope Specifies the scope of permissions to request for the access token. Your authentication provider determines the allowed values. See Use the Scope Parameter.

        Note: – The value that you enter replaces the Default Scopes value that’s defined in the specified authentication provider. – Whether scopes are defined can affect whether each OAuth flow prompts the user with a consent screen. – We recommend that you request a refresh token or offline access. Otherwise, when the token expires, you lose access to the external system.

        Start To authenticate to the external system and obtain an OAuth token, select this checkbox. This Authentication Flow authentication process is called an OAuth flow. on Save When you click Save, the external system prompts you to log in. After successful login, the external system grants you an OAuth token for accessing its data from this org. Redo the OAuth flow when you need a new token—for example, if the token expires—or if you edit the Scope or Authentication Provider fields. When the token expires, the external system returns a 401 HTTP error status.

        5. Click Save. 6. Click Validate and Sync, and confirm that the connection is successful. If you instead receive an error message, refer to the following documents. • “Status Codes and Error Responses” in the REST API Developer Guide • The “API Fault Element,” “ExceptionCode,” “Error,” and “StatusCode” sections of “Core Data Types Used in API Calls” in the SOAP API Developer Guide

        873 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        7. Optionally, select tables and click Sync to do the following for each selected table. • Automatically create a Salesforce external object. • Automatically create a custom field for each table column that’s compatible with a Salesforce metadata field type.

        Note: Before you sync, make sure that you understand the considerations that are described in these topics. • Sync an External Data Source for Salesforce Connect on page 858 • Sync Considerations for Salesforce Connect—Cross-Org Adapter on page 875

        You can instead choose to manually create the external objects and custom fields that map to the external data. Doing so lets you customize the external object names, decide which table columns to create custom fields for, and customize the custom field names. However, this approach takes longer and requires manual maintenance.

        SEE ALSO: Set Up Salesforce Connect to Access Data in Another Org with the Cross-Org Adapter Store Authentication Settings for External Systems API Names for External Objects and Custom Fields in Salesforce Connect—Cross-Org Adapter Subscriber and Provider Orgs in Salesforce Connect—Cross-Org Adapter Developer Guide: REST API Developer Guide

        Considerations for Salesforce Connect—Cross-Org Adapter

        Understand the special behaviors, limits, and recommendations for using the cross-org adapter for EDITIONS Salesforce Connect. Also review the considerations that apply to all Salesforce Connect adapters. Available in: both Salesforce Classic (not available in all orgs) and Lightning Salesforce Compatibility Considerations for Salesforce Connect—Cross-Org Adapter Experience (not for Some Salesforce features and functionality have special behaviors or aren’t available for external high-data-volume external objects that are associated with an external data source of type Salesforce Connect: objects) Cross-Org. Available in: Developer Sync Considerations for Salesforce Connect—Cross-Org Adapter Edition When you validate and sync an external data source of type Salesforce Connect: Available for an extra cost Cross-Org, some special behaviors and limitations apply. in: Enterprise, Performance, Writable External Objects Considerations for Salesforce Connect—Cross-Org Adapter and Unlimited Editions Some behaviors and limitations affect writable external objects that are associated with the cross-org adapter for Salesforce Connect. API Usage Considerations for Salesforce Connect—Cross-Org Adapter With the cross-org adapter, Salesforce Connect uses Lightning Platform REST API calls to access records in other Salesforce orgs. Depending on how the external object is accessed, each call counts toward the API usage limits of only the provider org or of both provider and subscriber orgs. Picklist Considerations for Salesforce Connect—Cross-Org Adapter Special behaviors and limitations apply to picklist and multi-select picklist fields on external objects.

        874 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Currency Considerations for Salesforce Connect—Cross-Org Adapter Special behaviors and limitations apply to currency fields on external objects.

        SEE ALSO: Salesforce Platform Features Supported by Salesforce Connect

        Salesforce Compatibility Considerations for Salesforce Connect—Cross-Org Adapter

        Some Salesforce features and functionality have special behaviors or aren’t available for external EDITIONS objects that are associated with an external data source of type Salesforce Connect: Cross-Org. Available in: both Salesforce • The cross-org adapter for Salesforce Connect can access only queryable objects in the provider Classic and Lightning org. If you define an external object whose table name specifies an object that can’t be queried, Experience your users and the Lightning Platform can’t access that external object. Available in: Developer • You can’t use Salesforce Connect external objects to access big objects in another org. Edition • When you deploy an external data source that uses OAuth 2.0 from a sandbox org to a Available for an extra cost production org, you must update the authentication provider. On a production org, an external in: Enterprise, Performance, data source can’t use an authentication provider that directs authorization or token requests and Unlimited Editions to a sandbox org. Similarly, on a sandbox org, an external data source can’t use an authentication provider that directs authorization or token requests to a production org. Also review the considerations that apply to all Salesforce Connect adapters.

        Sync Considerations for Salesforce Connect—Cross-Org Adapter

        When you validate and sync an external data source of type Salesforce Connect: EDITIONS Cross-Org, some special behaviors and limitations apply. • Which objects and fields can be synced is determined by the object permissions and field Available in: both Salesforce permissions of the provider org’s user whose credentials are defined in the external data source Classic (not available in all definition. See User Access to External Data in Salesforce Connect—Cross-Org Adapter on page orgs) and Lightning 870. Experience (not for high-data-volume external • Only queryable objects can be synced. objects) • You can’t sync an object whose API name contains 38 or more characters. An external object’s name can’t exceed 40 characters, including the automatically appended __x suffix. See API Available in: Developer Names for External Objects and Custom Fields in Salesforce Connect—Cross-Org Adapter on Edition page 869. Available for an extra cost • These field types aren’t synced. in: Enterprise, Performance, and Unlimited Editions – Encrypted text – Rich text area

        • Global picklist value sets aren’t synced. If a provider org’s picklist field uses a global picklist value set, syncing creates a local picklist field on the subscriber org. A local picklist field has its own set of values. • Inactive picklist values aren’t synced. If the subscriber org accesses an external object record that contains an inactive picklist value, the inactive value is added to the picklist field on the external object.

        • Syncing converts restricted picklists on the provider org into unrestricted picklists on the subscriber org’s external objects.

        875 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        We recommend having only unrestricted picklists on external objects, even when they’re associated with restricted picklists on the provider org. Restricted picklists on the provider org block unapproved values from the subscriber org, eliminating the need to restrict picklists on external objects.

        • To enable users to change the currency when editing an external object record, add the Currency field to the page layouts. All other synced fields are automatically added to the default page layout. • Syncing always enables search on the external object when search is enabled on the external data source, and vice versa. • Hierarchical, lookup, and master-detail relationship fields are synced. However, they become text fields in the subscriber org, and their values appear as IDs, not as record names. For example, suppose that we sync the Account object. When we view the Acme Wireless account in the provider org, the value of the Account Owner (Account.OwnerId) field appears as John Smith. When we view the equivalent account in the subscriber org, the value for the (Account__x.OwnerId__c) field appears as 005B00000019eapIAA.

        • You can use external lookup relationships in the subscriber org to mirror lookup relationships in the provider org. For each lookup relationship that you want to bring into the subscriber org, sync the parent and child objects. Each lookup relationship field becomes a text field on the subscriber org. Change the field type of the sync-created text field to External Lookup Relationship. When specifying the parent of the external lookup relationship, select the external object that corresponds to the parent object in the provider org. • The names and labels of synced fields on the subscriber org are derived from the API names—not the labels—of the fields on the provider org. For example, the Account object in the provider org has the Account Owner (OwnerId) standard field. If we sync the Account object, the Account__x.OwnerId__c field in the subscriber org has the label “Owner ID” and the name “OwnerId.”

        Important: When you select the provider org objects to sync, determine whether check marks appear in the Synced column. If a Synced check mark appears, the subscriber org has an external object whose object name (for example, Account__x) associates it with the object in the provider org (for example, Account). If you select the object and click Sync: • The external object is overwritten. • Any custom field on the external object is overwritten if its API name (for example, Email_c__c) associates it with a field on the provider org (for example, Email__c). • Any other custom fields on the external object remain as they are, including: – Previously synced custom fields whose API names were changed by editing their Field Name values. – Manually added custom fields whose API names aren’t associated with fields on the provider org’s object.

        If no Synced check mark appears, and you sync the object, a new external object is created in the subscriber org. For example, the object name is changed on the provider org to no longer be associated with the object name of the external object on the subscriber org. Syncing that object creates a new external object on the subscriber org. We recommend that you change the object name of the existing external object to match the updated object name on the provider org before you sync.

        Also review the considerations that apply to all Salesforce Connect adapters.

        SEE ALSO: API Names for External Objects and Custom Fields in Salesforce Connect—Cross-Org Adapter Subscriber and Provider Orgs in Salesforce Connect—Cross-Org Adapter Sync an External Data Source for Salesforce Connect Cross-Org Adapter for Salesforce Connect

        876 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Writable External Objects Considerations for Salesforce Connect—Cross-Org Adapter

        Some behaviors and limitations affect writable external objects that are associated with the cross-org EDITIONS adapter for Salesforce Connect. • Some fields remain read only on writable external objects, such as fields that are creatable but Available in: both Salesforce not editable and fields that have derived or calculated values. For example: Classic (not available in all orgs) and Lightning – Address fields such as Billing Address and Shipping Address, which are Experience (not for derived from writable fields, such as Street Address, State, and Zip) high-data-volume external – Auto-number fields objects) – Created by fields Available in: Developer – Formula fields Edition – Last Modified fields Available for an extra cost – Roll-up summaries in: Enterprise, Performance, and Unlimited Editions • Picklist values on external objects can get out of sync with picklist values on the provider org. If picklist values are changed on the provider org, resync or manually delete and recreate the associated picklist fields on the subscriber org. • Enable multiple currencies in the subscriber org, and make sure that the subscriber org has all the currencies that the provider orgs use. If a currency is later added to the provider org, add the currency to the subscriber org. If you can’t enable multiple currencies in the subscriber org, make sure that all provider orgs are single-currency and use the same currency as the subscriber org.

        • To enable users to change the currency when editing an external object record, add the Currency field to the page layouts. • If a user tries to change the currency in an external object record, the list of currency options isn’t limited to active currencies in the provider org. If the user selects a currency that’s inactive or unavailable in the provider org, the user gets an error and can’t save the record. • You can use external lookup relationships in the subscriber org to mirror lookup relationships in the provider org. For each lookup relationship that you want to bring into the subscriber org, sync the parent and child objects. Each lookup relationship field becomes a text field on the subscriber org. Change the field type of the sync-created text field to External Lookup Relationship. When specifying the parent of the external lookup relationship, select the external object that corresponds to the parent object in the provider org. Also review the considerations that apply to all Salesforce Connect adapters.

        SEE ALSO: Writable External Objects in Salesforce Connect Sync an External Data Source for Salesforce Connect Cross-Org Adapter for Salesforce Connect

        877 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        API Usage Considerations for Salesforce Connect—Cross-Org Adapter

        With the cross-org adapter, Salesforce Connect uses Lightning Platform REST API calls to access EDITIONS records in other Salesforce orgs. Depending on how the external object is accessed, each call counts toward the API usage limits of only the provider org or of both provider and subscriber orgs. Available in: both Salesforce When a user accesses an external object in one of the following ways, the Lightning Platform REST Classic (not available in all API call counts toward the API usage limits of the provider org. orgs) and Lightning Experience (not for • Opening a list view of external object records high-data-volume external • Viewing an external object record detail page objects) • Viewing a parent object record that contains an external object related list Available in: Developer • Viewing a child object record that contains an external lookup field Edition • Executing a search that also searches external objects Available for an extra cost • Accessing an external object from a flow, Visualforce page, Apex class, or Apex trigger in: Enterprise, Performance, • Creating, editing, or deleting an external object record and Unlimited Editions • Running a report • Editing a report and causing the preview to load in report builder If a user or system accesses an external object through the SOAP API, Bulk API, or Lightning Platform REST API, that access counts toward the API usage limits of both the subscriber org and the provider org.

        SEE ALSO: Salesforce Limits Quick Reference Guide: API Request Limits and Allocations Considerations for Salesforce Connect—Cross-Org Adapter Subscriber and Provider Orgs in Salesforce Connect—Cross-Org Adapter

        Picklist Considerations for Salesforce Connect—Cross-Org Adapter

        Special behaviors and limitations apply to picklist and multi-select picklist fields on external objects. EDITIONS • You can edit picklist values on external objects, but changes to fields on the provider org aren’t automatically reflected in the subscriber org. To reflect changes on the subscriber org, resync Available in: both Salesforce the external object or manually update the picklist values on the external object. Classic (not available in all orgs) and Lightning If you don’t resync or update the picklist values on the external object: Experience (not for – When an active picklist value is added to the provider org, the subscriber org doesn’t display high-data-volume external it as an available picklist value on external object records. objects)

        – When an active picklist value is deleted from or made inactive on a restricted picklist on Available in: Developer the provider org, the subscriber org can’t create or edit external object records with that Edition value. Available for an extra cost • Global picklist value sets aren’t synced. If a provider org’s picklist field uses a global picklist value in: Enterprise, Performance, set, syncing creates a local picklist field on the subscriber org. A local picklist field has its own and Unlimited Editions set of values. • Inactive picklist values aren’t synced. If the subscriber org accesses an external object record that contains an inactive picklist value, the inactive value is added to the picklist field on the external object.

        • Syncing converts restricted picklists on the provider org into unrestricted picklists on the subscriber org’s external objects.

        878 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        • We recommend having only unrestricted picklists on external objects, even when they’re associated with restricted picklists on the provider org. Restricted picklists on the provider org block unapproved values from the subscriber org, eliminating the need to restrict picklists on external objects.

        SEE ALSO: Sync Considerations for Salesforce Connect—Cross-Org Adapter Subscriber and Provider Orgs in Salesforce Connect—Cross-Org Adapter Considerations for Salesforce Connect—Cross-Org Adapter Picklist Considerations for Salesforce Connect—OData 2.0 or 4.0 Adapter

        Currency Considerations for Salesforce Connect—Cross-Org Adapter

        Special behaviors and limitations apply to currency fields on external objects. EDITIONS • Enable multiple currencies in the subscriber org, and make sure that the subscriber org has all the currencies that the provider orgs use. If a currency is later added to the provider org, add Available in: both Salesforce the currency to the subscriber org. Classic (not available in all orgs) and Lightning If you can’t enable multiple currencies in the subscriber org, make sure that all provider orgs Experience (not for are single-currency and use the same currency as the subscriber org. high-data-volume external • To enable users to change the currency when editing an external object record, add the objects) Currency field to the page layouts. Available in: Developer • If a user tries to change the currency in an external object record, the list of currency options Edition isn’t limited to active currencies in the provider org. If the user selects a currency that’s inactive Available for an extra cost or unavailable in the provider org, the user gets an error and can’t save the record. in: Enterprise, Performance, • The convertCurrency() function is ignored in SOQL queries of external objects. and Unlimited Editions

        SEE ALSO: Considerations for Enabling Multiple Currencies Considerations for Salesforce Connect—Cross-Org Adapter Subscriber and Provider Orgs in Salesforce Connect—Cross-Org Adapter

        Access External Data with the OData 2.0 or 4.0 Adapter for Salesforce Connect Connect your users to data that's exposed via the Open Data Protocol.

        OData 2.0 or 4.0 Adapter for Salesforce Connect Connect to your back office for a complete view of your business. With the OData 2.0 or 4.0 adapter, Salesforce Connect uses Open Data Protocol Version 2.0 or Version 4.0 to access data that’s stored outside Salesforce. Set Up Salesforce Connect to Access External Data with the OData 2.0 or 4.0 Adapter Let users view and search data that’s stored outside your Salesforce org, such as data in an enterprise resource planning (ERP) system. Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters Understand the special behaviors, limits, and recommendations for using the OData 2.0 or 4.0 adapter for Salesforce Connect. Picklist Considerations for Salesforce Connect—OData 2.0 or 4.0 Adapter Special behaviors and limitations apply to picklist fields on external objects.

        879 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        OData Reference for Salesforce Connect—OData 2.0 and 4.0 Adapters Get to know the Salesforce implementation of the Open Data Protocol (OData) for accessing external systems with Salesforce Connect. Use External Change Data Capture to Track Data Changes on External Objects With External Change Data Capture, you can track changes to data that is stored outside your Salesforce org when using the Odata 4.0 adapter. You can then build automation in response to the changes to increase productivity or provide a better customer experience.

        OData 2.0 or 4.0 Adapter for Salesforce Connect

        Connect to your back office for a complete view of your business. With the OData 2.0 or 4.0 adapter, EDITIONS Salesforce Connect uses Open Data Protocol Version 2.0 or Version 4.0 to access data that’s stored outside Salesforce. Available in: both Salesforce Your users and the Lightning Platform interact with the external data via external objects. Salesforce Classic (not available in all Connect converts each of those interactions into an OData query that contains the relevant orgs) and Lightning parameters to filter the results. Salesforce performs an OData callout each time that: Experience (not for high-data-volume external • A user clicks an external object tab for a list view. objects) • A user views a record detail page of an external object. Available in: Developer • A user views a record detail page of a parent object that displays a related list of child external Edition object records. Available for an extra cost • A user performs a Salesforce global search. in: Enterprise, Performance, • A user creates, edits, or deletes an external object record. and Unlimited Editions • A user runs a report. • The preview loads in the report builder. • An external object is accessed via flows, processes, APIs, Apex, SOQL, or SOSL. • You validate or sync an external data source. The OData 2.0 adapter for Salesforce Connect can access external data that’s exposed via services called OData producers. Learn more about OData producers at www.odata.org. To understand the limitations on Apex code accessing external objects via the OData adapters, see Apex Considerations for Salesforce Connect External Objects.

        External IDs and OData Entity Keys When you access external data with the OData 2.0 or 4.0 adapter for Salesforce Connect, the values of the External ID standard field on an external object are derived according to the entity key that’s defined in the OData service metadata document. Client-driven and Server-driven Paging for Salesforce Connect—OData 2.0 and 4.0 Adapters It's common for Salesforce Connect queries of external data to have a large result set that's broken into smaller batches or pages. You decide whether to have the paging behavior controlled by the external system (server-driven) or by the OData 2.0 or 4.0 adapter for Salesforce Connect (client-driven).

        880 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        General Limits for Salesforce Connect—OData 2.0 and 4.0 Adapters Understand the limits for the OData adapters for Salesforce Connect.

        SEE ALSO: Salesforce Connect Set Up Salesforce Connect to Access External Data with the OData 2.0 or 4.0 Adapter Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters OData Reference for Salesforce Connect—OData 2.0 and 4.0 Adapters

        External IDs and OData Entity Keys

        When you access external data with the OData 2.0 or 4.0 adapter for Salesforce Connect, the values EDITIONS of the External ID standard field on an external object are derived according to the entity key that’s defined in the OData service metadata document. Available in: both Salesforce Each external object has an External ID standard field. Its values uniquely identify each Classic (not available in all external object record in your org. When the external object is the parent in an external lookup orgs) and Lightning relationship, the External ID standard field is used to identify the child records. Experience (not for high-data-volume external Important: Don’t use sensitive data as the values of the External ID standard field or fields objects) designated as name fields, because Salesforce sometimes stores those values. Available in: Developer • External lookup relationship fields on child records store and display the External ID values Edition of the parent records. Available for an extra cost • For internal use only, Salesforce stores the External ID value of each row that’s retrieved in: Enterprise, Performance, from the external system. This behavior doesn’t apply to external objects that are associated and Unlimited Editions with high-data-volume external data sources.

        This list view for the Order_Detail external object displays External ID values.

        Each External ID value is derived according to the entity key that’s defined in the OData service metadata document of the remote data service (OData producer). The entity key is formed from a subset of the entity type’s properties. This excerpt from an OData service metadata document shows that the External ID values for the Order_Detail external object are derived from the OrderID and ProductID properties.

        881 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        ...

        This record detail page displays the OrderID and ProductID fields. Their values are combined to create the value of the External ID standard field.

        If you enable writable external objects, determine whether the external system requires write operations to specify values for the entity keys. For example, many external systems generate values for entity keys when new external object records are created in Salesforce. If your external system requires write operations to specify values for entity keys, ensure that External ID standard field values and entity key values don’t contradict each other. For each write operation, include either the External ID standard field value or the custom field values that form the entity key, but never both.

        SEE ALSO: OData 2.0 or 4.0 Adapter for Salesforce Connect Writable External Objects in Salesforce Connect

        Client-driven and Server-driven Paging for Salesforce Connect—OData 2.0 and 4.0 Adapters

        It's common for Salesforce Connect queries of external data to have a large result set that's broken EDITIONS into smaller batches or pages. You decide whether to have the paging behavior controlled by the external system (server-driven) or by the OData 2.0 or 4.0 adapter for Salesforce Connect Available in: both Salesforce (client-driven). Classic (not available in all By default, the OData 2.0 and 4.0 adapters for Salesforce Connect use client-driven paging. orgs) and Lightning Specifically, the OData requests use the $top and $skip system query options to page through Experience (not for the result set. high-data-volume external objects) With server-driven paging, the external system determines the page sizes and batch boundaries. The external system’s paging settings can optimize the external system’s performance and improve Available in: Developer the load times for external objects in your org. Also, the external data set can change while your Edition users or the Lightning Platform are paging through the result set. Typically, server-driven paging Available for an extra cost adjusts batch boundaries to accommodate changing data sets more effectively than client-driven in: Enterprise, Performance, paging. and Unlimited Editions

        882 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        The Server Driven Pagination field on the external data source specifies whether to use client-driven or server-driven paging. If you enable server-driven paging on an external data source, Salesforce ignores the requested page sizes, including the default queryMore() batch size of 500 rows. The pages returned by the external system determine the batches, but each page can’t exceed 2,000 rows. However, the limits for the OData adapters for Salesforce Connect still apply.

        SEE ALSO: Define an External Data Source for Salesforce Connect—OData 2.0 or 4.0 Adapter General Limits for Salesforce Connect—OData 2.0 and 4.0 Adapters OData Query String Options

        General Limits for Salesforce Connect—OData 2.0 and 4.0 Adapters

        Understand the limits for the OData adapters for Salesforce Connect. EDITIONS An org is limited to: • 20,000 OData callouts per hour for Enterprise, Performance, and Unlimited editions. If you require Available in: both Salesforce Classic (not available in all higher limits, create a support case. orgs) and Lightning • 1,000 OData callouts per hour for Developer Edition. Experience (not for • 100k new external object record IDs per hour for long-term ID mapping high-data-volume external • 100k new external object record IDs per hour for short-term ID mapping objects) Available in: Developer Note: To view external object records in Lightning Experience, Salesforce Connect maps the Edition external IDs of the record to Salesforce IDs. Mappings classified as short-term refer to records retrieved via Search results only. Mappings classified as long-term refer to records retrieved Available for an extra cost by all other Lightning Experience components, such as List Views. Record IDs not viewed in in: Enterprise, Performance, 365 days are subject to deletion unless the mappings have customer data attached to them. and Unlimited Editions

        Maximum HTTP request size for OData 8 MB

        Maximum HTTP response size for OData 8 MB

        Maximum result set size for an OData query 16 MB

        Maximum result set size for an OData subquery 1,000 rows

        SEE ALSO: General Limits for Salesforce Connect OData Callout Rate Limit Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters OData 2.0 or 4.0 Adapter for Salesforce Connect Record IDs for Salesforce Connect External Objects

        883 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Set Up Salesforce Connect to Access External Data with the OData 2.0 or 4.0 Adapter

        USER PERMISSIONS EDITIONS

        To create and edit external data sources: Customize Application Available in: both Salesforce Classic (not available in all To create and edit external objects: Customize Application orgs) and Lightning To define or change object-level help: Customize Application Experience (not for high-data-volume external To create and edit custom fields: Customize Application objects)

        To edit permission sets and user profiles: Manage Profiles and Permission Sets Available in: Developer To edit another user’s authentication settings Manage Users Edition for external systems: Available for an extra cost in: Enterprise, Performance, and Unlimited Editions Let users view and search data that’s stored outside your Salesforce org, such as data in an enterprise resource planning (ERP) system. Setting up Salesforce Connect with anOData 2.0 or 4.0 adapter involves these high-level steps. 1. Define an external data source of type Salesforce Connect: OData 2.0 or Salesforce Connect: OData 4.0. If your external system hosts multiple services, create an external data source for each service endpoint. Each service endpoint points to an OData service root URL and can expose collections of entities. For example, you’d create a separate external data source for each of these service endpoints. • http://services.example.org/Warehouse.svc • https://services.example.org/Payroll.svc

        2. Create the external objects. Perform this task only if you don’t sync to automatically create the external objects. Create an external object for each external data table that you want to access from your Salesforce org.

        3. Create help content for the external objects. Create Visualforce pages that describe the external data. When your users click Help for this Page on an external object, they read your custom help content. Remember, your users can’t find information about the external data in Salesforce Help.

        4. Add custom fields and relationships to the external objects. Create relationships between objects. If you didn’t sync to automatically create the external objects and their fields, create a custom field for each external table column that you want to access from your Salesforce org.

        5. Verify access to external object data. Check that expected user and code interactions with the external objects work, including sorting and filtering search and query results.

        Tip: After you configure an external data source, run the validator tool on each external object to test and troubleshoot its connections. The tool tests for ID uniqueness and the ability to sort and filter results.

        6. Enable user access to external objects. Grant object permissions through permission sets or profiles.

        7. Enable user access to the fields on the external objects.

        884 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Grant field permissions through permission sets or profiles.

        8. If the external data source uses per-user authentication: a. Let users authenticate to the external system. Grant users access to authentication settings for the external data source through permission sets or profiles.

        b. Set up each user’s authentication settings. You or your users can perform this task.

        Tip: Train your users on how to set up their authentication settings for external systems. Make sure that they know which credentials to enter for each external system. If you’re using OAuth 2.0, test the OAuth flow for potentially confusing prompts or redirects, and train your users as needed. OAuth flows vary, depending on your external system, authentication provider, and specified scopes.

        SEE ALSO: OData 2.0 or 4.0 Adapter for Salesforce Connect Salesforce Platform Features Supported by Salesforce Connect Developer Guide: Visualforce Developer Guide External Object Relationships

        Define an External Data Source for Salesforce Connect—OData 2.0 or 4.0 Adapter ® Connect your Salesforce org to data that’s stored in an external system, such as SAP NetWeaver EDITIONS Gateway, Microsoft Dynamics® NAV, or IBM WebSphere®.

        Note: Available in: both Salesforce Classic (not available in all • The external data must be exposed by a service that uses Open Data Protocol (OData) orgs) and Lightning Version 2.0 or 4.0. Such a service is called an OData producer. Experience (not for • The URL for reaching the OData producer must be accessible by Salesforce application high-data-volume external servers through the Internet. You can allow access by white-listing Salesforce server IP objects) addresses on your corporate network firewall or by setting up a reverse-proxy XML Available in: Developer Gateway. Edition • The extent to which you can customize data visibility depends on the external system. Available for an extra cost To determine the optimal settings for integration with Salesforce, consult the external in: Enterprise, Performance, system’s documentation. and Unlimited Editions 1. From Setup, enter External Data Sources in the Quick Find box, then select External Data Sources. USER PERMISSIONS 2. Click New External Data Source, or click Edit to modify an existing external data source. To create and edit external 3. Complete the fields. data sources: • Customize Application

        885 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Field Description Label A user-friendly name for the external data source. The label is displayed in the Salesforce user interface, such as in list views. If you set Identity Type to Per User, this label appears when your users view or edit their authentication settings for external systems.

        Name A unique identifier that’s used to refer to this external data source definition through the API. The name can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.

        Type Select Salesforce Connect: OData 2.0 or Salesforce Connect: OData 4.0.

        URL The OData service root URL. Make sure that you escape all special characters. Each service endpoint requires its own external data source definition, but you can have multiple entities under one service root URL. For more information about the service root URL and other URL conventions, go to www.odata.org. Examples: • http://services.example.org/Warehouse.svc • https://services.example.org/Payroll.svc If the endpoint is defined in a named credential, enter the named credential URL. A named credential URL contains the scheme callout:, the name of the named credential, and an optional path. For example: callout:My_Named_Credential/some_path. You can append a query string to a named credential URL. Use a question mark (?) as the separator between the named credential URL and the query string. For example: callout:My_Named_Credential/some_path?format=json. If you enter a named credential URL, skip the Authentication section for the external data source. To access the external system, Salesforce Connect uses the authentication settings that are defined in the named credential.

        Connection Timeout Number of seconds to wait for a response from the external system before timing out. By default, the value is set to the maximum of 120 seconds. Depending on the availability of and the connection to the external system, it can take a long time to retrieve external data. Use this field to limit how long to wait for external data to load into your org.

        Writable External Lets the Lightning platform and users in this org create, update, and delete records for external Objects objects associated with the external data source. The external object data is stored outside the org. By default, external objects are read only.

        High Data Volume Salesforce enforces rate limits for retrieving and viewing data from external systems. If your org hits rate limits when accessing external objects, consider selecting the High Data Volume option on the associated external data sources. Doing so bypasses most rate limits, but some special behaviors and limitations apply. See High Data Volume Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters on page 897.

        886 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Field Description High-data-volume external data sources are still limited to 20,000 OData queries per hour for Enterprise, Performance, and Unlimited Editions. If you require higher limits, create a support case. See OData Callout Rate Limit Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters on page 896.

        Server Driven It's common for Salesforce Connect queries of external data to have a large result set that's broken Pagination into smaller batches or pages. Select this option to have the external system control the paging behavior. See Client-driven and Server-driven Paging for Salesforce Connect—OData 2.0 and 4.0 Adapters on page 882.

        Request Row Counts Includes one of the following system query options in each OData query so that the response includes the total row count of the result set. • $inlinecount=allpages for the OData 2.0 adapter • $count=true for the OData 4.0 adapter Some external systems don’t support these system query options. If you receive errors or notice long load times when you try to access their data, deselect Request Row Counts on the external data source. If you do so, however, the external data source and its associated external objects can’t support the following functionality, which requires the total row count. • SOQL COUNT() aggregate function • Batch Apex with Database.QueryLocator

        Compress Requests When selected, Salesforce sends compressed HTTP requests to the external system. Make sure that the external system is set up to receive gzip-compressed data. Salesforce automatically accepts gzip-compressed responses.

        Enable Search Determines whether SOSL and Salesforce global searches also query the external objects that are associated with this external data source. When selected, you can control which external objects are searchable by selecting or deselecting Allow Search on each external object. Only text, text area, and long text area fields on external objects can be searched. If an external object has no searchable fields, searches on that object return no records. Select this option to allow the external data source’s associated external objects to appear in Salesforce for iOS and Salesforce mobile web when used on iOS devices.

        Custom Query Option Available only for the OData 2.0 adapter for Salesforce Connect. If the OData producer has for Salesforce implemented and exposed a free-text-search custom query option, enter the name of that query Search string parameter. Learn more about OData custom query options and other URI conventions at www.odata.org. This field has no effect when Enable Search is deselected or when the OData producer isn’t set up to correctly handle the custom query option. See OData 2.0 Query Options.

        Use Free-Text Search Available only for the OData 4.0 adapter for Salesforce Connect. Select this option to use the Expressions $search system query option instead of $filter in search requests that are sent to the

        887 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Field Description external system. Make sure that the OData producer is set up to support the $search system query option. This field has no effect when Enable Search is deselected. See OData 4.0 Query Options.

        Format The format that the OData producer uses to represent resources, such as collections of data. Make sure that the OData producer is set up to support the selected format. Learn more about representation formats and operations at www.odata.org. If your external data source uses the OData 4.0 adapter and JSON format, make sure that the OData producer accepts headers that contain the odata.metadata=full format parameter. Other variations, including odata.metadata=minimal, aren’t supported.

        Special Select Socrata only if the URL specifies a Socrata open data endpoint. See Socrata™ Considerations Compatibility for Salesforce Connect—OData 2.0 and 4.0 Adapters on page 898.

        CSRF Protection If the external system requires Cross-Site Request Forgery (CSRF) protection in requests to create, edit or delete its data, select this option. If you do so, your org obtains an anti-CSRF token and cookie from the external system and includes them in each create, edit, and delete request. See CSRF Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters on page 898. Available only when Writable External Objects is selected.

        Anti-CSRF Token Name HTTP header field that contains the anti-CSRF token. The external system determines the field name. Default: X-CSRF-Token Available only when CSRF Protection is selected.

        Certificate If you specify a certificate, your Salesforce org supplies it when establishing each two-way SSL connection with the external system. The certificate is used for digital signatures, which verify that requests are coming from your Salesforce org.

        Identity Type Determines whether you're using one set or multiple sets of credentials to access the external system. See Identity Type for External Data Sources on page 857. Select Anonymous only if the external system doesn’t require authentication.

        4. Select the authentication protocol. • If you select Password Authentication, enter the username and password for accessing the external system. • If you select OAuth 2.0, complete the following fields.

        Field Description Authentication Choose the provider. See Authentication Providers. Provider

        888 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Field Description Scope Specifies the scope of permissions to request for the access token. Your authentication provider determines the allowed values. See Use the Scope Parameter.

        Note: – The value that you enter replaces the Default Scopes value that’s defined in the specified authentication provider. – Whether scopes are defined can affect whether each OAuth flow prompts the user with a consent screen. – We recommend that you request a refresh token or offline access. Otherwise, when the token expires, you lose access to the external system.

        Start To authenticate to the external system and obtain an OAuth token, select this checkbox. This Authentication Flow authentication process is called an OAuth flow. on Save When you click Save, the external system prompts you to log in. After successful login, the external system grants you an OAuth token for accessing its data from this org. Redo the OAuth flow when you need a new token—for example, if the token expires—or if you edit the Scope or Authentication Provider fields. When the token expires, the external system returns a 401 HTTP error status.

        5. Click Save. 6. Click Validate and Sync, and confirm that the connection is successful. 7. Optionally, select tables and click Sync to do the following for each selected table. • Automatically create a Salesforce external object. • Automatically create a custom field for each table column that’s compatible with a Salesforce metadata field type.

        Note: Before you sync, make sure that you understand the considerations that are described in these topics. • Sync an External Data Source for Salesforce Connect on page 858 • Sync Considerations for Salesforce Connect—OData 2.0 or 4.0 Adapter on page 894

        You can instead choose to manually create the external objects and custom fields that map to the external data. Doing so lets you customize the external object names, decide which table columns to create custom fields for, and customize the custom field names. However, this approach takes longer and requires manual maintenance.

        Optionally, you can associate custom HTTP headers to the external data source to retrieve or request additional data.

        SEE ALSO: Set Up Salesforce Connect to Access External Data with the OData 2.0 or 4.0 Adapter Store Authentication Settings for External Systems OData Query String Options OData Type Mapping Named Credentials

        889 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Define Custom HTTP Headers for OData Connectors

        Define and activate custom HTTP headers to pass more request information to the external data EDITIONS source for processing. Custom HTTP headers provide context information from Salesforce such as region, org details, or Available in: both Salesforce the role of the person viewing the external object. For each OData external data source, define up Classic (not available in all 10 HTTP headers to request or data. For example, to see who’s making a callout to the external data orgs) and Lightning source, use a formula that resolves to the name of the user. Experience When naming the custom HTTP header, don’t override the following existing standard header Available with Salesforce names. Connect, which is available in: Developer Edition and for • Content-Type an extra cost in: Enterprise, • Accept Performance, and • maxVersionHeader Unlimited Editions • versionHeader • X-HTTP-METHOD USER PERMISSIONS • Content-Length To create and edit external • X-CSRF-Token (when CSRF-enabled) data sources: • Prefer (when a trigger on the external object is enabled) • Customize Application • Cookie 1. From Setup, enter External Data Sources in the Quick Find box, then select External Data Sources. 2. Click the name of an OData 2.0 or 4.0 data source. 3. In the External Custom HTTP Headers related list, click New to create a custom HTTP header or Edit to change an existing one. 4. Complete the fields.

        Field Description Header Field Name Enter a name that contains at least one alphanumeric character or underscore. It can also include: ! # $ % & ' * + - . ^ _ ` | ~

        Header Field Value Create a formula for the Header Field Value using the formula editor. The values in the formula must evaluate to a string. If the formula resolves to null and an empty string, the header isn’t sent.

        Active To start using the header field right away, select the Active checkbox.

        Description A text description of the header field’s purpose.

        Parent The name of the entity that the custom HTTP header is related to.

        Note: A named credential as the parent entity for the custom HTTP header isn’t supported.

        5. Click Save.

        Note: You can’t add or delete Custom HTTP headers that are included in a managed package. However, you can edit custom HTTP headers that are part of a managed package. The Header Name and Description fields are developer editable. The Active and Header Field Value fields are both subscriber and developer editable.

        890 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Named Credential as Callouts for Salesforce Connect OData 2.0 or 4.0 Adapters This example shows how Salesforce Connect OData 2.0 or 4.0 adapters can make callouts using the authentication settings defined in a named credential. Define a named credential that specifies the endpoint URL and the JWT authentication settings.

        When you’re defining an external data source with an Odata 2.0 or Odata 4.0 adapter, specify the named credential you defined as the OData service root URL. In this example, the URL is callout:Test_named_credential. And skip the Authentication section for the external data source. To access the external system, Salesforce Connect uses the authentication settings defined in the named credential.

        SEE ALSO: Define a Named Credential Store Authentication Settings for External Systems Grant Access to Authentication Settings for Named Credentials

        891 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters

        Understand the special behaviors, limits, and recommendations for using the OData 2.0 or 4.0 EDITIONS adapter for Salesforce Connect. Also review the considerations that apply to all Salesforce Connect adapters. Available in: both Salesforce Classic (not available in all orgs) and Lightning Lightning Experience Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters Experience (not for Users can access external objects from the Lightning Experience app. But some requirements high-data-volume external and special behaviors apply when the external data is accessed via the OData 2.0 or 4.0 adapter objects) for Salesforce Connect. Available in: Developer Writable External Objects Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters Edition Some special behaviors and limitations affect writable external objects that are associated with Available for an extra cost OData adapters for Salesforce Connect. in: Enterprise, Performance, Sync Considerations for Salesforce Connect—OData 2.0 or 4.0 Adapter and Unlimited Editions When you validate and sync an external data source of type Salesforce Connect: OData 2.0 or Salesforce Connect: OData 4.0, some special behaviors and limitations apply. OData Producer Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters Understand the limits and recommendations for the remote data service that exposes the external data to your Salesforce org. OData Callout Rate Limit Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters An external object references data that’s stored outside Salesforce. Access to an external object involves a callout to its associated external system. Salesforce enforces rate limits for these callouts. High Data Volume Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters If your org hits rate limits when accessing external objects, consider selecting the High Data Volume option on the associated external data sources. Doing so bypasses most rate limits, but some special behaviors and limitations apply. Socrata™ Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters Socrata Open Data Protocol™ is commonly used for health data and for collaboration between governments and their citizens. Salesforce Connect can access data from endpoints that are backed by Socrata Open Data Portal. To accommodate Socrata-specific requirements, set the Special Compatibility field on the external data source to Socrata. CSRF Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters Understand the special behaviors, limitations, and recommendations for Cross-Site Request Forgery (CSRF) on OData external data sources.

        SEE ALSO: Salesforce Platform Features Supported by Salesforce Connect

        892 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Lightning Experience Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters

        Users can access external objects from the Lightning Experience app. But some requirements and EDITIONS special behaviors apply when the external data is accessed via the OData 2.0 or 4.0 adapter for Salesforce Connect. Available in: both Salesforce • If external object records don’t appear in your org, make sure that the OData producer doesn’t Classic and Lightning change the values specified in the OData query filters. When your org sends OData queries that Experience specify field values with the $filter equals (eq) operator, the OData producer must return Available in: Developer those same field values in the resulting data rows. Edition • If external object records don’t appear in relationship fields or related lists, check for case-sensitive Available for an extra cost values. For example, suppose that you set up an indirect lookup relationship. If the external in: Enterprise, Performance, system uses case-sensitive values in the specified External Column Name, make sure that the and Unlimited Editions parent object field is also case-sensitive. When you define the parent object’s custom field, select External ID, Unique, and Treat "ABC" and "abc" as different values (case sensitive).

        SEE ALSO: External Object Relationships OData Query String Options OData 2.0 or 4.0 Adapter for Salesforce Connect Define an External Data Source for Salesforce Connect—OData 2.0 or 4.0 Adapter

        Writable External Objects Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters

        Some special behaviors and limitations affect writable external objects that are associated with EDITIONS OData adapters for Salesforce Connect. • An external object custom field associated with an OData complex type on the external system Available in: both Salesforce is always read only, even if the external object is writable. Classic (not available in all • Writable external objects aren’t available for high-data-volume external data sources. orgs) and Lightning Experience (not for • If your external system requires write operations to specify values for entity keys, ensure that high-data-volume external External ID standard field values and entity key values don’t contradict each other. For objects) each write operation, include either the External ID standard field value or the custom field values that form the entity key, but never both. Available in: Developer Edition • When an external object record is edited, Salesforce Connect sends an HTTP request to the external system. Available for an extra cost in: Enterprise, Performance, – If the record is edited from the Salesforce user interface, the HTTP request includes all fields, and Unlimited Editions including the fields that weren’t changed. – If the record is edited from the API, only the specified fields are included in the HTTP request.

        • Make sure that the OData producer supports the HTTP methods that are used by your Salesforce Connect adapter.

        To Do This OData 4.0 Adapter Uses This HTTP Method OData 2.0 Adapter Uses This HTTP Method Create record POST POST

        Edit record POST with X-HTTP-METHOD header set to PATCH POST with X-HTTP-METHOD header set to MERGE

        Delete record DELETE DELETE

        893 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        To Do This OData 4.0 Adapter Uses This HTTP Method OData 2.0 Adapter Uses This HTTP Method View record GET GET

        Also review the considerations that apply to all Salesforce Connect adapters.

        SEE ALSO: Writable External Objects in Salesforce Connect External IDs and OData Entity Keys OData 2.0 or 4.0 Adapter for Salesforce Connect

        Sync Considerations for Salesforce Connect—OData 2.0 or 4.0 Adapter

        When you validate and sync an external data source of type Salesforce Connect: OData EDITIONS 2.0 or Salesforce Connect: OData 4.0, some special behaviors and limitations apply. Available in: both Salesforce • Syncing always enables search on the external object when search is enabled on the external Classic (not available in all data source, and vice versa. orgs) and Lightning Experience (not for • For a list of supported OData types, see “OData Type Mapping” in Salesforce Help. high-data-volume external Important: When you select the tables to sync, determine whether check marks appear in objects) the Synced column. Available in: Developer If a Synced check mark appears, your org has an external object whose object name matches Edition the table name. If you select the table and click Sync: Available for an extra cost • The external object is overwritten. in: Enterprise, Performance, and Unlimited Editions • Any custom field on the external object is overwritten if its API name (for example, Email__c) associates it with a table column name (for example, Email). • Any other custom fields on the external object remain as they are, including: – Previously synced custom fields whose API names were changed by editing their Field Name values. – Manually added custom fields whose API names aren’t associated with table column names.

        If no Synced check mark appears, and you sync the table, a new external object is created in your org. The new external object’s object name matches the table name. For example, if the table name is changed on the external system to no longer match the object name of the external object, syncing that table creates a new external object in Salesforce. We recommend that you change the object name of the existing external object to match the new table name on the external system before you sync that table.

        894 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Also review the considerations that apply to all Salesforce Connect adapters.

        SEE ALSO: Sync an External Data Source for Salesforce Connect Define an External Data Source for Salesforce Connect—OData 2.0 or 4.0 Adapter OData 2.0 or 4.0 Adapter for Salesforce Connect OData Type Mapping

        OData Producer Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters

        Understand the limits and recommendations for the remote data service that exposes the external EDITIONS data to your Salesforce org. • Validate your OData producer by using the Open Data Protocol Service Validation Tool at Available in: both Salesforce services.odata.org/validation. Doing so checks your implementation against Classic and Lightning the OData specification and identifies potential issues. Experience • To improve performance over low-bandwidth connections, set up your OData producer to Available in: Developer receive gzip-compressed data. Then, in the external data source definition in Salesforce, select Edition Compress Requests. You can also set up the OData producer to send gzip-compressed data Available for an extra cost to Salesforce, which automatically accepts gzip-compressed responses. in: Enterprise, Performance, • By default, Salesforce sends each OData request with one of the following system query options and Unlimited Editions so that the response includes the total row count of the result set. – $inlinecount=allpages for the OData 2.0 adapter – $count=true for the OData 4.0 adapter Some external systems don’t support these system query options. If you receive errors or notice long load times when you try to access their data, deselect Request Row Counts on the external data source. If you do so, however, the external data source and its associated external objects can’t support the following functionality, which requires the total row count. – SOQL COUNT() aggregate function – Batch Apex with Database.QueryLocator For details about OData URI conventions, go to www.odata.org.

        • Configure your OData producer to use a page size that’s large enough to avoid excessive round trips. Querying a large set of data with a small page size can take a long time because of network latency. Salesforce pages that display external data can take a long time to load. For example, if the query results include 100 records, and the page size holds only 5 records, it takes 20 round trips to retrieve the results. If the network latency is 100 ms per round trip, it takes 2 seconds (20 × 100 ms) to retrieve the results. In contrast, if the page size holds 20 records, it takes only five round trips to retrieve the 100 records. With the same network latency of 100 ms per round trip, it takes 0.5 seconds (5 × 100 ms) to retrieve the results.

        • For a list of supported OData types, see “OData Type Mapping” in Salesforce Help. • If your external data source uses the OData 4.0 adapter and JSON format, make sure that the OData producer accepts headers that contain the odata.metadata=full format parameter. Other variations, including odata.metadata=minimal, aren’t supported.

        895 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        • If external object records don’t appear in your org, make sure that the OData producer doesn’t change the values specified in the OData query filters. When your org sends OData queries that specify field values with the $filter equals (eq) operator, the OData producer must return those same field values in the resulting data rows.

        SEE ALSO: OData 2.0 or 4.0 Adapter for Salesforce Connect OData Query String Options OData Type Mapping

        OData Callout Rate Limit Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters

        An external object references data that’s stored outside Salesforce. Access to an external object EDITIONS involves a callout to its associated external system. Salesforce enforces rate limits for these callouts. An org is limited to: Available in: both Salesforce Classic (not available in all • 20,000 OData callouts per hour for Enterprise, Performance, and Unlimited editions. If you require orgs) and Lightning higher limits, create a support case. Experience (not for • 1,000 OData callouts per hour for Developer Edition. high-data-volume external • 100k new external object record IDs per hour for long-term ID mapping objects) • 100k new external object record IDs per hour for short-term ID mapping Available in: Developer Edition Note: To view external object records in Lightning Experience, Salesforce Connect maps the external IDs of the record to Salesforce IDs. Mappings classified as short-term refer to records Available for an extra cost retrieved via Search results only. Mappings classified as long-term refer to records retrieved in: Enterprise, Performance, by all other Lightning Experience components, such as List Views. Record IDs not viewed in and Unlimited Editions 365 days are subject to deletion unless the mappings have customer data attached to them. To obtain your org’s limits and current usage against those limits, use the Limits resource in the Lightning Platform REST API. Salesforce performs an OData callout each time that: • A user clicks an external object tab for a list view. • A user views a record detail page of an external object. • A user views a record detail page of a parent object that displays a related list of child external object records. • A user performs a Salesforce global search. • A user creates, edits, or deletes an external object record. • A user runs a report. • The preview loads in the report builder. • An external object is accessed via flows, processes, APIs, Apex, SOQL, or SOSL. • You validate or sync an external data source. If your users or applications encounter rate limit errors for OData callouts, try one or more of the following. • Select High Data Volume in the external data source definition. Doing so bypasses most rate limits, but some special behaviors and limitations apply. • Run fewer SOQL and SOSL queries. • If you have Apex code that invokes the external system, modify that code to cache frequently accessed external data that seldom changes.

        896 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        • Contact Salesforce to request a higher limit.

        SEE ALSO: REST API Developer Guide : List Organization Limits High Data Volume Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters OData 2.0 or 4.0 Adapter for Salesforce Connect Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters

        High Data Volume Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters

        If your org hits rate limits when accessing external objects, consider selecting the High Data Volume EDITIONS option on the associated external data sources. Doing so bypasses most rate limits, but some special behaviors and limitations apply. Available in: both Salesforce • The following features aren’t available for external objects that are associated with Classic (not available in all high-data-volume external data sources. orgs) and Lightning Experience (not for – Access via Lightning Experience high-data-volume external – Access via the Salesforce mobile app objects) – Appearance in Recent Items lists Available in: Developer – Record feeds Edition – Reports and dashboards Available for an extra cost – Writable external objects in: Enterprise, Performance, and Unlimited Editions • Salesforce IDs aren’t assigned to external object records that are associated with high-data-volume external data sources. • On record detail pages for external objects that are associated with high-data-volume external data sources, custom buttons, and links that call JavaScript aren’t supported. • Salesforce Console in Salesforce Classic doesn’t support external objects that are associated with high-data-volume external data sources. • CSRF protection for writable external objects isn’t available for high-data-volume external data sources.

        SEE ALSO: REST API Developer Guide : List Organization Limits OData Callout Rate Limit Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters CSRF Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters Define an External Data Source for Salesforce Connect—OData 2.0 or 4.0 Adapter

        897 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Socrata™ Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters ™ Socrata Open Data Protocol is commonly used for health data and for collaboration between EDITIONS governments and their citizens. Salesforce Connect can access data from endpoints that are backed by Socrata Open Data Portal. To accommodate Socrata-specific requirements, set the Special Available in: both Salesforce Compatibility field on the external data source to Socrata. Classic (not available in all Socrata doesn’t support the row identifier (_id) column in $select or $orderby clauses in orgs) and Lightning OData queries. When Socrata is selected in the Special Compatibility field: Experience (not for high-data-volume external • OData queries don’t include the _id column in $select clauses. objects) • If an _id column is synced from a Socrata endpoint, the resulting custom field on the external Available in: Developer object isn’t sortable. Edition • If you manually define an external object’s custom field with _id as the External Column Available for an extra cost Name, make sure that you select the Sorting Disabled attribute for that custom field. in: Enterprise, Performance, If you modify the Special Compatibility field on an external data source, we recommend and Unlimited Editions that you resync its external objects. Or instead, you can test whether queries or user access to the external objects result in errors, and resync only the problematic external objects.

        SEE ALSO: Define an External Data Source for Salesforce Connect—OData 2.0 or 4.0 Adapter Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters

        CSRF Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters

        Understand the special behaviors, limitations, and recommendations for Cross-Site Request Forgery EDITIONS (CSRF) on OData external data sources. • CSRF protection isn’t available for high-data-volume external data sources. Available in: both Salesforce • Make sure that the URL of the external data source starts with https:// so that secure HTTP Classic (not available in all can prevent unauthorized access to the anti-CSRF token and cookie. orgs) and Lightning Experience (not for • In addition to enabling CSRF protection on the external data source, we recommend keeping high-data-volume external CSRF protection enabled in your org’s session security settings. These session settings are objects) enabled by default, and keeping them enabled protects your Salesforce data and your external data from CSRF attacks. Available in: Developer Edition – Enable CSRF protection on GET requests on non-setup pages Available for an extra cost Enable CSRF protection on POST requests on non-setup pages – in: Enterprise, Performance, and Unlimited Editions SEE ALSO: Define an External Data Source for Salesforce Connect—OData 2.0 or 4.0 Adapter Modify Session Security Settings

        898 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Picklist Considerations for Salesforce Connect—OData 2.0 or 4.0 Adapter

        Special behaviors and limitations apply to picklist fields on external objects. EDITIONS • Global and local single-select picklists are supported. • You must manually update picklist values to stay in sync between your org and the external Available in: both Salesforce system. If values are not in sync, your users could see an error message when viewing the field. Classic (not available in all orgs) and Lightning – Add values to the picklist as you would a picklist on a custom object. Experience (not for – Remove a value from a picklist by deactivating the value rather than deleting it. high-data-volume external – Replace a value by deactivating it and then adding the new value. Update the external objects) system’s record values to the new value on the external system. Available in: Developer Edition • Convert existing external object text fields to picklists by deleting and recreating. Delete the text field and create a picklist pointing to the text field’s existing External Column Name. Available for an extra cost in: Enterprise, Performance, • If you select to delete, you might be prompted to replace the value with another value. No and Unlimited Editions replace occurs for external object record values. You must manually change the values on the external system. • We recommend having only unrestricted picklists on external objects, even when they’re associated with restricted picklists on the provider org. Restricted picklists on the provider org block unapproved values from the subscriber org, eliminating the need to restrict picklists on external objects.

        SEE ALSO: Picklist Considerations for Salesforce Connect—Cross-Org Adapter

        OData Reference for Salesforce Connect—OData 2.0 and 4.0 Adapters

        Get to know the Salesforce implementation of the Open Data Protocol (OData) for accessing external EDITIONS systems with Salesforce Connect. Available in: both Salesforce OData Type Mapping Classic (not available in all Salesforce Connect maps OData types to Salesforce metadata field types when syncing metadata orgs) and Lightning and converting values between Salesforce and external systems. Experience (not for high-data-volume external OData Query String Options objects) The OData adapters for Salesforce Connect use a subset of the OData 2.0 and 4.0 system functions and filter expression constructs to query external systems. Available in: Developer Edition Available for an extra cost SEE ALSO: in: Enterprise, Performance, OData 2.0 or 4.0 Adapter for Salesforce Connect and Unlimited Editions

        899 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        OData Type Mapping

        Salesforce Connect maps OData types to Salesforce metadata field types when syncing metadata EDITIONS and converting values between Salesforce and external systems. Available in: both Salesforce OData 2.0 Type Mapping Classic (not available in all Understand how the OData 2.0 adapter for Salesforce Connect maps OData types to Salesforce orgs) and Lightning metadata field types. Experience (not for high-data-volume external OData 4.0 Type Mapping objects) Understand how the OData 4.0 adapter for Salesforce Connect maps OData types to Salesforce metadata field types. Available in: Developer Edition Available for an extra cost in: Enterprise, Performance, and Unlimited Editions

        OData 2.0 Type Mapping

        Understand how the OData 2.0 adapter for Salesforce Connect maps OData types to Salesforce EDITIONS metadata field types. Salesforce Connect supports only the following types when syncing metadata and converting Available in: both Salesforce values between Salesforce and an external system. Classic (not available in all orgs) and Lightning Experience (not for OData 2.0 Primitive Types high-data-volume external objects) OData 2.0 Type Salesforce Metadata Field Type Available in: Developer Binary TextArea Edition Boolean Checkbox Available for an extra cost in: Enterprise, Performance, Byte Number and Unlimited Editions DateTime DateTime

        DateTimeOffset DateTime

        Decimal Number

        Double Number

        Guid Text

        Int16 Number

        Int32 Number

        Int64 Number

        SByte Number

        Single Number

        900 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        OData 2.0 Type Salesforce Metadata Field Type String Depends on the declared maximum length of the OData string column.

        OData Declared Maximum Salesforce Field Type Salesforce Field Length Length Attribute Not declared Text 128 characters

        255 or fewer characters Text Same as declared

        More than 255 characters LongTextArea Same as declared

        Time Text

        Tip: A binary value from an external system is represented in Salesforce as a base64-encoded string. You can convert it to a value of type Blob by using the EncodingUtil.base64Decode(inputString) Apex method.

        OData 2.0 Complex Types Salesforce Connect supports OData complex types as follows. • External data of complex type is flattened into a string that contains field names and values. For example, an address is flattened into the following string.

        Street: 55 East 5th Street, City: New York, State: NY, Zip: 10003

        • An external object custom field associated with an OData complex type on the external system is always read only, even if the external object is writable.

        SEE ALSO: Sync an External Data Source for Salesforce Connect Custom Field Types Custom Field Attributes OData Reference for Salesforce Connect—OData 2.0 and 4.0 Adapters Apex Developer Guide : EncodingUtil Class: base64Decode(inputString)

        901 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        OData 4.0 Type Mapping

        Understand how the OData 4.0 adapter for Salesforce Connect maps OData types to Salesforce EDITIONS metadata field types. Salesforce Connect supports only the following types when syncing metadata and converting Available in: both Salesforce values between Salesforce and an external system. Classic (not available in all orgs) and Lightning Experience (not for OData 4.0 Primitive Types high-data-volume external objects) OData 4.0 Type Salesforce Metadata Field Type Available in: Developer Binary TextArea Edition Boolean Checkbox Available for an extra cost in: Enterprise, Performance, Byte Number and Unlimited Editions Date DateTime with time properties set to 0

        DateTimeOffset DateTime

        Decimal Number

        Double Number

        Guid Text

        Int16 Number

        Int32 Number

        Int64 Number

        SByte Number

        Single Number

        String Depends on the declared maximum length of the OData string column.

        OData Declared Salesforce Field Salesforce Field Maximum Length Type Length Attribute Not declared Text 128 characters

        255 or fewer Text Same as declared characters

        More than 255 LongTextArea Same as declared characters

        Tip: A binary value from an external system is represented in Salesforce as a base64-encoded string. You can convert it to a value of type Blob by using the EncodingUtil.base64Decode(inputString) Apex method.

        902 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        OData 4.0 Complex Types Salesforce Connect supports OData complex types as follows. • External data of complex type is flattened into a string that contains field names and values. For example, an address is flattened into the following string.

        Street: 55 East 5th Street, City: New York, State: NY, Zip: 10003

        • An external object custom field associated with an OData complex type on the external system is always read only, even if the external object is writable.

        SEE ALSO: Sync an External Data Source for Salesforce Connect Custom Field Types Custom Field Attributes OData Reference for Salesforce Connect—OData 2.0 and 4.0 Adapters Apex Developer Guide : EncodingUtil Class: base64Decode(inputString)

        OData Query String Options

        The OData adapters for Salesforce Connect use a subset of the OData 2.0 and 4.0 system functions EDITIONS and filter expression constructs to query external systems. When your users or the Lightning Platform interact with external objects, the OData 2.0 or 4.0 Available in: both Salesforce adapter for Salesforce Connect converts those actions into OData queries. Salesforce performs an Classic (not available in all OData callout each time that: orgs) and Lightning Experience (not for • A user clicks an external object tab for a list view. high-data-volume external • A user views a record detail page of an external object. objects) • A user views a record detail page of a parent object that displays a related list of child external Available in: Developer object records. Edition • A user performs a Salesforce global search. Available for an extra cost • A user creates, edits, or deletes an external object record. in: Enterprise, Performance, • A user runs a report. and Unlimited Editions • The preview loads in the report builder. • An external object is accessed via flows, processes, APIs, Apex, SOQL, or SOSL. • You validate or sync an external data source. The following sections describe the Salesforce Connect implementation as a consumer of OData services. Salesforce automatically creates the OData queries so that you, as an administrator or developer, don’t have to. However, understanding how OData queries are generated—or even attempting manual OData queries—can help you troubleshoot issues with the external system’s OData producer. For details about each system query option, go to www.odata.org. Salesforce Connect supports only the following OData system query options. All other options in the OData 2.0 and 4.0 specifications are unused. • $count (OData 4.0 only) on page 904 • $filter on page 904 • $inlinecount (OData 2.0 only) on page 904

        903 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        • $orderby on page 905 • $search (OData 4.0 only) on page 905 • $select on page 905 • $skip on page 906 • $top on page 906 A query search string to an external system is sent as a case-sensitive single phrase after removing all ASCII punctuation characters except hyphens (-). For example, if the search string is Sales & Marketing, the external system receives Sales Marketing.

        $count (OData 4.0 only) Specifies that the response must include the number of rows that the URI identifies after $filter system query options are applied, but before $top and $skip system query options are applied. When Request Row Counts is enabled on the external data source, Salesforce includes $count=true in all OData 4.0 queries of that external data source to determine the total number of items in each result set. The total items in the result set is the same as the LIMIT value in the query for values less than 202. If the LIMIT value is greater than 202, then 202 items are returned to indicate that more records exist in the next batch. If Request Row Counts is disabled, Salesforce includes $count=false in all OData 4.0 queries of the external data source, and 2000 items are returned in each result set.

        Examples User action in View or access an external object. Salesforce

        SOQL query Any SOQL query of an external object

        Resulting OData http://services.example.org/my.svc/Suppliers?$select=SupplierID& query $count=true&$top=26

        $filter Filters the collection of resources that’s addressed by a request URL. The response contains the results that evaluate to true.

        Examples User action in Open a list view of cities from supplier records that are filtered so that the country is USA. Salesforce

        SOQL query SELECT City__c FROM Suppliers__x WHERE Country__c = 'USA' ORDER BY City__c ASC LIMIT 26

        Resulting OData http://services.example.org/my.svc/Suppliers?$orderby=City& query $select=City,SupplierID&$inlinecount=allpages&$filter=Country+eq+'USA'& $top=26

        $inlinecount (OData 2.0 only) Specifies that the response must include a count of the number of rows that the URI identifies after $filter system query options are applied but before $top and $skip system query options are applied.

        904 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        When Request Row Counts is enabled on the external data source, Salesforce uses $inlinecount in all OData 2.0 queries of that external data source to determine the total number of items in each result set. If Request Row Counts is disabled, $inlinecount is excluded from all OData 2.0 queries of the external data source.

        Examples User action in View or access an external object. Salesforce

        SOQL query Any SOQL query of an external object.

        Resulting OData http://services.example.org/my.svc/Suppliers?$select=SupplierID& query $inlinecount=allpages&$top=26

        $orderby Sorts the result set in ascending or descending order. The fields in the ORDER BY clause of the SOQL query don't always match the properties used by the $orderby option in the resulting OData query. If you use the OFFSET clause in the SOQL query, the entity key property is added in the resulting OData query.

        Examples User action in Open a list view of supplier records that are ordered by company name. Salesforce

        SOQL query SELECT CompanyName__c,ContactName__c FROM Suppliers__x ORDER BY CompanyName__c ASC LIMIT 26

        Resulting OData http://services.example.org/my.svc/Suppliers?$orderby=CompanyName& query $select=CompanyName,ContactName,SupplierID&$inlinecount=allpages&$top=26

        $search (OData 4.0 only) Requests entities that match the search query string as a free-text search expression. Enable this option by selecting Use Free-Text Search Expressions on the external data source. By default, Use Free-Text Search Expressions is not enabled. The search query string is used as the contains value in the $filter system query option.

        Examples User action in View or access an external object. Salesforce

        SOQL query Any SOQL query of an external object

        Resulting OData http://services.example.org/my.svc/Shippers? query $select=CompanyName,Phone,ShipperID&$count=true&$search=Acme&$top=25

        $select Requests a limited set of properties for each entity.

        905 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Examples User action in Open a list view of supplier records where the page layout displays the company name and contact name. Salesforce

        SOQL query SELECT CompanyName__c,ContactName__c FROM Suppliers__x ORDER BY CompanyName__c ASC LIMIT 26

        Resulting OData http://services.example.org/my.svc/Suppliers?$orderby=CompanyName& query $select=CompanyName,ContactName,SupplierID&$inlinecount=allpages&$top=26

        $skip Specifies the number of items in the queried collection to skip in the result set.

        Examples User action in Click to view the second page of a list view of supplier records that are ordered by city. Salesforce

        SOQL query SELECT City__c,CompanyName__c FROM Suppliers__x ORDER BY City__c ASC OFFSET 25

        Resulting OData http://services.example.org/my.svc/Suppliers?$orderby=City& query $select=City,CompanyName,SupplierID&$inlinecount=allpages&$top=25& $skip=25

        $top Specifies the number of items in the queried collection to include in the result. The value in the LIMIT clause of a SOQL query doesn’t always match the requested $top value, because the latter is modified as needed for client-driven paging and queryMore() calls.

        Examples User action in Open a list view of the top 25 supplier records. Salesforce

        SOQL query SELECT SupplierID__c FROM Suppliers__x LIMIT 25

        Resulting OData http://services.example.org/my.svc/Suppliers?$select=SupplierID& query $inlinecount=allpages&$top=25

        OData 2.0 Query Options By default, the search query string is used as the substringof value in the $filter system query option.

        906 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        OData 4.0 Query Options By default, the search query string is used as the contains value in the $filter system query option.

        SEE ALSO: OData Producer Considerations for Salesforce Connect—OData 2.0 and 4.0 Adapters OData Reference for Salesforce Connect—OData 2.0 and 4.0 Adapters Client-driven and Server-driven Paging for Salesforce Connect—OData 2.0 and 4.0 Adapters

        OData 2.0 Query Options

        By default, the search query string is used as the substringof value in the $filter system EDITIONS query option. In this example, the search query string is Acme. Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience (not for high-data-volume external objects)

        Available in: Developer Edition Available for an extra cost in: Enterprise, Performance, and Unlimited Editions

        http://services.example.org/my.svc/Shippers? $select=CompanyName,Phone,ShipperID&$inlinecount=allpages& $filter=substringof('Acme',CompanyName)+eq+true+ or+substringof('Acme',Phone)+eq+true&$top=25

        OData 2.0 Custom Query Option We recommend that you set up the OData producer to support free text search expressions with the custom query option. You can then specify the name of the query string parameter in the Custom Query Option for Salesforce Search field on the external data source. In this example, the custom query parameter is doSearch and the search query string is Acme.

        http://services.example.org/my.svc/Shippers? $select=CompanyName,Phone,ShipperID& $inlinecount=allpages&doSearch=Acme&$top=25

        Learn more about OData URI conventions at www.odata.org.

        907 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        OData 4.0 Query Options

        By default, the search query string is used as the contains value in the $filter system query EDITIONS option. In the following example, the search query string is Acme. Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience (not for high-data-volume external objects)

        Available in: Developer Edition Available for an extra cost in: Enterprise, Performance, and Unlimited Editions

        http://services.example.org/v4.svc/Shippers? $select=CompanyName,Phone,ShipperID&$count=true& $filter=contains(CompanyName,'Acme') eq true or contains(Phone,'Acme') eq true$top=25&

        OData 4.0 Custom Query Option We recommend that you set up the OData producer to support free text search expressions with the $search system query option. You can then select Use Free-Text Search Expressions on the external data source.

        http://services.example.org/v4.svc/Shippers? $select=CompanyName,Phone,ShipperID&$count=true& $search=Acme&$top=25

        Learn more about OData URI conventions at www.odata.org.

        Use External Change Data Capture to Track Data Changes on External Objects With External Change Data Capture, you can track changes to data that is stored outside your Salesforce org when using the Odata 4.0 adapter. You can then build automation in response to the changes to increase productivity or provide a better customer experience. The external data change tracking feature polls the external system at configurable intervals (5–30 minutes) for tracked changes. For each external object that has the feature enabled, a topic channel and an associate change event entity are created where change event notifications are published. You add a subscriber to each topic channel and then process the data changes through Streaming API. You can also add an Apex trigger that is called when change event notifications are published.

        External Change Data Capture Considerations Keep these considerations in mind when working with External Change Data Capture. Enable External Change Data Capture and Tracking Enable external change data capture for the data source and each external object that you want to monitor.

        908 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Subscribe to Change Events You can use Apex triggers to subscribe to change events. Or you can use a Bayeux client to subscribe to Streaming API on the publication channel. Check the External Change Data Capture Status for an External Object You can quickly check the change-tracking status from an external object’s detail page. More detailed monitoring is also available. Change the Polling Interval for External Change Data Capture By default, the external change data capture feature polls the external system every 30 minutes for tracked changes. You can change the interval to poll the external system as frequently as every 5 minutes. Monitor and Troubleshoot External Change Data Capture Check these tips when troubleshooting change tracking on external objects. Example: How Codey Outfitters Uses External Change Data Capture The fictitious company, Codey Outfitters, distributes outdoor equipment from local small businesses to outdoor enthusiasts around the world. The company handles all logistics, such as complying with import laws for each state and country.

        External Change Data Capture Considerations Keep these considerations in mind when working with External Change Data Capture. • Each polling request counts toward your Salesforce org’s OData callout rate allocation. • OData doesn’t differentiate between created and updated change events. Both events are published with update change type. • When you enable change tracking, a $top=0 query for zero rows is sent to the external data source to tell it to track changes, and a delta link is returned. • If an error occurs, Salesforce stops sending polling requests. You can check for an error status by querying the BackgroundOperation object or viewing the latest error on the object’s setup page. • If you create an Apex trigger to respond to change events, these requirements and behaviors apply. – Create the Apex trigger with development tools, such as the Developer Console or Metadata API or Salesforce UI. You can’t create the trigger from the Salesforce UI. – Because the Apex trigger runs after an event occurs, only the after-insert trigger event is supported. – The trigger passes the associated change event, not the object that caused the change. – Changed records can be committed in the same transaction that started the trigger. However, keep in mind that this transaction is separate from the transaction that created the original event.

        Enable External Change Data Capture and Tracking

        Enable external change data capture for the data source and each external object that you want USER PERMISSIONS to monitor. 1. From Setup, enter External Data Sources in the Quick Find box, then select External To create or edit external Data Sources. objects: • Customize Application 2. Click Edit, and select Eligible for External Change Data Capture. 3. Click Save. 4. From the External Objects list , select the external object that you want to track. 5. Click Edit, and select Track Data Changes. 6. Click Save.

        909 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        After you enable change tracking, a publication channel is created under the topic for the external object. For example, /data/Object Name__ChangeEvents appears as /data/Products__ChangeEvents, where Product is the object name.

        Subscribe to Change Events You can use Apex triggers to subscribe to change events. Or you can use a Bayeux client to subscribe to Streaming API on the publication channel. After subscribing, you can observe change event notifications when you perform a DML operation on an external object. You can also see change events on the tracked data stored on the external system.

        Check the External Change Data Capture Status for an External Object

        You can quickly check the change-tracking status from an external object’s detail page. More USER PERMISSIONS detailed monitoring is also available. 1. From Setup, enter External Objects in the Quick Find box, then select External Objects. To create or edit external objects: 2. Click the label of the external object. • Customize Application The External Change Data Capture Status field shows one of the following statuses. • Disabled—Either the data source or the external object doesn’t have external change data capture enabled. • Error—External change data capture encountered an error in the last poll for changes and stopped. After resolving the error, restart external change data capture. • Running—External change data capture is running and polls the external system in the configured time interval for changes. • Stopped—External change data capture is not scheduled to poll for changes.

        Change the Polling Interval for External Change Data Capture By default, the external change data capture feature polls the external system every 30 minutes for tracked changes. You can change the interval to poll the external system as frequently as every 5 minutes. 1. From Setup, enter External Data Sources in the Quick Find box, then select External Data Sources. 2. Next to the name of the external data source, click Edit. 3. In the Polling Interval for External Change Data Capture field, enter the number of seconds between polling. 4. Click Save.

        Monitor and Troubleshoot External Change Data Capture Check these tips when troubleshooting change tracking on external objects. • To check the status of external data change tracking, query the BackgroundOperation object. • Each BackgroundOperation record is available for inspection for one day. You can include the ExpiresAt field in your SOQL query of the BackgroundOperation object to check when the record expires. • Set up and view debug logs.

        Example: How Codey Outfitters Uses External Change Data Capture The fictitious company, Codey Outfitters, distributes outdoor equipment from local small businesses to outdoor enthusiasts around the world. The company handles all logistics, such as complying with import laws for each state and country.

        910 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Over the years, Codey Outfitters has acquired different IT systems to manage orders, shipments, inventory, and billing. It uses Salesforce CRM to manage its customer base and the suppliers whose items it sells. Codey Outfitters wants to provide customers with a one-stop shopping portal where they can see price changes on the gear. When the inventory is updated, Codey Outfitters wants the change notifications sent to its Salesforce org. Salesforce then performs business logic to determine whether the updates include price changes that are valuable to customers based on their order history. Customers can see or be notified about relevant deals on their Codey Outfitters portal. Let’s see how Codey Outfitters sets up and uses external change data capture to accomplish these goals.

        Set Up the External Data Source and the External Object Codey Outfitters has an OData 4.0 service for its inventory. The company connects its Salesforce org to the inventory by creating an external data source called Gear Inventory and creating an external object called Products. Monitor External Change Data Capture With external change data capture enabled, Codey Outfitters’ org polls the external system every 30 minutes. To monitor the tracking status, it queries the BackgroundOperation object. Codey Outfitters prefers to run SOQL queries in the Query Editor of the Developer Console, but you can use your preferred tool. Subscribe to Changes with Streaming API When Codey Outfitters runs its Bayeux client, the client subscribes to Streaming API on the products publication channel. React to Changes with Apex Triggers To automate your business with external change events, use Apex triggers.

        Set Up the External Data Source and the External Object Codey Outfitters has an OData 4.0 service for its inventory. The company connects its Salesforce org to the inventory by creating an external data source called Gear Inventory and creating an external object called Products. The Products external object provides the following data. • Name (product name) • UnitPrice (current price) • Stock (number of items in stock) • OrderLimit (limit for each order) To track changes, Codey Outfitters selects Eligible for External Change Data Capture for the Gear Inventory external data source. It then enables Track Data Changes on the Products external object.

        Monitor External Change Data Capture With external change data capture enabled, Codey Outfitters’ org polls the external system every 30 minutes. To monitor the tracking status, it queries the BackgroundOperation object. Codey Outfitters prefers to run SOQL queries in the Query Editor of the Developer Console, but you can use your preferred tool. Here’s the SOQL query that Codey Outfitters uses to monitor the tracking status.

        SELECT Id,Name,SubmittedAt,StartedAt,FinishedAt,ProcessAfter,Status FROM BackgroundOperation WHERE WorkerUri='v45.0/xds/data-changes'

        In the query results, the first row shows the initial callout to the external system. The initial request tells the OData producer to start tracking changes on the Products__x object. In the second row, the org schedules the next callout to request the tracked changes. Notice that the callout is scheduled to occur after 30 minutes have passed.

        911 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        ID Name Submitted Started Finished Process After Status

        08Pxx0000000019EAA Products__x 2017-10-06T01:11:04.000Z 2017-10-06T01:11:08.000Z 2017-10-06T01:11:08.000Z Complete

        08Pxx000000000qEAA Products__x 2017-10-06T01:11:08.000Z 2017-10-06T01:41:08.000Z Waiting

        After waiting 30 minutes, querying the BackgroundOperation object shows that the second callout finishes, and the status is Complete. In the third row, a new change request is scheduled to run after 30 more minutes have passed.

        ID Name Submitted Started Finished Process After Status 08Pxx0000000019EAA Products__x 2017-10-06T01:11:04.000Z 2017-10-06T01:11:08.000Z 2017-10-06T01:11:08.000Z Complete

        08Pxx000000000qEAA Products__x 2017-10-06T01:41:09.000Z 2017-10-06T01:41:09.000Z 2017-10-06T01:41:09.000Z 2017-10-06T01:41:08.000Z Complete

        08Pxx000000002MEAQ Products__x 2017-10-06T01:41:09.000Z 2017-10-06T02:11:09.000Z Waiting

        Suppose that the Codey Outfitters inventory has a service outage, preventing the scheduled poll request from succeeding. Errors cause change tracking to stop, so querying the BackgroundOperation object shows the error status and no new rows.

        ID Name Submitted Started Finished Process After Status 08Pxx0000000019EAA Products__x 2017-10-06T01:11:04.000Z 2017-10-06T01:11:08.000Z 2017-10-06T01:11:08.000Z Complete

        08Pxx000000000qEAA Products__x 2017-10-06T01:41:09.000Z 2017-10-06T01:41:09.000Z 2017-10-06T01:41:09.000Z 2017-10-06T01:41:09.000Z Complete

        08Pxx000000002MEAQ Products__x 2017-10-06T01:41:09.000Z 2017-10-06T02:12:07.000Z 2017-10-06T02:12:07.000Z 2017-10-06T02:11:09.000Z Error

        When query results show no rows in Waiting status, external change data capture is disabled. When the query results show an error, you can get error details by including the Error field in your SOQL query of the BackgroundOperation object. Here’s how Codey Outfitters investigates the error.

        SELECT Error FROM BackgroundOperation WHERE Id=’08Pxx000000002MEAQ’

        Because a service outage caused the problem, the error message says:

        The external system is unreachable. Try again later, or contact your admin, who can verify the external data source settings and the external system's availability. Attempted to reach this URL: https://codey-outfitters.example.com/inventory/Products

        Codey Outfitters fixes the service outage and restarts change tracking on the Products__x object.

        Subscribe to Changes with Streaming API When Codey Outfitters runs its Bayeux client, the client subscribes to Streaming API on the products publication channel. Codey Outfitters uses a Visualforce page to show its customers updates to prices and inventory and new and discontinued outdoor gear. This sample source code for the Visualforce page is on Github, and you can modify it to work with your OData 4.0 producer. The heart of the subscription mechanism is in the _subscribeChannels method in src/js/channel/ServerConnection.js.

        cometd.subscribe(channelName, function(event) { if (event && event.data && event.data.payload &&

        912 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        event.data.payload.ChangeEventHeader) { var header = event.data.payload.ChangeEventHeader; var entityName = header.entityName; var recordId = header.recordIds[0]; var timestamp = header.commitTimestamp; var changeType = header.changeType;

        switch (changeType) { case "UPDATE": // Update logic ... break; case "CREATE": // Create logic break; case "DELETE": // Delete logic break; } } }

        The channelName for Codey Outfitters’ products is /data/Products__ChangeEvent. Each change event notification that’s published on the channel is in the Bayeux format and represents an updated record in the product inventory. The data.payload contains the change event data and includes a header that describes the nature of the change event. This sample event notification describes a change to a Codey Outfitters product record.

        { schema=”lswW55LyUCYeU7raSrmZ5A”, payload={ ChangeEventHeader={ commitUser=”005xx000001SvAn”, sequenceNumber=15, entityName=”Products__x”, changeType=”UPDATE”, changeOrigin=”Products?$deltaToken=3779”, transactionKey=”f158f145-a...”, commitTimestamp=1507759119826, recordIds=[“x03xx0000000008”] }, Name__c=”Camping Stove”, ExternalId=7801, UnitPrice__c=10.0, Stock__c=1500.0, OrderLimit__c=12.0, ProductId__c=7801.0 }, event={replayId=15} }

        Each change event notification has this structure.

        Field Description schema Versioned schema reference that defines the change event.

        913 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Field Description

        payload Details about the change event. • ChangeEventHeader—Describes the nature of the data change event. • Record fields and values—The OData producer can also include fields that have no changed values. To see the current values, query the external object using the record ID in the change event header.

        event The replay ID that refers to the position of the event notification in the event stream on a channel.

        Each change event header contains these fields.

        Field Description commitUser User who publishes the event.

        sequenceNumber Change event sequence number. Each change occurs in the order in which it’s received.

        entityName API name of the external object.

        changeType Specifies whether a record was updated, created, or deleted.

        changeOrigin Delta link that’s used to request the change. The OData producer calculates the delta token while executing the previous change request.

        transactionKey Unique identifier for the transaction.

        commitTimestamp Specifies when the change event notification is published in milliseconds since January 1, 1970.

        recordIds Salesforce ID of the external object record that’s updated, created, or deleted. To see the current values of the record’s fields, query the external object using this record ID.

        nulledFields List of fields set to null.

        React to Changes with Apex Triggers To automate your business with external change events, use Apex triggers. Codey Outfitters can customize Salesforce to send email or SMS notifications on items that are low on stock or have been updated to an attractive price. Gear and other items that are in high demand can be monitored for low stock and automatically ordered. Before customizing Salesforce, make sure that you’re tracking data changes on the external object that you want to track. To track items that are running low on stock, Codey Outfitters creates an Apex trigger named LowOnStock. Next, the company selects the trigger’s sObject and the change event that publishes changes for the external object Products__x: Products__ChangeEvent.

        914 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Here’s an example of a simple rule that sends a notification when an item is low on stock.

        trigger LowOnStock on Products__ChangeEvent (after insert) { // Get the change event’s product ID for added and updated products Set productIds = new Set(); for (Products__ChangeEvent event: Trigger.new) { if (event.ChangeEventHeader.getChangeType() != 'DELETE') { String productId = event.ChangeEventHeader.getRecordIds()[0]; productIds.add(productId); } } if (productIds.size() > 0) { ProductNotifications.notifyOnLowOnStockProductUpdates(productIds); } }

        The product notifications class queries the external Product objects for the given changed product IDs and LowOnStock threshold value. Looking up the current Product records on the external system for qualifying products is a callout and is scheduled as an Apex future.

        public class ProductNotifications { // Notify subscribers on product updates that are low on stock. // This method is run asynchronously as it is performing a callout to the external // system to get the latest product details @future (callout=true) public static void notifyOnLowOnStockProductUpdates(Set productIds) { // Look up the current stock threshold to filter the products with Integer productStockThreshold = ...; List lowOnStockProducts = getProductsLowOnStock(productIds, productStockThreshold); // Notify subscribers notifySubscribers(lowOnStockProducts, ‘These items are running out of stock. Act soon!’); }

        // Get the external Product objects for each Product ID public static List getProductsLowOnStock(Set productIds, Integer productStockThreshold) { return [SELECT Id, ExternalId, Name__c, ProductId__c, Stock__c, UnitPrice__c FROM Products__x WHERE Stock__c < :productStockThreshold AND Stock__c > 0 AND Id IN :productIds]; }

        // Notify subscribers by sending an email or SMS public static void notifySubscribers(String message, List products) { ... } }

        You can discover the metadata for change events through the sObject describe API. For example, the sObject describe for Products__ChangeEvent shows the following standard change event fields.

        915 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Field Type Description

        Id String The change event’s Salesforce ID. This ID isn’t the Salesforce ID of the record that changed, but the event that carries the record’s changes.

        ReplayId String The position of the event notification in the event stream on a channel.

        ChangeEventHeader Complex Type The type of data change event.

        Each change event object defines fields that hold the updated value at the time the record was updated. The OData producer can also include fields that haven’t changed. To see the current values, query the external object using the record ID in the change event header. The following table shows sample Products__x fields. Event change objects are tailored to their tracked external object. For a change event, not all fields are necessarily present.

        Field Type Description Id String Product record’s Salesforce ID in your org

        ExternalId String Product record’s external ID

        DisplayUrl String URL representing the record in the external system

        CreatedOn__c DateTime When the record was created in the external system

        UpdatedOn__c DateTime When the record was last updated on the external system

        Name__c String Product name in Product__x

        OrderLimit__c Integer Number of items that can be ordered at a time

        Stock__c Integer Number of items in stock

        UnitPrice__c Decimal(8,2) Item’s unit price

        The following fields are change event header complex type fields. To access ChangeEventHeader fields from Apex, use its getter method. For example, to access the field ChangeType, use eventObject.ChangeEventHeader.getChangeType().

        Field Type Description commitUser String User who published the event.

        sequenceNumber Integer Change event sequence number. Each change is listed in the order in which it’s received.

        entityName String API name of the external object.

        916 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Field Type Description

        changeType ChangeType enum Specifies whether a record was updated, created, or deleted. The enum values for external change events are Create, Update, and Delete.

        changeOrigin String Delta link that’s used to request the changes made since the previous or initial change request. The OData producer calculates the delta token while executing the previous change request.

        transactionKey String Unique identifier for the transaction.

        commitTimestamp Long Specifies when the change event notification is published in milliseconds since January 1, 1970.

        recordIds Array of type String Salesforce ID of the external object record that is updated, created, or deleted. To see the current values of the record fields, query the external object using this record ID. This array always has exactly one Salesforce ID.

        nulledFields Array of type String List of field names set to null.

        Access External Data with a Custom Adapter for Salesforce Connect Connect your users to any data anywhere by developing your own custom adapter with the Apex Connector Framework.

        Custom Adapter for Salesforce Connect Connect to any data anywhere for a complete view of your business. Use the Apex Connector Framework to develop a custom adapter for Salesforce Connect. Set Up Salesforce Connect to Access External Data with a Custom Adapter Let users view, search, and modify any data anywhere from within their Salesforce org. Considerations for Salesforce Connect—Custom Adapter Understand the special behaviors, limits, and recommendations for using a custom adapter for Salesforce Connect.

        917 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Custom Adapter for Salesforce Connect

        Connect to any data anywhere for a complete view of your business. Use the Apex Connector EDITIONS Framework to develop a custom adapter for Salesforce Connect. Your users and the Lightning Platform interact with the external data via external objects. For each Available in: both Salesforce of those interactions, Salesforce Connect invokes methods in the Apex classes that compose the Classic (not available in all custom adapter. Salesforce invokes the custom adapter’s Apex code each time that: orgs) and Lightning Experience (not for • A user clicks an external object tab for a list view. high-data-volume external • A user views a record detail page of an external object. objects) • A user views a record detail page of a parent object that displays a related list of child external Available in: Developer object records. Edition • A user performs a Salesforce global search. Available for an extra cost • A user creates, edits, or deletes an external object record. in: Enterprise, Performance, • A user runs a report. and Unlimited Editions • The preview loads in the report builder. • An external object is accessed via flows, processes, APIs, Apex, SOQL, or SOSL. • You validate or sync an external data source. Apex code can access external objects, but some limitations and requirements apply. • To understand the limitations on Apex code accessing external objects, see Apex Considerations for Salesforce Connect External Objects. • To know how to use a custom adapter for Salesforce Connect, see Get Started with the Apex Connector Framework.

        External IDs for External Objects in Salesforce Connect—Custom Adapter When you access external data with a custom adapter for Salesforce Connect, the values of the External ID standard field on an external object come from the DataSource.Column named ExternalId.

        SEE ALSO: Salesforce Connect Set Up Salesforce Connect to Access External Data with a Custom Adapter Considerations for Salesforce Connect—Custom Adapter

        918 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        External IDs for External Objects in Salesforce Connect—Custom Adapter

        When you access external data with a custom adapter for Salesforce Connect, the values of the EDITIONS External ID standard field on an external object come from the DataSource.Column named ExternalId. Available in: both Salesforce Each external object has an External ID standard field. Its values uniquely identify each Classic (not available in all external object record in your org. When the external object is the parent in an external lookup orgs) and Lightning relationship, the External ID standard field is used to identify the child records. Experience (not for high-data-volume external Important: objects)

        • The custom adapter’s Apex code must declare the DataSource.Column named Available in: Developer ExternalId and provide its values. Edition • Don’t use sensitive data as the values of the External ID standard field or fields designated Available for an extra cost as name fields, because Salesforce sometimes stores those values. in: Enterprise, Performance, – External lookup relationship fields on child records store and display the External ID and Unlimited Editions values of the parent records. – For internal use only, Salesforce stores the External ID value of each row that’s retrieved from the external system. This behavior doesn’t apply to external objects that are associated with high-data-volume external data sources.

        Example: This excerpt from a sample DataSource.Connection class shows the DataSource.Column named ExternalId.

        override global List sync() { List tables = new List(); List columns; columns = new List(); columns.add(DataSource.Column.text('title', 255)); columns.add(DataSource.Column.text('description',255)); columns.add(DataSource.Column.text('createdDate',255)); columns.add(DataSource.Column.text('modifiedDate',255)); columns.add(DataSource.Column.url('selfLink')); columns.add(DataSource.Column.url('DisplayUrl')); columns.add(DataSource.Column.text('ExternalId',255)); tables.add(DataSource.Table.get('googleDrive','title', columns)); return tables; }

        SEE ALSO: Custom Adapter for Salesforce Connect Apex Developer Guide

        919 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Set Up Salesforce Connect to Access External Data with a Custom Adapter

        USER PERMISSIONS EDITIONS

        To create Apex classes: Author Apex Available in: both Salesforce Classic (not available in all To configure remote settings: Modify All Data orgs) and Lightning To create and edit external data sources: Customize Application Experience (not for high-data-volume external To create and edit external objects: Customize Application objects)

        To define or change object-level help: Customize Application Available in: Developer To create and edit custom fields: Customize Application Edition Available for an extra cost To edit permission sets and user profiles: Manage Profiles and Permission Sets in: Enterprise, Performance, To edit another user’s authentication settings Manage Users and Unlimited Editions for external systems:

        Let users view, search, and modify any data anywhere from within their Salesforce org. Setting up Salesforce Connect with a custom adapter involves these high-level steps. 1. Develop the custom adapter for Salesforce Connect. Using the Apex Connector Framework, create the DataSource.Connection and DataSource.Provider classes that comprise the custom adapter.

        2. Define remote sites for Apex callouts. If the custom adapter involves any Apex callouts, define each callout endpoint as a remote site in your organization. However, you don’t need to define a remote site for a callout whose endpoint is specified as a named credential instead of a URL.

        3. Define an external data source of type Salesforce Connect: Custom. If you created multiple custom adapters, make sure that the external data source’s Type field specifies the correct DataSource.Provider class.

        4. Create the external objects. Perform this task only if you don’t sync to automatically create the external objects. Create an external object for each external data table that you want to access from your Salesforce org.

        5. Create help content for the external objects. Create Visualforce pages that describe the external data. When your users click Help for this Page on an external object, they read your custom help content. Remember, your users can’t find information about the external data in Salesforce Help.

        6. Add custom fields and relationships to the external objects. Create relationships between objects. If you didn’t sync to automatically create the external objects and their fields, create a custom field for each external table column that you want to access from your Salesforce org.

        7. Verify access to external object data. Check that expected user and code interactions with the external objects work, including sorting and filtering search and query results.

        920 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Tip: After you configure an external data source, run the validator tool on each external object to test and troubleshoot its connections. The tool tests for ID uniqueness and the ability to sort and filter results.

        8. Enable user access to external objects. Grant object permissions through permission sets or profiles.

        9. Enable user access to the fields on the external objects. Grant field permissions through permission sets or profiles.

        10. If the external data source uses per-user authentication: a. Let users authenticate to the external system. Grant users access to authentication settings for the external data source through permission sets or profiles.

        b. Set up each user’s authentication settings. You or your users can perform this task.

        Tip: Train your users on how to set up their authentication settings for external systems. Make sure that they know which credentials to enter for each external system. If you’re using OAuth 2.0, test the OAuth flow for potentially confusing prompts or redirects, and train your users as needed. OAuth flows vary, depending on your external system, authentication provider, and specified scopes.

        SEE ALSO: Custom Adapter for Salesforce Connect Salesforce Platform Features Supported by Salesforce Connect Developer Guide: Visualforce Developer's Guide External Object Relationships

        Define an External Data Source for Salesforce Connect—Custom Adapter

        Connect your Salesforce org to any data anywhere via a Salesforce Connect custom adapter that EDITIONS you create with the Apex Connector Framework. Before you begin, develop the custom adapter for Salesforce Connect. If the custom adapter uses Available in: both Salesforce Apex callouts, also define remote sites for the callout endpoints. See Set Up Salesforce Connect to Classic and Lightning Access External Data with a Custom Adapter on page 920. Experience 1. From Setup, enter External Data Sources in the Quick Find box, then select Available in: Developer External Data Sources. Edition 2. Click New External Data Source, or click Edit to modify an existing external data source. Available for an extra cost in: Enterprise, Performance, 3. Complete the fields. and Unlimited Editions

        Field Description Label A user-friendly name for the external data source. The label is displayed USER PERMISSIONS in the Salesforce user interface, such as in list views. To create and edit external If you set Identity Type to Per User, this label appears when data sources: your users view or edit their authentication settings for external • Customize Application systems.

        921 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Field Description Name A unique identifier that’s used to refer to this external data source definition through the API. The name can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.

        Type Select Salesforce Connect: Custom—. If you change and save a DataSource.Connection class, resave the corresponding DataSource.Provider class. Otherwise, when you define the external data source, the custom adapter doesn’t appear as an option for the Type field.

        URL URL of the external system. Available only when the DataSource.Provider class declares the REQUIRE_ENDPOINT capability. If the class also declares the REQUIRE_HTTPS capability, the URL must begin with https://. If the endpoint is defined in a named credential, enter the named credential URL. A named credential URL contains the scheme callout:, the name of the named credential, and an optional path. For example: callout:My_Named_Credential/some_path. You can append a query string to a named credential URL. Use a question mark (?) as the separator between the named credential URL and the query string. For example: callout:My_Named_Credential/some_path?format=json.

        Writable External Lets the Lightning platform and users in this org create, update, and delete records for external Objects objects associated with the external data source. The external object data is stored outside the org. By default, external objects are read only.

        High Data Volume Salesforce enforces rate limits for retrieving and viewing data from external systems. If your org hits rate limits when accessing external objects, consider selecting the High Data Volume option on the associated external data sources. Doing so bypasses most rate limits, but some special behaviors and limitations apply. See High Data Volume Considerations for Salesforce Connect—Custom Adapters on page 926.

        Certificate If you specify a certificate, your Salesforce org supplies it when establishing each two-way SSL connection with the external system. The certificate is used for digital signatures, which verify that requests are coming from your Salesforce org. Available only when the DataSource.Provider class declares the CERTIFICATE authentication capability.

        Identity Type Determines whether you're using one set or multiple sets of credentials to access the external system. See Identity Type for External Data Sources on page 857. Available only when the DataSource.Provider class declares the BASIC or OAUTH authentication capability.

        4. Select the authentication protocol. • If you select Password Authentication, enter the username and password for accessing the external system.

        922 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Password authentication is available only when the DataSource.Provider class declares the BASIC authentication capability.

        • If you select OAuth 2.0, complete the following fields. OAuth 2.0 is available only when the DataSource.Provider class declares the OAUTH authentication capability.

        Field Description Authentication Choose the provider. See Authentication Providers. Provider

        Scope Specifies the scope of permissions to request for the access token. Your authentication provider determines the allowed values. See Use the Scope Parameter.

        Note: – The value that you enter replaces the Default Scopes value that’s defined in the specified authentication provider. – Whether scopes are defined can affect whether each OAuth flow prompts the user with a consent screen. – We recommend that you request a refresh token or offline access. Otherwise, when the token expires, you lose access to the external system.

        Start To authenticate to the external system and obtain an OAuth token, select this checkbox. This Authentication Flow authentication process is called an OAuth flow. on Save When you click Save, the external system prompts you to log in. After successful login, the external system grants you an OAuth token for accessing its data from this org. Redo the OAuth flow when you need a new token—for example, if the token expires—or if you edit the Scope or Authentication Provider fields. When the token expires, the external system returns a 401 HTTP error status.

        5. Click Save. 6. Click Validate and Sync, and confirm that the connection is successful. This step also invokes the sync() method on the DataSource.Connection class to obtain the list of tables that you can sync to create external objects and their fields.

        7. Optionally, select tables and click Sync to do the following for each selected table. • Automatically create a Salesforce external object. • Automatically create a custom field for each table column that’s compatible with a Salesforce metadata field type.

        Note: Before you sync, make sure that you understand the considerations that are described in these topics. • Sync an External Data Source for Salesforce Connect on page 858 • Sync Considerations for Salesforce Connect—Custom Adapter on page 927

        923 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        You can instead choose to manually create the external objects and custom fields that map to the external data. Doing so lets you customize the external object names, decide which table columns to create custom fields for, and customize the custom field names. However, this approach takes longer and requires manual maintenance.

        SEE ALSO: Set Up Salesforce Connect to Access External Data with a Custom Adapter Store Authentication Settings for External Systems Named Credentials

        Considerations for Salesforce Connect—Custom Adapter

        Understand the special behaviors, limits, and recommendations for using a custom adapter for EDITIONS Salesforce Connect. Also review the considerations that apply to all Salesforce Connect adapters. Available in: both Salesforce Classic (not available in all orgs) and Lightning Apex Connector Framework Considerations for Salesforce Connect—Custom Adapter Experience (not for Understand the limits and considerations for creating Salesforce Connect custom adapters with high-data-volume external the Apex Connector Framework. objects) High Data Volume Considerations for Salesforce Connect—Custom Adapters Available in: Developer If your org hits rate limits when accessing external objects, consider selecting the High Data Edition Volume option on the associated external data sources. Doing so bypasses most rate limits, Available for an extra cost but some special behaviors and limitations apply. in: Enterprise, Performance, Writable External Objects Considerations for Salesforce Connect—Custom Adapters and Unlimited Editions Some special behaviors and limitations affect writable external objects that are associated with custom adapters for Salesforce Connect. Sync Considerations for Salesforce Connect—Custom Adapter When you validate and sync an external data source of type Salesforce Connect: Custom, some special behaviors and limitations apply.

        SEE ALSO: Salesforce Platform Features Supported by Salesforce Connect

        924 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        Apex Connector Framework Considerations for Salesforce Connect—Custom Adapter

        Understand the limits and considerations for creating Salesforce Connect custom adapters with EDITIONS the Apex Connector Framework. • If you change and save a DataSource.Connection class, resave the corresponding Available in: both Salesforce DataSource.Provider class. Otherwise, when you define the external data source, the Classic (not available in all custom adapter doesn’t appear as an option for the Type field. Also, the associated external orgs) and Lightning objects’ custom tabs no longer appear in the Salesforce UI. Experience (not for high-data-volume external • DML operations aren’t allowed in the Apex code that comprises the custom adapter. objects) • Make sure that you understand the limits of the external system’s APIs. For example, some external systems accept only requests for up to 40 rows. Available in: Developer Edition • Apex data type limitations: Available for an extra cost – Double—The value loses precision beyond 18 significant digits. For higher precision, use in: Enterprise, Performance, decimals instead of doubles. and Unlimited Editions – String—If the length is greater than 255 characters, the string is mapped to a long text area field in Salesforce.

        • Custom adapters for Salesforce Connect are subject to the same limitations as any other Apex code. For example: – All Apex governor limits apply. – Test methods don’t support web service callouts. Tests that perform web service callouts fail. For an example that shows how to avoid these failing tests by returning mock responses, see Google Drive™ Custom Adapter for Salesforce Connect.

        • In Apex tests, use dynamic SOQL to query external objects. Tests that perform static SOQL queries of external objects fail.

        SEE ALSO: Custom Adapter for Salesforce Connect External Objects in Salesforce Connect Apex Developer Guide: Primitive Data Types Apex Developer Guide: Execution Governors and Limits Apex Developer Guide: Callout Limits and Limitations Apex Developer Guide: Google Drive™ Custom Adapter for Salesforce Connect Apex Developer Guide: Dymamic SOQL

        925 Extend Salesforce with Clicks, Not Code Access External Data With Salesforce Connect

        High Data Volume Considerations for Salesforce Connect—Custom Adapters

        If your org hits rate limits when accessing external objects, consider selecting the High Data Volume EDITIONS option on the associated external data sources. Doing so bypasses most rate limits, but some special behaviors and limitations apply. Available in: both Salesforce • The following features aren’t available for external objects that are associated with Classic (not available in all high-data-volume external data sources. orgs) and Lightning Experience (not for – Access via Lightning Experience high-data-volume external – Access via the Salesforce mobile app objects) – Appearance in Recent Items lists Available in: Developer – Record feeds Edition – Reports and dashboards Available for an extra cost – Writable external objects in: Enterprise, Performance, and Unlimited Editions • Salesforce IDs aren’t assigned to external object records that are associated with high-data-volume external data sources. • On record detail pages for external objects that are associated with high-data-volume external data sources, custom buttons, and links that call JavaScript aren’t supported. • Salesforce Console in Salesforce Classic doesn’t support external objects that are associated with high-data-volume external data sources.

        SEE ALSO: Custom Adapter for Salesforce Connect Considerations for Salesforce Connect—Custom Adapter

        Writable External Objects Considerations for Salesforce Connect—Custom Adapters

        Some special behaviors and limitations affect writable external objects that are associated with EDITIONS custom adapters for Salesforce Connect. • Writable external objects aren’t available for high-data-volume external data sources. Available in: both Salesforce • Queued changes to the external data execute over time, so external object records that are Classic (not available in all read successively can contain different data. orgs) and Lightning Experience (not for Also review the considerations that apply to all Salesforce Connect adapters. high-data-volume external objects)

        SEE ALSO: Available in: Developer Writable External Objects in Salesforce Connect Edition Custom Adapter for Salesforce Connect Available for an extra cost Apex Developer Guide : Writable External Objects in: Enterprise, Performance, and Unlimited Editions

        926 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        Sync Considerations for Salesforce Connect—Custom Adapter

        When you validate and sync an external data source of type Salesforce Connect: Custom, EDITIONS some special behaviors and limitations apply. • Syncing always enables search on the external object when search is enabled on the external Available in: both Salesforce data source, and vice versa. For an external data source of type Salesforce Connect: Custom, Classic (not available in all search is enabled when the custom adapter’s DataSource.Provider class declares the orgs) and Lightning DataSource.Capability.SEARCH capability. Experience (not for high-data-volume external Important: When you select the tables to sync, determine whether check marks appear in objects) the Synced column. Available in: Developer If a Synced check mark appears, your org has an external object whose object name matches Edition the table name. If you select the table and click Sync: Available for an extra cost • The external object is overwritten. in: Enterprise, Performance, • Any custom field on the external object is overwritten if its API name (for example, and Unlimited Editions Email__c) associates it with a table column name (for example, Email). • Any other custom fields on the external object remain as they are, including: – Previously synced custom fields whose API names were changed by editing their Field Name values. – Manually added custom fields whose API names aren’t associated with table column names.

        • Syncing always enables search on the external object when search is enabled on the external data source, and vice versa. For an external data source of type Salesforce Connect: Custom, search is enabled when the custom adapter’s DataSource.Provider class declares the DataSource.Capability.SEARCH capability. If no Synced check mark appears, and you sync the table, a new external object is created in your org. The new external object’s object name matches the table name. For example, suppose you change the table name in the custom adapter’s DataSource.Connection class to no longer match the object name of the external object. Syncing that table creates a new external object in Salesforce. We recommend that you change the object name of the existing external object to match the new table name in the DataSource.Connection class before you sync that table.

        Also review the considerations that apply to all Salesforce Connect adapters.

        SEE ALSO: Sync an External Data Source for Salesforce Connect Define an External Data Source for Salesforce Connect—Custom Adapter Custom Adapter for Salesforce Connect

        Work with External Data Sources An external data source specifies how to access an external system. Salesforce Connect uses external data sources to access data that's stored outside your Salesforce organization. Files Connect uses external data sources to access third-party content systems. External data sources have associated external objects, which your users and the Lightning platform use to interact with the external data and content.

        927 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        Define External Data Sources Create external data sources to connect to content and data that is stored outside your Salesforce org. Validate and Sync an External Data Source After you configure an external data source, synchronize it to map its tables with external objects in your Salesforce org. The content and data of external objects appear in federated search, together with your Salesforce content and data. Define External Objects Tables in external systems map to external objects in Salesforce, combining all your data and content for users in your org. Validate External Object Connections After you configure an external data source, run the validator tool on each external object to test and troubleshoot its connections. The tool tests for ID uniqueness and the ability to sort and filter results. Validator is available for external objects from Apex and Odata data sources. Grant Access to Authentication Settings for External Data Sources For external data sources that use per-user authentication, grant users access through permission sets and profiles. Doing so lets users set up and manage their own authentication settings for accessing the external system. Store Authentication Settings for External Systems You or your administrator can set up and manage your authentication settings for external systems. With valid authentication settings, you can access external systems from within your Salesforce org. External Object Relationships External objects support standard lookup relationships, which use the 18-character Salesforce record IDs to associate related records with each other. However, data that’s stored outside your Salesforce org often doesn’t contain those record IDs. Therefore, two special types of lookup relationships are available for external objects: external lookups and indirect lookups.

        928 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        Define External Data Sources

        Create external data sources to connect to content and data that is stored outside your Salesforce EDITIONS org. 1. From Setup, enter External Data Sources in the Quick Find box, then select External Available in: both Salesforce Data Sources. Classic (not available in all orgs) and Lightning 2. Click New External Data Source. To modify an existing external data source, click Edit. Experience 3. Complete the steps for your type of external data source. Salesforce Connect is • Files Connect: Google Drive available in: Developer • Files Connect: SharePoint 2010 or 2013 Edition and for an extra cost • Files Connect: SharePoint Online or OneDrive for Business in: Enterprise, Performance, and Unlimited Editions • Files Connect: Box Files Connect for • Simple URL: Data from Another Web Domain cloud-based external data • Salesforce Connect: OData 2.0 sources is available in: • Salesforce Connect: OData 4.0 Professional, Enterprise, Performance, Unlimited, • Salesforce Connect: Cross-Org and Developer Editions • Salesforce Connect: Custom Federated Search is • Federated Search available in: Enterprise, Professional, Unlimited, and Developer Editions SEE ALSO: Salesforce Connect USER PERMISSIONS

        To create and edit an external data source: • Customize Application

        929 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        Validate and Sync an External Data Source

        After you configure an external data source, synchronize it to map its tables with external objects EDITIONS in your Salesforce org. The content and data of external objects appear in federated search, together with your Salesforce content and data. Available in: both Salesforce When you sync a large number of tables, you can select to execute the sync operation asynchronously Classic (not available in all as a background job and avoid connection timeout. You can view the list of sync operations orgs) and Lightning performed as background jobs in the corresponding External Data Source page. Experience

        Note: Salesforce Connect is available in: Developer • Syncing creates or overwrites Salesforce external objects that map to the external system’s Edition and for an extra cost schema. Syncing doesn’t copy any data into your Salesforce org or write data from your in: Enterprise, Performance, org to the external system. and Unlimited Editions • Syncing is a one-time process. If the external system’s schema changes, the modifications Files Connect for aren’t automatically synced to your Salesforce org. To reflect the changes in the external cloud-based external data system, resync the objects. After resyncing, full field-level security to the external objects sources is available in: is granted to all users who have the same profile as the user who initiated the resync. Professional, Enterprise, • Each org can have up to 200 external objects. External objects don’t count toward the Performance, Unlimited, amount for custom objects. Syncing fails if it causes your org to exceed 200 external and Developer Editions objects. Federated Search is • For Salesforce Connect external data sources, make sure that you read and understand available in: Enterprise, the sync considerations. See Sync an External Data Source for Salesforce Connect on page Professional, Unlimited, 858. and Developer Editions

        1. From Setup, enter External Data Sources in the Quick Find box, then select External Data Sources. USER PERMISSIONS

        2. Click the name of the external data source. To create an external object 3. Click Validate and Sync, and confirm that the connection is successful. from an external data source: 4. Select tables and click Sync to do the following for each selected table. • Customize Application • Automatically create a Salesforce external object. • Automatically create a custom field for each table column that’s compatible with a Salesforce metadata field type.

        Example: The resulting external data source detail page will include a list of related external objects like this.

        930 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        SEE ALSO: Salesforce Connect

        Define External Objects

        Tables in external systems map to external objects in Salesforce, combining all your data and content EDITIONS for users in your org. External objects are similar to custom objects, except that they map to data that’s stored outside Available in: both Salesforce your Salesforce org. Each external object relies on an external data source definition to connect Classic (not available in all with the external system’s data. Each external object definition maps to a data table on the external orgs) and Lightning system. Each of the external object’s fields maps to a table column on the external system. External Experience objects enable your users and the Lightning Platform to search and interact with the external data. Salesforce Connect is Note: available in: Developer Edition and for an extra cost • Each org can have up to 200 external objects. External objects don’t count toward the in: Enterprise, Performance, amount for custom objects. and Unlimited Editions • If the external system allows it, we recommend that you sync the external data source to Files Connect for automatically create related external objects. You can instead choose to manually define cloud-based external data external objects to customize the external object names and manually create the custom sources is available in: fields. Professional, Enterprise, Performance, Unlimited, To create or modify an external object: and Developer Editions 1. From Setup, enter External Objects in the Quick Find box, then select External Objects. Federated Search is 2. Click New External Object, or click Edit to modify an existing external object. available in: Enterprise, Professional, Unlimited, 3. Enter the following: and Developer Editions

        Field Description Label A user-friendly name for the external object. The label is displayed in USER PERMISSIONS the Salesforce user interface, such as in list views. To create or edit external We recommend that you make object labels unique across all objects: standard, custom, and external objects in the org. • Customize Application

        Plural Label The plural name of the external object. If you create a tab for this object, this name is used for the tab.

        Starts with If it’s appropriate for your org’s default language, select to precede vowel sound your label with “an” instead of “a” for any automated messages.

        Object Name A unique identifier used to refer to this external object definition when using the API. Object names must be unique across all standard, custom, and external objects in the org. The Object Name field can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.

        931 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        Field Description Description An optional description of the external object. A meaningful description helps you distinguish among your external objects when you view them in a list.

        Context-Sensitive Defines what appears when users click Help for this Page from the external object record home Help Setting (overview) and detail pages, as well as list views and related lists. We recommend that you select Open a window using a Visualforce page to display custom help that you create for your users. See Object-Level Help in Salesforce Classic on page 94. If you instead keep the default value, your users only see Salesforce Help, which doesn’t provide any information about your external data. This setting doesn’t affect the Help & Training link at the top of each page, which always opens Salesforce Help.

        Content Name Select the Visualforce page that best describes the data that’s provided by this external object. This field is available only when you select Open a window using a Visualforce page.

        External Data Source The external data source definition that contains the connection details you want to use for this external object.

        Table Name Table in the external system that the external object maps to. For SharePoint, the table name must match the related scope name.

        Display URL Available only for Salesforce Connect. The external object’s Display URL standard field values Reference Field are automatically generated from the external system. For example, with the OData 2.0 adapter for Salesforce Connect, the value is based on the link href that’s defined on the OData producer. You can override the default values with the values of a custom field on the same external object. Select the field name, and make sure that the custom field’s values are valid URLs.

        Allow Reports Available only for Salesforce Connect.

        Deployment Status Indicates whether the external object is visible to other users.

        Launch New Custom If selected, the custom tab wizard starts after you save the external object. Tab Wizard after saving this external object

        Allow Search If search is also enabled on the external data source, selecting this option lets users find the external object’s records via SOSL and Salesforce global searches. By default, search is disabled for new external objects. However, you can validate and sync an external data source to automatically create external objects. Syncing always enables search on the external object when search is enabled on the external data source, and vice versa.

        4. Click Save.

        932 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        5. On the external object detail page, view and modify the external object’s custom fields and relationships, page layouts, field sets, search layouts, and buttons and links. • To create field mappings or add fields to an external object, click New on the Custom Fields & Relationships related list. • To assign different page layouts by user profile, click Page Layout Assignments.

        Tip: After you configure an external data source, run the validator tool on each external object to test and troubleshoot its connections. The tool tests for ID uniqueness and the ability to sort and filter results.

        SEE ALSO: Set Up Salesforce Connect to Access External Data with the OData 2.0 or 4.0 Adapter Set Up Salesforce Connect to Access Data in Another Org with the Cross-Org Adapter Set Up Salesforce Connect to Access External Data with a Custom Adapter Deployment Status for Custom Objects and External Objects

        Validate External Object Connections

        After you configure an external data source, run the validator tool on each external object to test EDITIONS and troubleshoot its connections. The tool tests for ID uniqueness and the ability to sort and filter results. Validator is available for external objects from Apex and Odata data sources. Available in: both Salesforce 1. From Setup, enter External Data Source in the Quick Find box, then select External Classic (not available in all Data Source. orgs) and Lightning Experience 2. Select the external data source that contains the external object you want to validate. 3. Next to the external object’s name, click Validate. Salesforce Connect is available in: Developer 4. Select each query type you want validator to run. Edition and for an extra cost 5. Click Run Queries. in: Enterprise, Performance, and Unlimited Editions The validator results are displayed. Queries that ran successfully are listed in the Passed Queries table. The Failed Queries table lists the unsuccessful queries with information to help with Files Connect for troubleshooting. Queries that weren’t run because a prerequisite query was unsuccessful are in the cloud-based external data sources is available in: Skipped Queries table. Professional, Enterprise, Performance, Unlimited, SEE ALSO: and Developer Editions Define External Objects Federated Search is available in: Enterprise, Professional, Unlimited, and Developer Editions

        USER PERMISSIONS

        To create or edit external objects: • Customize Application

        933 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        Grant Access to Authentication Settings for External Data Sources

        For external data sources that use per-user authentication, grant users access through permission EDITIONS sets and profiles. Doing so lets users set up and manage their own authentication settings for accessing the external system. Available in: both Salesforce 1. From Setup, enter Permission Sets in the Quick Find box, then select Permission Sets Classic (not available in all or Profiles. orgs) and Lightning Experience 2. Click the name of the permission set or profile that you want to modify. 3. Do one of the following. Salesforce Connect is available in: Developer • For a permission set, or for a profile in the enhanced profile user interface, click External Edition and for an extra cost Data Source Access in the Apps section. Then click Edit. in: Enterprise, Performance, • For a profile in the original profile user interface, click Edit in the Enabled External Data and Unlimited Editions Source Access section. Files Connect for cloud-based external data 4. Add the data sources that you want to enable. sources is available in: 5. Click Save. Professional, Enterprise, Performance, Unlimited, and Developer Editions SEE ALSO: Federated Search is Store Authentication Settings for External Systems available in: Enterprise, Set Up Salesforce Connect to Access Data in Another Org with the Cross-Org Adapter Professional, Unlimited, Set Up Salesforce Connect to Access External Data with the OData 2.0 or 4.0 Adapter and Developer Editions Set Up Salesforce Connect to Access External Data with a Custom Adapter USER PERMISSIONS

        To edit permission sets and user profiles: • Manage Profiles and Permission Sets

        934 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        Store Authentication Settings for External Systems

        You or your administrator can set up and manage your authentication settings for external systems. EDITIONS With valid authentication settings, you can access external systems from within your Salesforce org.

        Note: All credentials stored within the NamedCredential, ExternalDataSource, and Available in: both Salesforce ExternalDataUserAuth entities are encrypted under a framework that is consistent with other Classic and Lightning encryption frameworks on the platform. Salesforce encrypts your credentials by auto-creating Experience org-specific keys. Credentials encrypted using the previous encryption scheme were migrated Named credentials are to the new framework. available in: All Editions. Your administrator defines external systems in external data sources and named credentials. External Salesforce Connect is data sources specify how to access data or content that’s stored outside your Salesforce org. Named available in: Developer credentials specify callout endpoints, which receive Web service callouts from your org. Edition and for an extra cost in: Enterprise, Performance, Before you begin, your administrator: and Unlimited Editions. • Sets up the external data source or named credential to use per-user authentication. Files Connect for • Grants you access to the external data source or named credential. cloud-based external data • Verifies that your org can connect to the external system. sources is available in: Professional, Enterprise, • Tells you the authentication settings to enter. Performance, Unlimited, • Sets up the community, if applicable, by using the Salesforce Tabs + Visualforce template. and Developer Editions If the community is built with the Customer Service template, only your administrator can set up and manage your authentication settings for external systems. You can’t complete these steps on your own. USER PERMISSIONS

        If you don’t see the expected settings or options, contact your administrator. To store authentication settings for an external data 1. Access your authentication settings for external systems in one of the following ways. source: From within a community: • The data source enabled under External • If you have a community license, click My Settings > Authentication Settings for External Data Source Access Systems. To store authentication • Otherwise, from your personal settings, enter Authentication, then select settings for a named Authentication Settings for External Systems credential: From Salesforce, go to your personal settings and enter Authentication in the Quick • The named credential enabled under Named Find box, then select Authentication Settings for External Systems. Credential Access 2. Click New or Edit. To edit another user’s authentication settings for 3. Complete the fields. external systems: • Manage Users Field Description External If you’re not sure which option to select, ask your administrator. System • External Data Source: Provides access to external objects, whose Definition data is stored outside your Salesforce organization. • Named Credential: Enables your actions to trigger authenticated callouts to the endpoint that’s specified in the named credential. A named credential can handle the authentication for an external data source. In this scenario, your administrator instructs you to select Named Credential in this field to access external objects.

        935 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        Field Description External Data Source Which field appears depends on what’s selected for External System Definition. or If you’re not sure which option to select, ask your administrator. Your administrator can change Named Credential the option labels to make them more relevant or easier to distinguish from each other.

        User Available only to administrators. Select the user whose authentication settings you’re entering.

        4. Select the authentication protocol that’s required by the external system. If you’re not sure which option to select, ask your administrator. • If you select Password Authentication, enter your username and password for the external system. • If you select OAuth 2.0, complete the following fields.

        Field Description Authentication If you’re not sure which option to select, ask your administrator. Your administrator can change Provider the option labels to make them more relevant or easier to distinguish from each other.

        Scope If you’re not sure what to enter, ask your administrator. Specifies the scope of permissions to request for the access token.

        Start To authenticate to the external system and obtain an OAuth token, select this checkbox. This Authentication Flow authentication process is called an OAuth flow. on Save When you click Save, the external system prompts you to log in. After successful login, the external system grants you an OAuth token for accessing its data from this org. Redo the OAuth flow when you need a new token—for example, if the token expires—or if you edit the Scope or Authentication Provider fields. When the token expires, the external system returns a 401 HTTP error status.

        5. Click Save.

        SEE ALSO: Define External Data Sources Grant Access to Authentication Settings for External Data Sources Define a Named Credential Grant Access to Authentication Settings for Named Credentials Add Tabs to Your Salesforce Tabs + Visualforce Site Personalize Your Salesforce Experience

        936 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        External Object Relationships

        External objects support standard lookup relationships, which use the 18-character Salesforce record EDITIONS IDs to associate related records with each other. However, data that’s stored outside your Salesforce org often doesn’t contain those record IDs. Therefore, two special types of lookup relationships are Available in: both Salesforce available for external objects: external lookups and indirect lookups. Classic (not available in all External lookups and indirect lookups compare a specific field’s values on the parent object to the orgs) and Lightning relationship field’s values on the child object. When values match, the records are related to each Experience other. Salesforce Connect is To create an external object relationship, create a custom field on the child object with one of the available in: Developer following field types. If the child is an external object, you can instead change the field type of an Edition and for an extra cost existing custom field to one of the following. in: Enterprise, Performance, and Unlimited Editions • Lookup Relationship Files Connect for • External Lookup Relationship cloud-based external data • Indirect Lookup Relationship sources is available in: This table summarizes the types of relationships that are available to external objects. Professional, Enterprise, Performance, Unlimited, Note: Federated Search supports only external lookup relationships, and the Federated and Developer Editions Search external object is always the parent. Federated Search is available in: Enterprise, Relationship Allowed Child Allowed Parent Parent Field for Matching Professional, Unlimited, Objects Objects Records and Developer Editions Lookup Standard Standard The 18-character Salesforce Custom Custom record ID External

        External lookup Standard External The External ID standard field Custom External

        Indirect lookup External Standard You select a custom field with Custom the External ID and Unique attributes

        Lookup Relationship Fields on External Objects Use a lookup relationship when the external data includes a column that identifies related Salesforce records by their 18-character IDs. External Lookup Relationship Fields on External Objects Use an external lookup relationship when the parent is an external object.

        937 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        Indirect Lookup Relationship Fields on External Objects Use an indirect lookup relationship when the external data doesn’t include Salesforce record IDs.

        SEE ALSO: Create Custom Fields Change the Custom Field Type Relationships on External Objects Include a Files Connect Data Source in Global Search Object Relationships Overview

        Lookup Relationship Fields on External Objects

        Use a lookup relationship when the external data includes a column that identifies related Salesforce EDITIONS records by their 18-character IDs. A lookup relationship field links a child standard, custom, or external object to a parent standard Available in: both Salesforce or custom object. A user who’s editing a child record can click the field’s lookup icon to select a Classic (not available in all specific parent record, and a user who’s viewing a parent record can view a related list of child orgs) and Lightning records. Experience When you create a lookup relationship field on an external object, enter the External Column Name Salesforce Connect is that contains the 18-character Salesforce IDs for identifying the parent records. available in: Developer Edition and for an extra cost Example: in: Enterprise, Performance, • Account record (parent standard object) displays a related list of external SAP sales orders and Unlimited Editions (child external object). Files Connect for • Account record (parent standard object) displays a related list of support cases (child cloud-based external data standard object). sources is available in: Professional, Enterprise, Performance, Unlimited, SEE ALSO: and Developer Editions External Object Relationships Federated Search is Create Custom Fields available in: Enterprise, Professional, Unlimited, Relationships on External Objects and Developer Editions Include a Files Connect Data Source in Global Search

        938 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        External Lookup Relationship Fields on External Objects

        Use an external lookup relationship when the parent is an external object. EDITIONS An external lookup relationship links a child standard, custom, or external object to a parent external object. Available in: both Salesforce Classic (not available in all The values of the standard External ID field on the parent external object are matched against the orgs) and Lightning values of the external lookup relationship field. For a child external object, the values of the external Experience lookup relationship field come from the specified External Column Name. When you sync two external system tables with a lookup relationship field, an external lookup Salesforce Connect is available in: Developer relationship for the mapped external objects is automatically created. This auto mapping happens Edition and for an extra cost only if in: Enterprise, Performance, • The parent and child objects are synced from the same data source. and Unlimited Editions • The parent object is already synced or the parent and child objects are in the same sync Files Connect for operation. cloud-based external data Creating an external lookup relationship on the external object for a lookup relationship on a table sources is available in: is supported by Cross Org, OData 4.0, and Custom Apex adapters. For the OData2.0 adapter, it’s Professional, Enterprise, supported only in the default Olingo library and not supported in OData4J. Performance, Unlimited, and Developer Editions Example: Federated Search is • External product catalog item (parent external object) displays a related list of support available in: Enterprise, cases (child standard object). Professional, Unlimited, and Developer Editions • External customer (parent external object) displays a related list of external orders (child external object).

        Example: For the cross-org adapter for Salesforce Connect, suppose that you store contacts and accounts in the provider org. From the subscriber org, you want to view each account’s related contacts. To do so, create an external lookup field on the subscriber org’s Contact external object. Link that external lookup field to the subscriber org’s Account external object. Then set up the page layouts for the Account external object to include a related list that displays the related Contact external object records.

        Example: In this screenshot, a record detail page for the Business_Partner external object includes two related lists of child objects. This example shows how external lookup relationships and page layouts enable users to view related data from within and from outside their Salesforce org on a single page. • Account standard object (1) • Sales_Order external object (2)

        939 Extend Salesforce with Clicks, Not Code Work with External Data Sources

        SEE ALSO: External Object Relationships Create Custom Fields Change the Custom Field Type Relationships on External Objects Include a Files Connect Data Source in Global Search

        940 Extend Salesforce with Clicks, Not Code Sync Data Between Salesforce and Heroku

        Indirect Lookup Relationship Fields on External Objects

        Use an indirect lookup relationship when the external data doesn’t include Salesforce record IDs. EDITIONS An indirect lookup relationship links a child external object to a parent standard or custom object. When you create an indirect lookup relationship field on an external object, you specify the parent Available in: both Salesforce object field and the child object field to match against each other. Classic (not available in all orgs) and Lightning Specifically, you select a custom unique, external ID field on the parent object to match against the Experience child’s indirect lookup relationship field, whose values are determined by the specified External Column Name. Salesforce Connect is available in: Developer If the external system uses case-sensitive values in the specified External Column Name, make sure Edition and for an extra cost that the parent object field is also case-sensitive. When you define the parent object’s custom field, in: Enterprise, Performance, select External ID, Unique, and Treat "ABC" and "abc" as different values (case sensitive). and Unlimited Editions Note: Only objects that have a custom field with the External ID and Unique Files Connect for attributes are available as parent objects in indirect lookup relationships. If you don't see the cloud-based external data desired object when you create an indirect lookup relationship field, add a custom unique, sources is available in: external ID field to that object. Professional, Enterprise, Performance, Unlimited, Example: and Developer Editions • Account record (parent standard object) displays a related list of SAP sales orders (child Federated Search is external object) with matching customer IDs that aren’t Salesforce IDs. available in: Enterprise, • Contact record (parent standard object) displays a related list of social media posts (child Professional, Unlimited, external object) with matching social media handles. and Developer Editions

        SEE ALSO: External Object Relationships Create Custom Fields Change the Custom Field Type Relationships on External Objects Include a Files Connect Data Source in Global Search

        Sync Data Between Salesforce and Heroku

        Heroku Connect lets you sync data between Salesforce and Heroku Postgres. EDITIONS Using Heroku Connect with Heroku Postgres, you can build Heroku apps that interact with your Salesforce data using your favorite language, like Ruby, Node.js, Python, PHP, Java, Scala or Clojure Available in: Salesforce or web framework like Rails, Django, or Play. For more information, refer to the Heroku Connect Classic website and the Heroku Connect documentation on the Heroku Dev Center website. Available for: Developer, Enterprise, Performance, Organization Sync and Unlimited Editions This feature is now retired. In previous releases, Organization Sync let you set up a secondary, synced Salesforce org. Users could access a subset of Salesforce data in that org when the primary org was unavailable.

        941 Extend Salesforce with Clicks, Not Code Build Your Own Salesforce App

        Managing Organization Sync This feature is now retired. In previous releases, Organization Sync let you set up a secondary, synced Salesforce org. Users could access a subset of Salesforce data in that org when the primary org was unavailable. Actions in the Organization Sync Record Queue This feature is now retired. In previous releases, Organization Sync let you set up a secondary, synced Salesforce org. Users could access a subset of Salesforce data in that org when the primary org was unavailable.

        Managing Organization Sync This feature is now retired. In previous releases, Organization Sync let you set up a secondary, synced Salesforce org. Users could access a subset of Salesforce data in that org when the primary org was unavailable.

        Actions in the Organization Sync Record Queue This feature is now retired. In previous releases, Organization Sync let you set up a secondary, synced Salesforce org. Users could access a subset of Salesforce data in that org when the primary org was unavailable.

        Build Your Own Salesforce App

        An app is a collection of items that work together to serve a particular function. Salesforce apps EDITIONS come in two flavors: Classic and Lightning. Classic apps are created and managed in Salesforce Classic. Lightning apps are created and managed in Lightning Experience. You can customize both Available in: Salesforce types of app to match the way your users work. Classic (not available in all Classic apps are a collection of standard and custom tabs, including: orgs), Lightning Experience, and the Salesforce mobile • Most standard objects, including Home, the main Chatter feed, Groups, and People app • Your org’s custom objects Available in: Contact • Visualforce tabs Manager, Group, • Lightning component tabs Professional, Enterprise, • Canvas apps via Visualforce tabs Performance, Unlimited, and Developer Editions • Web tabs Lightning apps are a collection of items that include everything from the Classic apps list, plus Lightning page tabs, and utilities like Sales Dialer. In Lightning apps, you can customize the app’s USER PERMISSIONS logo and enhance its branding by customizing the color of the navigation bar. To view apps: You can also upgrade Classic apps to Lightning apps in Lightning Experience, but the two versions • View Setup and of the app must then be managed separately in their own environments. Configuration Salesforce provides standard apps such as Sales and Service. To manage apps: • Customize Application You can also build your own on-demand apps by grouping items into new custom apps. A custom app consists of a label, a description, and an ordered list of items, which often includes tabs. You can also add custom logos and branding to your custom apps. In Salesforce Classic, custom apps are listed in the Lightning Platform app menu, which is a dropdown list displayed at the top of every page.

        942 Extend Salesforce with Clicks, Not Code Build Your Own Salesforce App

        In Lightning Experience and the Salesforce mobile app, you can find your available custom apps in the App Launcher ( ). In Lightning Experience, to see all your available Salesforce apps and items, click View All.

        When you choose an app, your screen changes to reflect the contents of that app. For example, if you switch from an app that contains Opportunities to another app that doesn’t, the Opportunities item disappears. In addition, the app might display a different default landing tab when selected. Apps are associated with profiles. Profiles control which tabs you can see or hide, as well as which apps are available to you.

        943 Extend Salesforce with Clicks, Not Code App Tools

        App Tools What is a Subtab App? An app is a group of tabs that work as a unit to provide application functionality. Similarly, a subtab app is a collection of tabs that appears on the Chatter profile page. A subtab app can include both default and custom tabs. Lightning Platform Home Page The Lightning Platform Home page contains options for building and managing applications. Configuring System Overview Messages

        SEE ALSO: Create Custom Apps for Salesforce Classic Set the Default Sort Order for Apps Salesforce App Considerations

        App Tools

        The platform includes innovative point-and-click app-building tools that give you the power to EDITIONS customize Salesforce to meet the needs of your business. You can also build your own apps to share and store information that is important to you. You don’t need any programming knowledge to Available in: Salesforce use these tools. You can find them in Salesforce Classic Setup by selecting Create, and in Lightning Classic (not available in all Experience Setup by entering App in the Quick Find box to get started. orgs) and Lightning The platform also includes app building tools that require some programming knowledge. You can Experience find tools that require advanced programming knowledge in Salesforce Classic Setup by selecting Available in: Contact Develop, and in Lightning Experience Setup by entering Custom Code in the Quick Find Manager, Group, box. Professional, Enterprise, Performance, Unlimited, Create Apps in Salesforce Classic with App Quick Start Developer, and Database.com Editions App quick start is a fast way to create a basic Classic app in just one step. App Quick Start: Next Steps for Building and Managing Apps in Salesforce Classic After you've created a basic working app with app quick start in Salesforce Classic, build out the app with more objects and fields, define its access settings, and add users to share your app with them. Create Custom Apps for Salesforce Classic Create custom apps to give your Salesforce Classic users access to everything they need all in one place. Lightning Apps With apps in Lightning Experience, members of your org can work more efficiently by easily switching between apps. Users can open apps you’ve created from the App Launcher. What’s most important to sales reps? Accounts, events, and organizations. How about sales managers? Reports and dashboards make the top of the list. Lightning apps take things to another level past Classic apps by letting you brand your apps with a custom color, logo, and utility bar. Tips for Creating Apps in Lightning Experience It’s time for the fun part: deciding how to set up Lightning apps for your users. Here are some tips for planning Lightning apps for your org.

        944 Extend Salesforce with Clicks, Not Code App Tools

        Create Lightning Apps As in Salesforce Classic, you can create apps in Lightning Experience, but with even more bells and whistles. You can brand and customize Lightning apps to help your users work more efficiently. For example, you can create a Lightning app for your finance department that includes all important items (including tabs) that users need to complete common tasks. You can customize the navigation bar color, brand it with a logo, and make the app available in the App Launcher for the user profiles associated with the finance department. Customize Lightning Apps with the Lightning App Builder When you edit a Lightning app from the App Manager in Setup, you’re brought into the Lightning App Builder to manage the app’s settings. Update app branding, navigation, and other options, and manage the Lightning pages assigned to that app all in one place. Add a Utility Bar to Lightning Apps The utility bar is a specialized type of Lightning page that gives your users quick access to common productivity tools, like Notes and Recent Items. It appears as a fixed footer that users can access to open utilities in docked panels. Some utilities support pop-out, which lets them open in a new browser window. Lightning App Navigation Bar Items Most of the items that appear in the App Launcher can appear in a Lightning app navigation bar. To add items to an app’s navigation bar, you can use the Lightning app creation wizard, which lets you choose from a list of available items. Upgrade Classic Apps to Lightning Apps You can upgrade a Classic app to a Lightning app in Lightning Experience, enhancing it for your Lightning Experience users with a customized color, logo, utility bar, and more items like Lightning pages supported in the navigation bar. Salesforce App Considerations Keep these considerations in mind when working with apps in either Lightning Experience or Salesforce Classic.

        Create Apps in Salesforce Classic with App Quick Start

        App quick start is a fast way to create a basic Classic app in just one step. EDITIONS 1. From Setup, enter Apps in the Quick Find box, then select Apps, and click Quick Start. Alternatively, from the Lightning Platform Home page, click Add App under Getting Started, Available in: Salesforce or App Quick Start under Quick Links. Classic (not available in all orgs), Lightning Experience, 2. Enter the information needed for your app. and the Salesforce mobile app Field Name Description Available in: Contact App Label The app's name that appears in the Lightning Manager, Group, Platform app menu. The label can have a Professional, Enterprise, maximum of 40 characters, including spaces. Performance, Unlimited, Plural Label The plural name of the object. This name and Developer Editions appears on the tab. USER PERMISSIONS Singular Label A name used to refer to the object in any user interface pages. To create apps: Gender If it's appropriate for your org’s default • Customize Application language, specify the gender of the label. This AND field appears if the org-wide default language Manage Profiles and expects gender. Permission Sets

        945 Extend Salesforce with Clicks, Not Code App Tools

        Field Name Description Starts with a vowel sound If it's appropriate for your org’s default language, enable this option if your label should be preceded by “an” instead of “a”.

        3. Click Create. 4. On the You’re All Set! page, click here to add new fields to your app. 5. To see your app as it will appear to users, click Go To My App. The app quick start: • Generates an app label and API name (a unique name that's used to refer to the object when using the Lightning Platform API). • Generates an object label and API name. • Generates a tab label, and associates the tab with the object. • Enables feed tracking for the object. Feed tracking lets people follow records of that object type and see Chatter feed updates. • Enables access to the app and tab in your user profile. Any users who have the “Modify All Data” permission can also access the object. • Generates a permission set that grants access to the new custom object. • Assigns the permission set to the user who creates the app.

        Note: If you’re in a custom app, only the tabs included in the app appear and include the Create button.

        After you've created an app, you can extend it with more components, specify access settings, and add users to your org.

        SEE ALSO: App Quick Start: Next Steps for Building and Managing Apps in Salesforce Classic Salesforce App Considerations

        946 Extend Salesforce with Clicks, Not Code App Tools

        App Quick Start: Next Steps for Building and Managing Apps in Salesforce Classic

        After you've created a basic working app with app quick start in Salesforce Classic, build out the EDITIONS app with more objects and fields, define its access settings, and add users to share your app with them. Available in: Salesforce 1. Build out your app with the basic components used in apps. Classic (not available in all orgs), Lightning Experience, • Create objects, which are custom database tables that allow you to store information specific and the Salesforce mobile to your app. app • Create tabs that are associated with the objects you've created. Available in: Contact • For each object, create fields to store the information that's important to your organization. Manager, Group, • Create validation rules, which verify that the data users enter meets the standards you Professional, Enterprise, specify before they save a record. Performance, Unlimited, For quick shortcuts to these tools, use the Lightning Platform quick access menu, which is and Developer Editions available from object list view pages and record detail pages. USER PERMISSIONS 2. Create user profiles or permission sets. These are collections of settings and permissions that determine what users can do in an app. To create objects, tabs, 3. Specify the types of access that users will have to the app. fields, and validation rules: • Customize Application a. Make your app visible using profiles or permission sets. To create users: b. Make your object tabs visible. • Manage Internal Users c. Set the object permissions for the objects you created. To create profiles and permission sets: 4. Add users to your organization. When adding users, be sure to assign them the appropriate • Manage Profiles and profiles or permission sets you created so they can access your app. Permission Sets

        SEE ALSO: Create Apps in Salesforce Classic with App Quick Start Salesforce App Considerations

        947 Extend Salesforce with Clicks, Not Code App Tools

        Create Custom Apps for Salesforce Classic

        Create custom apps to give your Salesforce Classic users access to everything they need all in one EDITIONS place. If you're new to custom apps, we recommend using Lightning Platform quick start to create an Available in: Salesforce app. With this tool, you can generate a basic working app in just one step. Classic (not available in all orgs), Lightning Experience, If you’ve already created the objects, tabs, and fields you need for your app, follow these steps. With and the Salesforce mobile this option, you create an app label and logo, add items to the app, and assign the app to profiles. app 1. From Setup, enter Apps in the Quick Find box, then select Apps. Available in: Contact 2. Click New. Manager, Group, 3. If the Salesforce console is available, select whether you want to define a custom app or a Professional, Enterprise, Salesforce console. Performance, Unlimited, and Developer Editions 4. Give the app a name and description. An app name can have a maximum of 40 characters, including spaces. USER PERMISSIONS 5. Optionally, brand your app by giving it a custom logo. 6. Select which items to include in the app. To view apps: • View Setup and 7. Optionally, set the default landing tab for your new app using the Default Landing Tab Configuration drop-down menu below the list of selected tabs. This determines the first tab a user sees when logging into this app. To manage apps: • Customize Application 8. Choose which profiles the app will be visible to. 9. Check the Default box to set the app as that profile’s default app, meaning that new users with the profile see this app the first time they log in. Profiles with limits are excluded from this list. 10. Click Save.

        SEE ALSO: Build Your Own Salesforce App Salesforce App Considerations

        Lightning Apps

        With apps in Lightning Experience, members of your org can work more efficiently by easily switching EDITIONS between apps. Users can open apps you’ve created from the App Launcher. What’s most important to sales reps? Accounts, events, and organizations. How about sales managers? Reports and Available in: Lightning dashboards make the top of the list. Lightning apps take things to another level past Classic apps Experience by letting you brand your apps with a custom color, logo, and utility bar. Available in: Contact Lightning apps contain everything you expect from a custom app, such as custom and standard Manager, Group, objects, and custom tabs. But Lightning apps can also include Lightning page tabs and utilities like Professional, Enterprise, Lightning Voice. The navigation model of Lightning apps is optimized for efficiency, with actions Performance, Unlimited, on certain items like Opportunities in the navigation bar. You can even append navigation items and Developer Editions to a Lightning app that you found on AppExchange and installed from a managed package. Custom apps from Salesforce Classic automatically work in Lightning Experience and can be upgraded to Lightning apps. Classic apps appear in the list of apps in Setup alongside your Lightning apps, and are available from the App Launcher as long as their Show in Lightning Experience attribute is enabled.

        948 Extend Salesforce with Clicks, Not Code App Tools

        However, the reverse isn’t true for Lightning apps. Lightning apps aren’t available in Salesforce Classic. You can assign multiple user profiles to multiple apps. Also, you can assign as many user profiles to one app as you need to. For instance, you have several groups involved with inside sales. Assign all the groups to your inside sales app, and they all have access to it. To switch between apps, users can use the App Launcher. This makes it easy for users to switch contexts and still have access to the items, objects, and pages they need most. You can view all the apps in your org from the App Manager. In Lightning Experience Setup, enter App in the Quick Find box, then select App Manager.

        SEE ALSO: Create Lightning Apps Upgrade Classic Apps to Lightning Apps Salesforce App Considerations

        Tips for Creating Apps in Lightning Experience

        It’s time for the fun part: deciding how to set up Lightning apps for your users. Here are some tips EDITIONS for planning Lightning apps for your org. The best time to create Lightning apps is when you’re rolling out Lightning Experience. So make Available in: Lightning creating Lightning apps a part of your rollout strategy. Check out the Trailhead module “Lightning Experience Experience Rollout” for many great ideas to help you make a smooth transition. Available in: Enterprise, Talk to your users. Ask them what their priorities are. Customizing tabs in apps gives you a unique Professional, Performance, opportunity to engage with your users. Each group of users has its own priorities. Find out which Unlimited, and Developer objects and items represent their highest priorities. Editions • Ask users to post feedback to a Chatter group. • Publish polls. • Schedule lunch sessions. Everyone likes a free lunch, and nearly everybody is happy to express their opinion. Create a master list of objects that everyone in your org wants. Then trim down the list for each group—sales reps, sales managers, execs, and so on. The menus for every user group share some common objects, like Home, Tasks, and Feed. Keep the high-priority items for each group at the top. Put low-priority items at the bottom, or remove them altogether. Users can always go to the App Launcher to get the items they use less often.

        949 Extend Salesforce with Clicks, Not Code App Tools

        Create Lightning Apps

        As in Salesforce Classic, you can create apps in Lightning Experience, but with even more bells and EDITIONS whistles. You can brand and customize Lightning apps to help your users work more efficiently. For example, you can create a Lightning app for your finance department that includes all important Available in: Lightning items (including tabs) that users need to complete common tasks. You can customize the navigation Experience bar color, brand it with a logo, and make the app available in the App Launcher for the user profiles associated with the finance department. Available in: Contact Manager, Group, App 1. From the Home tab in Setup, enter in the Quick Find box, then select App Manager. Professional, Enterprise, 2. Click New Lightning App, and walk through the New Lightning App wizard. Performance, Unlimited, Here are some things you can do in the wizard: and Developer Editions • Give your app a name, set its primary color, and give it a logo. USER PERMISSIONS The app description displays alongside the icon in the App Launcher. Make sure that the description is meaningful to your users. To view apps: • View Setup and • Choose whether to override a custom theme’s brand image and navigation bar color with Configuration the brand image and color from the app. To manage apps: • Choose which type of navigation to use—standard or console. • Customize Application • Choose which form factors your app is available for. • Add a utility bar for common processes and tools, like Recent Items, Notes, Dialer, and Open CTI. • Customize which items appear in the app’s navigation bar.

        Note: If you add more than 50 default navigation items to an app, your users can’t personalize the app’s navigation bar.

        When organizing the navigation bar, the item at the top of the list becomes your app’s landing page on both desktop and mobile. The order of items in the navigation bar also determines the default objects shown in the Top Results page on the search results page. After the user interacts with the app for 15 days, Top Results reflects the user's most frequently used objects. If the user doesn’t have access or permissions to the app, Top Results includes the Account, Contact, Opportunity, Case, Lead, People (User), and Group objects until the user’s most frequently used objects are determined.

        • Assign the app to user profiles.

        SEE ALSO: Lightning Apps Create and Edit a Custom Lightning Console App Add a Utility Bar to Lightning Apps Salesforce App Considerations

        950 Extend Salesforce with Clicks, Not Code App Tools

        Customize Lightning Apps with the Lightning App Builder

        When you edit a Lightning app from the App Manager in Setup, you’re brought into the Lightning EDITIONS App Builder to manage the app’s settings. Update app branding, navigation, and other options, and manage the Lightning pages assigned to that app all in one place. Lightning App Builder is 1. From the Home tab in Setup, enter App in the Quick Find box, then select App Manager available in: both Salesforce Classic and Lightning 2. Click on a Lightning app’s row, and select Edit. Experience Here are some things you can do from the App Settings tab. Lightning apps are available • Change your app’s name, primary color, and logo. in: Lightning Experience • Override the org theme with your app’s brand image and nav bar color. Available in: Group, • Add a utility bar for common processes and tools, like Recent Items, Notes, Dialer, and Open Professional, Enterprise, CTI. Performance, Unlimited, • Manage which default items appear in the app’s navigation bar. and Developer Editions • Manage user profile assignments. On the Navigation Items tab, you can control which objects and other items—like Visualforce USER PERMISSIONS pages or Lightning components—are included in your app. To create a custom object by To manage apps, and to importing data from a spreadsheet, click Create at the top of the Available Items section. create and save Lightning 3. Click the Pages tab in the Lightning App Builder header to see all the active Lightning pages pages in the Lightning App Builder: assigned to the app, create pages, and open existing pages, even ones not associated with the • Customize Application app. To view apps, and to view Tip: If you create pages for your app, when finished, don’t forget to click Activation to Lightning pages in the make them active for your users and assign them to the app. Lightning App Builder: • View Setup and Configuration SEE ALSO: Lightning Apps Create Lightning Apps Lightning App Builder

        951 Extend Salesforce with Clicks, Not Code App Tools

        Add a Utility Bar to Lightning Apps

        The utility bar is a specialized type of Lightning page that gives your users quick access to common EDITIONS productivity tools, like Notes and Recent Items. It appears as a fixed footer that users can access to open utilities in docked panels. Some utilities support pop-out, which lets them open in a new Available in: Lightning browser window. Experience Utilities harness the power of Lightning components. When you set up a utility bar, you select which Available in: Contact Lightning components to use as utilities. However, not all Lightning components can be utilities. Manager, Group, To be added to a utility bar, a Lightning component must implement the Professional, Enterprise, flexipage:availableForAllPageTypes interface. This interface also makes the Performance, Unlimited, component usable on all types of Lightning pages. To add a Lightning web component to the and Developer Editions utility bar, see Lightning Web Components Developer Guide: Configure a Component for the Utility Bar.

        To create a background utility item, implement the lightning:backgroundUtilityItem USER PERMISSIONS interface. Background utility items are added the same way as normal utility items, but don’t appear in the utility bar. The icon appears next to background utility items on the utility item list. If you To view apps: have only background utility items in your utility bar, the utility bar doesn’t appear in your app. You • View Setup and need at least one non-background utility item in your utility bar for it to appear. Configuration You can add or edit a utility bar at any time. To manage apps: • Customize Application 1. From the Home tab in Setup, enter App in the Quick Find box, then select App Manager. 2. To edit or add a utility bar to an existing app, click Edit in the dropdown menu next to your app. To create a Lightning app with a utility bar, click New Lightning App. 3. Click the Utility Items tab and add the utilities you want. Specify component and utility properties, like the height and width of the utility panel, and what label and icon to display in the utility bar. Some utilities have properties that can’t be changed.

        Tip: A Lightning page region can contain up to 100 components. We recommend adding no more than 10 utilities, and that you keep the utility labels short and sweet. You want your users to quickly find the tools and processes they need most.

        Example: Here’s a utility bar with the Recent Items and Notes utilities.

        When creating a utility bar for your app, keep these things in mind:

        952 Extend Salesforce with Clicks, Not Code App Tools

        • Utility bars created using the Lightning App Wizard or in the Lightning App Builder can be assigned to only one Lightning app. However, utility bars created using the API can be assigned to multiple Lightning apps. • The utility bar doesn’t support Visualforce pages or components. • The utility bar doesn’t fully support the Chatter Publisher and Feed components. • The History utility works in Lightning console apps only. • The Omni-Channel utility works in the Lightning Service Console app only. • The default utility bar alignment matches the user’s language setting alignment. For example, English is read left to right. If you select Default and a user’s language is set to English, the utility bar appears at the bottom of the left side of the screen. If you select Mirrored, the utility bar appears at the bottom of the right side of the screen.

        Using Pop-Out Utilities Utilities that support pop-out can be “popped out” of the utility bar and into their own separate child windows. To pop a utility out, click the icon. From there, you can pop the utility back into the utility bar with the icon, or close the utility. Pop-out utilities are the Lightning equivalent to multi-monitor components in Classic.

        SEE ALSO: Customize Your Lightning Console App with Utilities Create Lightning Apps Salesforce Console Developer Guide: Using Background Utility Items Salesforce Console Developer Guide: Using Pop-Out Utilities

        Using Pop-Out Utilities Utilities that support pop-out can be “popped out” of the utility bar and into their own separate child windows. To pop a utility out, click the icon. From there, you can pop the utility back into the utility bar with the icon, or close the utility. Pop-out utilities are the Lightning equivalent to multi-monitor components in Classic.

        Note: Popping-out docked utility bar items isn't supported in Lightning Experience on iPad Safari.

        Standard Utilities Pop-out is supported for these standard utilities. Standard utilities are utilities that are included with Salesforce. • Open CTI Softphone • History • Rich Text • Report Chart • Visualforce • Flow • List View • Recent Items • Chatter Feed • Chatter Publisher • Notes

        953 Extend Salesforce with Clicks, Not Code App Tools

        Custom Utilities Pop-out is available for custom utilities. To enable pop-out for custom utilities, activate the Utility Bar: Enable Pop-Out for Custom Utilities critical update. The critical update enables pop-out for all utilities in the “Custom” and “Custom – Managed” categories. Test your custom utilities in a sandbox environment before you enable the update.

        Disabling Pop-Out If you don’t want your custom utility to be popped out, you can disable pop-out in two ways. Disabling Pop-Out within the Component Use the lightning:utilityItem interface in your component and set the supportsPopOut attribute to false to disable pop-out.

        Disabling pop-out within the component itself is a useful and simple way to ensure that the component can never be popped out. Disabling Pop-Out with the Lightning Console JavaScript API Use the disableUtilityPopOut() method and set the disabled argument to true to disable utility pop-out. If you’re migrating from a Classic console app and using a Visualforce page for your utility, we automatically respect if setCustomConsoleComponentPopoutable is set to false. Disabling pop-out with the Lightning Console JavaScript API allows you to enable and disable pop-out in real time.

        Lightning App Navigation Bar Items

        Most of the items that appear in the App Launcher can appear in a Lightning app navigation bar. EDITIONS To add items to an app’s navigation bar, you can use the Lightning app creation wizard, which lets you choose from a list of available items. Available in: Lightning The list of available items contains only those items in your org that are eligible for Lightning app Experience navigation bars, which includes: Available in: Enterprise, • Most standard objects, including Home, the main Chatter feed, Groups, and People Professional, Performance, • Your org’s custom objects and apps Unlimited, and Developer Editions • Visualforce tabs • Lightning component tabs USER PERMISSIONS • Lightning page tabs • Canvas apps via Visualforce tabs To view navigation menus: • Web tabs • View Setup and Configuration If the Lightning app was installed from a managed package, you can append navigation items To create navigation menus: below the original set of navigation items included in the Lightning app, which are locked. • Customize Application Note: You can’t add Connected apps like Gmail™ and Microsoft® Office 365™ to the navigation bar. Users can continue to access them from the App Launcher.

        954 Extend Salesforce with Clicks, Not Code App Tools

        Upgrade Classic Apps to Lightning Apps

        You can upgrade a Classic app to a Lightning app in Lightning Experience, enhancing it for your EDITIONS Lightning Experience users with a customized color, logo, utility bar, and more items like Lightning pages supported in the navigation bar. Available in: Lightning Note: You can’t upgrade a Salesforce Classic console app to Lightning Experience. You can Experience choose to display or hide the app in the Lightning Experience App Launcher, but you can’t Available in: Contact edit the app from the App Manager page in Lightning Experience Setup. To get started in Manager, Group, Lightning Experience, customize these Salesforce-provided Lightning console apps: Service Professional, Enterprise, Console and Sales Console. You can also recreate your Salesforce Classic console app in Performance, Unlimited, Lightning Experience, but using the Salesforce out-of-the-box app is faster and easier. and Developer Editions 1. From the Home tab in Setup, enter App in the Quick Find box, then select App Manager. 2. Find the Classic app that you want to upgrade in the apps list. USER PERMISSIONS

        Note: A checkmark in the Visible in Lightning Experience column means that the app To view apps: is accessible in Lightning Experience via the App Launcher and is fully functional. Even • View Setup and though a Classic app works in Lightning Experience, it doesn’t take advantage of all the Configuration benefits of being a Lightning app. That’s why we recommend that you upgrade it. To manage apps: • Customize Application 3. Click , and select Upgrade. 4. Review the app properties and update them if necessary. If you have custom Lightning Home pages assigned to profiles in your org, and the app you’re upgrading is visible in Lightning Experience, you see a checkbox that lets you apply those Home page profile assignments to the upgraded app. Selecting the checkbox ensures that users see the custom Home page assigned to their profile when they're working in the upgraded app, and that you can modify those Home page assignments if you need to.

        5. Click Upgrade. Your Classic app is copied and upgraded for Lightning Experience. You now have two versions of the app: a Classic version, and a Lightning version. After you upgrade it, the Classic app is no longer accessible in Lightning Experience via the App Launcher. You still see the Classic app in the apps list, but with the Visible in Lightning column deselected. The two versions of your app now must be managed separately. Future changes you make to the Classic app won’t be reflected in the Lightning version of the app, and vice versa.

        Note: You can toggle the availability of your Classic apps in Lightning Experience by selecting or deselecting Show in Lightning Experience on the Classic app’s detail page.

        SEE ALSO: Lightning Apps Salesforce App Considerations

        955 Extend Salesforce with Clicks, Not Code App Tools

        Salesforce App Considerations

        Keep these considerations in mind when working with apps in either Lightning Experience or EDITIONS Salesforce Classic. Available in: Salesforce General Classic (not available in all orgs), Lightning Experience, • You can delete custom apps, but not standard apps. Deleting a custom app removes it from and the Salesforce mobile the apps menu and the App Launcher, but doesn’t delete any associated objects. If you created app objects for an app, consider deleting them as well. Available in: Contact • Salesforce Classic console apps are custom apps. Manager, Group, • You can’t change an app’s type—such as standard to connected or vice versa—after you create Professional, Enterprise, it. Performance, Unlimited, • For Salesforce Platform and Salesforce Platform One license users, the Platform standard app and Developer Editions is the only app listed in the Lightning Platform app menu and the Lightning Experience App Launcher. For details about specifying a unique label for the Platform standard app in Salesforce Classic, see Create Custom Apps for Salesforce Classic on page 948. • To assign apps to user profiles in Professional Edition, you must have user profiles enabled for your org.

        Classic Apps Consider these requirements when choosing a custom app logo for a Classic app from the document library: • The image must be in GIF or JPEG format and less than 20 KB. • If the image is larger than 300 pixels wide by 55 pixels high, then it is scaled to fit. • For the best on-screen display, we recommend that you use an image with a transparent background. • The Externally Available checkbox must be selected on the document’s properties so that users can view the image.

        Lightning Apps • The number of Lightning Apps you can create in an org varies by edition.

        Edition Lightning Apps Limit Professional Edition 10

        Enterprise Edition 25

        Unlimited Edition Unlimited

        • A Lightning app’s description displays in the App Launcher, so we recommend that you keep the description concise. • Users can’t remove the items you include in the navigation bar, and they can’t personalize the navigation bar when it contains more than 50 items. For example, if you include 32 items in an app’s navigation bar, users can add 18 more personal items. • Consider these requirements when choosing a custom app image for apps in Lightning Experience: – App images represent your app in both Lightning Experience and the Salesforce app. – Choose a JPG, PNG, BMP, or GIF image that's smaller than 5 MB. – For best results, upload an image that's 128 by 128 pixels. Images larger than the maximum display of 128 by 128 pixels are automatically resized.

        956 Extend Salesforce with Clicks, Not Code What is a Subtab App?

        • Even if you haven’t selected the option to override themes in the App Manager, your app’s brand image and color always override the Lightning Lite and Lightning Blue themes. • If you restrict an app to one type of device, only users viewing the app on that device can access it. For example, if you assign your app to the Phone form factor, your desktop users don’t see the app in the App Launcher. Only your Salesforce mobile app users can see it. • Not all objects that appear in the App Launcher can appear in an app, but it’s easy to figure out which ones can. When you start the wizard from the Lightning Experience App Manager, you see all available items for a navigation bar. • Navigation items in a Lightning app installed from a managed package are locked. You can’t remove or reorder them. However, you can append other navigation items so that they’re accessible in the Lightning app. • You can create records and access recent records and lists for certain items directly from the navigation bar. Items with next to their name support this feature, with a few exceptions. Tasks and Notes allow you to create a record but you can't access recent records or lists. Reports and Dashboards allow you to see recent records but you can't see recent lists or create a record. • Some tabs, such as web tabs and Visualforce tabs, aren't highlighted when you select them on the navigation bar. For example, when you select Contacts, the tab is highlighted (1). However, when you select a web tab, the page displays but the tab isn’t highlighted (2).

        What is a Subtab App?

        An app is a group of tabs that work as a unit to provide application functionality. Similarly, a subtab EDITIONS app is a collection of tabs that appears on the Chatter profile page. A subtab app can include both default and custom tabs. Available in: both Salesforce Users can see different sets of tabs on the profile page depending on their context. Subtab apps Classic (not available in all are the various sets of tabs available on specific pages, such as users’ profile pages. orgs) and Lightning Experience These default subtab apps determine which tabs display, depending on the user’s context. Available in: Contact Subtab App Displayed to the user when viewing... Manager, Group, Professional, Enterprise, Profile (Others) Another user inside their internal organization Performance, Unlimited, Profile (Self) Their own profile inside their internal and Developer Editions organization

        Profile in Communities (Others) Another user while inside a community. It’s shown only if Communities is enabled.

        Profile in Communities (Self) Their own profile inside a community. It’s shown only if Communities is enabled.

        957 Extend Salesforce with Clicks, Not Code What is a Subtab App?

        Note: End users can’t customize the display of subtab apps. Administrators can hide tabs within subtab apps using the Tab Hidden option in Tab Settings. Users can see tabs set to Default Off and Default On.

        Managing Subtab Apps You can view and customize the subtab apps on users’ profile pages. Controlling Subtab App Visibility Once you have configured subtab apps, you can specify which users can see specific tabs on the profile page.

        Managing Subtab Apps

        You can view and customize the subtab apps on users’ profile pages. EDITIONS From Setup, enter Apps in the Quick Find box, then select Apps to display your organization’s subtab apps. Available in: Salesforce Classic (not available in all You can do the following: orgs), Lightning Experience, • To view details for a subtab app, click the name in the Subtab Apps section. This displays its and the Salesforce mobile properties, such as which tabs are part of the app, including any tabs that are not yet deployed. app Click custom tabs in the Included Tabs list to view details. Available in: Contact • To change the properties of a subtab app, click Edit to choose the tabs to include in the subtab Manager, Group, app, change their display order, and set the Default Landing Tab. Professional, Enterprise, Performance, Unlimited, Note: Administrators can change permission sets or profile settings to limit users’ access and Developer Editions to each tab. This allows administrators to make specific tabs available to some users, but not to others. USER PERMISSIONS

        SEE ALSO: To view apps: What is a Subtab App? • View Setup and Configuration Controlling Subtab App Visibility To manage apps: • Customize Application

        958 Extend Salesforce with Clicks, Not Code Lightning Platform Home Page

        Controlling Subtab App Visibility

        Once you have configured subtab apps, you can specify which users can see specific tabs on the EDITIONS profile page. To control the visibility of tabs within a subtab app: Available in: Salesforce Classic (not available in all 1. From Setup, enter Profiles in the Quick Find box, then select Profiles. orgs), Lightning Experience, 2. Do one of the following: and the Salesforce mobile • Original profile user interface—Click Edit next to the profile you want to modify and scroll app to the Tab Settings section. Available in: Contact • Enhanced profile user interface—Click the profile you want to modify and click Object Manager, Group, Settings. Click the object you want to modify and click Edit. Professional, Enterprise, Performance, Unlimited, Note: Some profiles, including Chatter External and Chatter Free users, don’t have the and Developer Editions permissions needed to view subtab apps.

        3. Change the tab settings. USER PERMISSIONS End users can’t customize the display of subtab apps. Administrators can hide tabs within subtab To view apps: apps using the Tab Hidden option in Tab Settings. Users can see tabs set to Default • View Setup and Off and Default On. Configuration 4. (Original profile user interface only) To reset users’ tab customizations to the tab visibility settings To manage apps: that you specify, select Overwrite users’ personal tab customizations. • Customize Application 5. Click Save.

        SEE ALSO: What is a Subtab App? Managing Subtab Apps

        Lightning Platform Home Page

        The Lightning Platform Home page contains options for building and managing applications. EDITIONS You access the Lightning Platform Home page from Setup. In Lightning Experience: Available in: both Salesforce Classic (not available in all • The left sidebar, which you can browse or search, provides access to all setup actions, tasks, orgs) and Lightning and tools. Experience • The Quick Find lets you quickly navigate to any node using a keyword. Quick Find is the best Available in: all editions way to find what you’re looking for if you know its name. except Database.com • The Create menu gives you quick access to common Setup creation functions—including users, custom objects, custom tabs, apps, email templates, and processes—without having to drill down through the Setup tree to get the page. You can get to the Create menu from any page USER PERMISSIONS in Setup. To access the Lightning • A carousel of quick-access tiles gives you instant access to important setup tools and information, Platform Home page: as well as the release notes. There’s a link to download SalesforceA—which lets you do Salesforce • Customize Application administration from a mobile app—and a link to the System Status screen so you can view your org’s performance and usage data.

        959 Extend Salesforce with Clicks, Not Code Lightning Platform Home Page

        • The Most Recently Used list shows your most recently used records or customization features in Setup. You can quickly link back to what you were working on by clicking its name. • The Object Manager provides a one-stop shop for managing all objects in your organization, both standard and custom. In Salesforce Classic: • The left sidebar, which you can browse or search, provides access to all setup actions, tasks, and tools. • The Getting Started box contains a tool for generating a basic app in a single step and links to information about extending and managing apps. This box doesn’t appear if you’ve previously dismissed it. • The Recent Items list shows recent metadata items that you’ve viewed, edited, or created and their related objects. • The System Overview messages box displays messages to remind you when your organization reaches its usage limits. The System Overview messages box is not enabled by default. • The Quick Links box provides links for managing tools, users, apps, security, and data. • The Community box showcases available resources. If you’ve previously dismissed this box, it reappears with each new release. • The right pane includes external links that are useful for developers and administrators.

        Recent Items List (Beta) The Recent Items list shows recent metadata items that you’ve viewed, edited, or created and their related objects.

        Recent Items List (Beta)

        The Recent Items list shows recent metadata items that you’ve viewed, edited, or created and their EDITIONS related objects.

        Note: The Recent Items list is in beta. It is production quality but has known limitations. Available in: Salesforce Classic (not available in all The Recent Items list includes: orgs) and Lightning Experience • Apex classes • Apex triggers Available in: all editions except Database.com • Approval processes • Apps • Custom report types • Email templates • Fields • Objects • Page layouts • Permission sets • Profiles • Record types • Static resources • Tabs • Users • Validation rules • Visualforce pages • Visualforce components

        960 Extend Salesforce with Clicks, Not Code Configuring System Overview Messages

        • Workflow email alerts • Workflow field updates • Workflow outbound messages • Workflow rules • Workflow tasks

        Note: The Recent Items list in Setup is independent of the Recent Items section in the sidebar column of many Salesforce pages. The list in Setup shows items that administrators use, while the Recent Items section in the sidebar displays records with which end users have worked.

        Configuring System Overview Messages

        Note: The system overview page shows only the items enabled for your organization. For EDITIONS example, your system overview page shows workflow rules only if workflow is enabled for your organization. Available in: both Salesforce Add system overview usage messages to the Salesforce Home page to remind you when your Classic (not available in all organization approaches its limits. You can expand, collapse, and dismiss the system overview orgs) and Lightning Experience messages that appear on the Home page. By default, the system overview home page messages are enabled. Available in: All Editions To configure the system overview messages on the Home page: except Personal and Database.com 1. From Setup, enter System Overview in the Quick Find box, then select System Overview. USER PERMISSIONS 2. Click Configure Messages. 3. Select or deselect the types of system overview messages to show or hide on the Home page. To configure system messages: 4. Click OK. • Customize Application Important: System overview messages only appear on the Salesforce Home page when your organization approaches its limits. When you enable or dismiss system overview messages, it only impacts your individual view of the messages.

        Lightning App Builder

        The Lightning App Builder is a point-and-click tool that makes it easy to create custom pages for EDITIONS the Salesforce mobile app and Lightning Experience, giving your users what they need all in one place. The Lightning App Builder is also a one-stop shop for configuring Lightning apps. Available in: both Salesforce You can access the Lightning App Builder from Setup by entering Lightning App Builder Classic and Lightning in the Quick Find box and then selecting Lightning App Builder. Experience

        With the Lightning App Builder, you can build: Available in: Group • Single-page apps that drill down into standard pages Essentials, Professional, • Dashboard-style apps, such as apps to track top sales prospects or key leads for the quarter Enterprise, Performance, Unlimited, and Developer • “Point” apps to solve a particular task, such as an expense app for users to enter expenses and Editions monitor expenses they’ve submitted • Custom record pages for your objects, tailored to the needs of your users

        961 Extend Salesforce with Clicks, Not Code Create a Custom App Page: The Big Picture

        • Custom Home pages containing the components and features that your users use most

        But that’s not all. When you edit a Lightning app from the App Manager in Setup, you’re brought into the Lightning App Builder to manage the app’s settings. You can update the app’s branding, navigation, app options, and manage the Lightning pages assigned to that app all inside the Lightning App Builder. The Lightning App Builder supports the same browsers as Lightning Experience and isn’t supported on mobile browsers. The minimum recommended resolution for the Lightning App Builder is 1280x1024.

        SEE ALSO: Create an App Home Page with the Lightning App Builder Create and Configure Lightning Experience Record Pages Supported Browsers and Devices for Lightning Experience Lightning Aura Components Developer Guide Lightning Web Components Developer Guide

        Create a Custom App Page: The Big Picture With just a few steps, you can create an app page that lets your Lightning Experience and Salesforce mobile app users access the most important objects and items in your custom app. Custom app pages are built using Lightning pages. 1. Before creating your page, determine which components you want to include and the global actions your users need. 2. Create the Lightning page. 3. Add actions to your page. 4. Activate your Lightning page in the Lightning App Builder.

        962 Extend Salesforce with Clicks, Not Code Lightning Pages

        Activation lets you create a custom tab for your app page, set its visibility, and add it to the Salesforce “Mobile Only” app navigation and Lightning app navigation bar all in one place.

        Lightning Pages A Lightning page is a custom layout that lets you design pages for use in the Salesforce mobile app or Lightning Experience. Lightning pages occupy a middle ground between page layouts and Visualforce pages. Like a page layout, Lightning pages allow you to add custom items to a page. However, these items, instead of being fields or Visualforce components, are Lightning components, which allow much more flexibility. The structure of a Lightning page adapts for the device it’s viewed on. The template you choose when creating the page controls how it displays on a given device. The Lightning page’s template divides the page into regions.

        Lightning pages are built using Lightning components—compact, configurable, and reusable elements that you can drop into regions of the page in the Lightning App Builder. You can use a Lightning page to create an app page that you can add to the navigation bar of a Lightning app, which makes it appear when that app is viewed in both Lightning Experience and the Salesforce mobile apps. An app page gives your users quick access to the objects and items that are most important in that app. You can also use a Lightning page to create a customized Home page for Lightning Experience, or a custom record page for Lightning Experience and the Salesforce mobile app. And if you have integrated Salesforce with Microsoft® Outlook® or Gmail™, you can create a custom Email Application pane. If you have a console app, you can create a Lightning page with pinned regions to let your users view and work with records while navigating between subtabs.

        Lightning pages support these components: Standard Components Standard components are Lightning components built by Salesforce.

        963 Extend Salesforce with Clicks, Not Code Lightning Pages

        Custom Components Custom components are Lightning components that you or someone else have created. With some configuration, custom Lightning components can work in the Lightning App Builder. Third-Party Components on AppExchange The AppExchange provides a marketplace for Lightning components. You can find packages containing components already configured and ready to use in the Lightning App Builder.

        Example: This Lightning app page in the Salesforce mobile app has a list view component, a recent items component, and one global action.

        Lightning Page Types You can create different types of Lightning pages with the Lightning App Builder. After you set a Lightning page’s type, you can’t change it.

        App Page App pages are supported both in the Salesforce mobile app and Lightning Experience. Use an app page to create a home page for a third-party app that you can add directly into the Salesforce mobile app and Lightning Experience navigation menus. Your users then have an app home page where they can quickly access the most important objects and items. Add global actions to an app page to enhance its functionality. Global actions allow a user to do things from your app page, such as add call details, create and update records, send email, and create a task. When a user visits a Lightning page in the Salesforce mobile app, the page’s actions appear in its action bar. In Lightning Experience, actions appear in the highlights panel at the top of the page.

        Important: Create actions in the full Salesforce site before adding them to your app page.

        App pages support only global actions. Standard Chatter actions, such as Post, File, Link, and Poll, aren’t supported. When a user visits an app page in the Salesforce mobile app or Lightning Experience, only the actions that you specify for the page are displayed. If you haven’t specified any actions, no actions appear.

        964 Extend Salesforce with Clicks, Not Code Lightning Pages

        Home Page Create Home pages with features relevant to specific types of users, and assign the customized pages to different apps or app-and-user-profile combinations. Custom Home pages are supported in Lightning Experience only.

        Record Page With a record page, you can create a customized version of an object’s record page, tailoring it to your users’ needs. Custom record pages are supported in Lightning Experience and the Salesforce mobile app.

        Note: Actions you see on Lightning Experience record pages and the Home page are taken from object and global page layouts. You can’t add, edit, or remove actions on these pages using the Lightning App Builder.

        Email Application Pane Create custom email application panes to let users work with Salesforce content that’s most relevant to them in Microsoft® Outlook® and Gmail™. Custom email application panes are supported in Salesforce Classic and Lightning Experience.

        SEE ALSO: Create an App Home Page with the Lightning App Builder Create and Configure Lightning Experience Record Pages

        Lightning Page Templates

        Lightning page templates are Lightning components that have been configured to serve as templates EDITIONS for custom Lightning pages. Page templates can support different form factors, such as desktop or phone. When you create a Lightning page in the Lightning App Builder, you can select a page Lightning App Builder template that matches the device you’re designing the page for. available in: both Salesforce Home page templates are desktop-only. Standard app page templates support both desktop and Classic and Lightning phone. Standard record page templates support both desktop and phone, except the console Experience pinned region templates, which are desktop only. If a form factor isn’t on the options list when you Lightning Home and utility try to assign a Lightning page, then the page template doesn’t support it. bar pages available in: When working on a page in the Lightning App Builder, you can use the form factor switcher to Lightning Experience preview what the page looks like on different devices that the template supports. Lightning app and record Custom Lightning page template components are supported for record pages, app pages, and pages available in: both the Home pages. You can create custom page templates only in Aura. For more information, see “Create Salesforce mobile app and a Custom Lightning Page Template Component” in the Lightning Aura Components Developer Lightning Experience Guide. Email application pane When switching your Lightning record pages to a different template, keep these considerations in pages available in: both mind. Salesforce Classic and Lightning Experience • You can’t switch to a template that supports a smaller scope of devices than the original template. For example, if you have a page using a template that supports both desktop and Available in: Group phone, you can’t switch the page to use a template that supports only phone or only desktop. Essentials, Professional, When you choose to switch, the list of available templates reflects this rule and shows only the Enterprise, Performance, templates that you can switch to. Unlimited, and Developer • If you switch to a page template that doesn’t support the form factor of a component on your Editions page, that component is dropped from the page at run time.

        965 Extend Salesforce with Clicks, Not Code Lightning Pages

        • You can’t switch from a non-pinned region template to a pinned region template.

        Standard Lightning Page Components

        Standard components are Lightning components built by Salesforce. Several standard components EDITIONS are available when creating Lightning pages.

        Note: The components listed here are supported across all page types, except when otherwise Lightning App Builder indicated. This list doesn’t show all available standard components. Other standard component available in: both Salesforce types are available and vary based on the type of page you create and with which object the Classic and Lightning Experience page is associated. Some standard components have required properties that you must configure for the component Lightning Home and utility to work on the page. When you add a component to a Lightning page in the Lightning App Builder, bar pages available in: its required properties are marked with an asterisk. Lightning Experience A Lightning page region can contain up to 100 components. Lightning app and record pages available in: both the If you have a page to be used in the Salesforce mobile app, use only Lightning components that Salesforce mobile app and the mobile app supports. See Data Available in the Salesforce Mobile App. Lightning Experience

        Email application pane Accordion pages available in: both Use the Accordion component to organize your components into collapsible sections. You can put Salesforce Classic and multiple components in each section and customize the section name. You can have up to 25 Lightning Experience sections, but we recommend no more than 10. Available in: Group The Accordion component is supported for record and Home pages. Essentials, Professional, Enterprise, Performance, Note: Programmatic versions of the accordion components don’t provide the same Unlimited, and Developer functionality as their App Builder counterparts. For example, lightning-accordion Editions and lightning:accordion components don’t currently support lazy loading.

        Actions & Recommendations Component Give your users a to-do list in the Actions & Recommendations component. Show a variety of steps, including screen flows, field service mobile flows, quick actions, and recommendations from your Next Best Action strategies. When a user opens a flow, in a console app it starts in a subtab. In a navigation app, it starts in a window. You can add this component to supported object pages in Lightning Experience. For more information, see Lightning Flow for Service and the Actions & Recommendations Component.

        Activities Display the timeline of the activities of the record. This component appears only if Default Activities View is set to Activity Timeline. The component can contain Create a Record quick actions that point to the Event and Task objects. It contains Log A Call and Send Email actions for each of your org’s accounts, contacts, contracts, leads, opportunities, and activity-enabled custom object records.

        Note: On the Case object, the component only shows the timeline of the activities. Actions appear in a Chatter Publisher component.

        For more information, see Activities View and Actions in Lightning Experience.

        966 Extend Salesforce with Clicks, Not Code Lightning Pages

        After Conversation Work (Beta) Display a countdown after a customer conversation ends. During the After Conversation Work (ACW) countdown period, support agents can complete closing tasks like sending follow-up emails, updating a case, or finalizing their notes. Agents can exit the countdown early by closing the call record or let it run its course. When the time runs out, the agent is considered available to help the next customer whether or not they’ve closed the call record. After Conversation Work is available only for Voice Call channels. To learn more, see Configure After Conversation Work (Beta).

        App Launcher Component The App Launcher displays a user’s available Salesforce apps and the connected apps the administrator has configured. Users navigate between apps using the App Launcher. This component is supported in API version 35.0 and later. Contact Salesforce to enable the App Launcher component for the Lightning App Builder in your organization.

        C360 Global Profiles The C360 Global Profile component shows the matched Customer 360 profile data related to the person account record in the page layout. This component retrieves data from Customer 360 Data Manager for your single customer view. Some of the data in this component isn't stored locally in your Service Cloud org if the data originated in another data source connected to Customer 360 Data Manager. Your admin user can determine which data is copied into your Service Cloud and which data is queried on demand via this component and Customer 360 Data Federation Services. This component displays data in Customer 360 Data Manager that’s matched back to the person account record. The component shows these fields. • Name — First and Last or Family name of a person. • Email — Email addresses of a person • Phone — Phone numbers of a person, grouped by the Primary Phone Type: Home, Business, Fax, Mobile, Other. • Address — Mailing address for a person, used as either a Billing Address, a Shipping Address, or both. • In the Lightning App Builder, users can set component visibility rules, if needed, by defining filter criteria for either a record field or another field.

        Note: Removing Data Mappings from the Cloud Information Model in Customer 360 Data Manager can remove data visible in this component.

        C360 Order History The C360 Order History component shows the ecommerce order history for the person account that was matched to B2C Commerce orders through Customer 360 Data Manager. This component displays ecommerce order data from B2C Commerce retrieved by the Customer 360 Data Federation Service. Otherwise, an admin must copy and store order data locally in your Service Cloud org. These fields are displayed in this component. • Order No. — The customer’s order number, generated by B2C Commerce. The values in this field are hyperlinks, which open a separate UI for the Order Details. • Checkout Date — The date on which the customer placed the order on the website. • Order Status — The status of the customer’s order, such as Not Shipped, Shipped, or Returned. • Total Amount — The total amount, in the site’s currency, paid by the customer for the order. • WebsiteID — The B2C Commerce site ID as defined in Business Manager.

        967 Extend Salesforce with Clicks, Not Code Lightning Pages

        Note: Removing Data Mappings from Commerce Cloud in Customer 360 Data Manager can remove data visible in this component.

        Call Recording Player Use this component to listen to audio recordings of calls. The Call Recording Player component is available only for the Voice Call object. This component is available in the Lightning App Builder in orgs where Service Cloud Voice is turned on. To view and use this component, users need the Contact Center Agent permission set. Because the Call Recording Player doesn't have an alternative text-based transcript, we recommend adding the Conversation Body component underneath the Call Recording Player to support accessibility.

        Chatter Component As of API version 38.0, the Feed component has been renamed Chatter in the Lightning App Builder. Use it to place a publisher and feed combo on a record page.

        Chatter Feed Component Use the Chatter Feed component to place a feed anywhere on a record page. The feed gives you a way to view posts, comments, and questions. Its attribute, Feed Type, takes one of these values. • Bookmarked—Shows a feed of all items the current user has bookmarked. • What I Follow—Shows a feed of all items the current user has followed. • To Me—Shows a feed of all items where the current user is mentioned. No coding is required to join a feed to a publisher. The connection is made automatically with the publisher and any feed on the page. The Chatter Feed component is available in API version 38.0 and later.

        Chatter Publisher Component Use the Chatter Publisher component to place a feed publisher anywhere on a record page. The publisher gives you a way to post, poll, or ask a question in a feed. Its attribute, Type, has the default value Global. Use the value Record when you want to associate the publisher with an object's feed. Then posts that are created with the publisher are associated with the record rather than the global Chatter feed. Use the Chatter Publisher component with the Chatter Feed component to get a full feed experience. No coding is required to join a publisher to a feed. The connection is made automatically with the publisher and any feed on the page. The Chatter Publisher component is available in API version 38.0 and later.

        Conversation Body Use this component to let agents view call transcripts in Service Cloud Voice. The Conversation Body component is available only for the Voice Call object. Transcripts are generated in real time during the call and the complete transcript is stored on the call record. As the call progresses, the transcript is generated and displayed in the component. Configure transcription data streams in Amazon Web Services to generate call transcripts. To view and use this component, users need the Contact Center Agent permission set.

        Customer Experience Score (Pilot) The Customer Experience Score component lets users view the score participants gave a particular record and the average score for all records of that object. You can add this component to custom objects and these standard objects: Account, Case, Contact, and User. To use this component, you must enable Salesforce Surveys in your org. This component is supported in API version 47.0 and later. For more information, see Customer Experience Score.

        968 Extend Salesforce with Clicks, Not Code Lightning Pages

        Note: We provide Customer Experience Score component to selected customers through a pilot program that requires agreement to specific terms and conditions. To be nominated to participate in the program, contact Salesforce. Pilot programs are subject to change, and we can’t guarantee acceptance. Customer Experience Score component isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only based on generally available products and features.

        Dynamic Actions Bar Component (Pilot) With this component you can add action buttons anywhere on your Lightning record and app pages. Add, delete, and change the order of actions in the Dynamic Actions Bar. You can also control the visibility of the component and of individual actions in the component, based on record field, permission, or user.

        Note: We provide the Dynamic Actions Bar component to selected customers through a pilot program that requires agreement to specific terms and conditions. To be nominated to participate in the program, contact Salesforce. Pilot programs are subject to change, and we can’t guarantee acceptance. Dynamic Actions Bar component isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only based on generally available products and features. To set the visibility of individual actions in the Dynamic Actions Bar component at runtime: 1. In the Dynamic Actions Bar properties pane, click an action name to open the Action dialog. 2. Under Set Action Visibility in the Action dialog, click Add Filter. 3. Select Record Field to control action visibility for a record field, or Advanced to control action visibility for a record, permission, or user. 4. Click the Field name field and select a field from the dropdown list (for Record Field), or select a field type and then select a field (for Advanced). 5. Select an operator and enter a value, then click Done. Considerations • This component is supported only for Lightning Experience desktop on record and app pages. • The Dynamic Actions Bar supports all standard and custom global actions. • This component is supported as a source for Dynamic Interactions on app pages only. See Dynamic Interactions in the Lightning App Builder on page 1005. • Email quick action and FeedItem.MobileSmartActions actions aren’t supported for the Dynamic Actions Bar. • If no actions are supported for the current object, a message appears in the Lightning App Builder properties pane.

        Einstein Field Recommendations Component The Einstein Field Recommendations component recommends values for picklist, checkbox, and lookup fields on cases. It’s used in Einstein Case Classification and Einstein Case Wrap-Up, and is available only if you enabled one or both of those features. Einstein’s field value recommendations are based on data from recently closed cases. The component has two types: Case Classification and Case Wrap-Up. To learn more about using this component with Einstein Case Classification, see Display Recommendations in the Service Console. Available in API version 49.0 and later.

        969 Extend Salesforce with Clicks, Not Code Lightning Pages

        Einstein Next Best Action Component The Einstein Next Best Action component displays suggested recommendations and actions on a record page. Use strategies to apply your org’s business rules to display context-specific suggestions to users. For more information, see Einstein Next Best Action Component.

        Einstein Predictions Component The Einstein Predictions component displays predictions and recommendations on a Lightning record page for a standard or custom object. For more information, see Add Einstein Predictions to a Lightning Page.

        Einstein Replies Component The Einstein Replies component recommends stock replies that support agents can insert into chat and messaging sessions. It’s used in Einstein Reply Recommendations, and is available only if that feature is enabled. The replies that Einstein recommends are based on past closed chats. To learn more, see Einstein Reply Recommendations. If Einstein Reply Recommendations is enabled, this component appears automatically on the Chat and Messaging console tabs for any users with the View and Act on Einstein Reply Recommendations user permission. Available in API version 49.0 and later.

        Highlights Panel Component The Highlights Panel component displays key record fields along with page-level actions. The fields that appear in the highlights panel come from the compact layout assigned to the object. The actions in the highlights panel come from the Salesforce Mobile and Lightning Experience Actions section of the page layout. Record highlights show up to the first 7 fields on desktop and up to the first 10 fields in the Salesforce mobile app. To streamline your highlights panel by not showing the second row of information and reducing the size of the first row, select the Show as collapsed (desktop only) checkbox. To show fewer action buttons, reduce the number using the Number of Visible Action Buttons (desktop only) attribute. To display the highlights horizontally or vertically (desktop only), drag the Highlights Panel component into a region with the horizontal or vertical dimensions you want. The highlights panel adjusts to fit the region’s space. For example, if you drag it into a narrow column, the highlights display vertically. If you drag it to a full-page width column, the highlights display horizontally.

        Event Insights Component The Event Insights component shows Salesforce IoT data about your customers’ connected devices on Lightning record pages alongside your CRM data. Salesforce IoT must be enabled, and you need an active orchestration to set up the Event Insights component. You can put up to five IoT orchestration variables in your Event Insights component. In the Lightning App Builder, you specify the parent record, the orchestration to pull the variables from, and the variables to show. You set the component visibility by filtering on record type. Each device (instance) can have up to 1 MB of data. Event message and device allocations follow your normal Salesforce IoT allocations. This component is supported in API version 44.0 and later.

        List View Component The List View component points to a list view and displays the first few records from that view. It supports all public and shared list views that are associated with standard and custom objects, except:

        970 Extend Salesforce with Clicks, Not Code Lightning Pages

        • Activity • ContentVersion (Files) • User • UserProfile By default, a List View component displays the first three records in the list, but you can set it to show a maximum of 30. You can’t give a List View component a custom name. The component’s name is derived from the name of the list view filter you select when you configure the component. In the Lightning App Builder, the Object dropdown list for this component displays only those objects that have list views associated with them. Adding too many List View components can cause page performance issues. Use them sparingly.

        Order Product Summaries by Recipient Component Use the Order Product Summaries by Recipient component to display order product details on an Order Summary record page. This component is available in Salesforce Order Management. The Order Product Summaries by Recipient component displays information about the order delivery group summaries associated with the order summary, including the order product summaries associated with them. The displayed order product summary fields are defined by the Order Product Summaries related list on the OrderDeliveryGroup object page layout. To modify the columns in this component on the order summary details page, edit the related list on the Order Delivery Group page layout, not the Order Summary page layout. You can create a custom filter to control which order delivery group summary records are displayed.

        Order Summary Totals Use the Order Summary Totals component to display order financial totals on an Order Summary record page. This component is available in Salesforce Order Management. You can customize the panel title and which values to display.

        Phone Use this component to give agents easy access to the Service Cloud Voice softphone call controls so they can mute, hold, and end call. This component is displayed when an agent accepts a call and is hidden when the call ends. The Phone component is available for the Account, Case, Contact, and Voice Call objects, and for custom objects. To view and use this component, users need the Contact Center Agent permission set.

        Quip Document Component Use the Quip Document component to embed Quip documents directly in records. Set up any Quip document as a template so that your users can quickly create documents on Salesforce records. When you set up the Quip Document component in Lightning App Builder, you can choose different modes. • Allow different documents on each record. Let users attach different documents to different records, or create and embed new documents from scratch. Admins can programmatically attach preselected documents to different records. • Use the same document for every record. Choose an existing document to embed in each record associated with a given object. • Use a template to create new documents for each record. Specify a template from which users can create and embed documents on a per-record basis. You can use any Quip document as a template. You can set up the template to add record data to documents.

        971 Extend Salesforce with Clicks, Not Code Lightning Pages

        • Use different templates for different records. Specify different templates for different records on the same object. This option requires you to programmatically pre-populate the component field with the URLs of different templates rather than manually choosing a single template URL.

        Rebate Types Panel Component The Rebate Types Panel component allows you to select and apply eligible rebate types and incentives to a mapped object. This component is supported in API version 52.0 and later.

        Note: To view and use this component, users need the Rebate Management license.

        Rebate Types Tab Component The Rebate Types component is used in combination with the Rebate Types Panel component to view and modify the benefit tiers associated with the applied rebate types and incentives. This component is supported in API version 52.0 and later.

        Note: To view and use this component, users need the Rebate Management license.

        Recent Items Component The Recent Items component displays a list of the most recently used items. The default is three, but you can set it to show a maximum of 30. In the Lightning App Builder, you can specify which objects’ records appear in the recent items list. The Recent Items component supports these objects, based on the specified properties: • All custom objects. • All standard objects for which both of these conditions are true: – A compact layout is defined for the object. – The object is tracked in the most recently used objects list.

        Note: The object isn’t supported for this component when it meets both of these criteria but isn’t in the list of available objects when you configure the component. Although they appear in the available objects list, the Task, Report, KnowledgeArticle, and Article objects aren’t supported for this component. If an object is tracked in the most recently used objects list, one or both of the LastViewedDate or LastReferencedDate fields are present.

        Record Detail Component The Record Detail component displays fields and sections from the page layout associated with the object. When users view the Lightning record page, they see different fields and sections based on their profile and page layout assignments. You can’t add, remove, or move the fields and sections when you’re viewing the component in the Lightning App Builder. You can only make field and section changes on the page layout.

        Related List - Single Component Use the Related List – Single component to include a single related list for a record in your Lightning page. To include all related lists for a record, use the Related Lists component. You can configure this component to display a related list for the record associated with your page, or you can display information for the parent record. Using a parent record is optional.

        972 Extend Salesforce with Clicks, Not Code Lightning Pages

        This component is supported in API version 39.0 and later. You can use it in record pages only.

        Tip: Make sure that the page layout for your users includes the related list you want to use. If using a parent record, update the parent record’s page layout.

        Related List Quick Links Component The Related List Quick Links component displays a set of links. Users can hover over the links to see all the related list columns without opening the View All page. Header actions, mass actions, row actions, and text wrapping are all available on the hover pane. The component displays two rows of related list links in large or medium page regions, and six rows in small regions. Users can view the remaining related list links by clicking Show All, which expands the component. When a user hovers over a related list quick link, it displays the first 10 items in the related list. The content of this component is based on the set of related lists on the object's page layout plus the user’s preferences. Users can customize the order of the quick links. They can also exclude the ones they don't want in their personal settings. To exclude, they can enter Customize My Pages in the Quick Find box, selecting Customize My Pages, then clicking the object. The Open Activities and Activity History related lists aren't supported for this component. You can use this component in record pages only.

        Related Record Component Use the Related Record component to display the details of a related record, including the details of a parent record, in your Lightning page. This component provides your users with built-in record creation, inline edit, and the ability to unlink a record and link a new one. This functionality is possible because the component uses actions. This component is supported in API version 39.0 and later. You can use it only in record pages. Keep these considerations in mind when using the Related Record component. • To use the component, an object must have an associated quick action to update the records. Some lookup fields have default actions. If no actions are available for your lookup, follow the links in the Lightning App Builder property editor to create the actions. • To change the displayed fields for the Related Record component, configure different lookup fields, and customize the associated action in Setup. If you don’t see the action or can’t modify it, create one. Also, ensure that the lookup field to the related object is included on the page layout of the main object. Otherwise the component can’t be refreshed. • To let users look up two levels of record relationships, specify the first-level lookup and then the second-level lookup. You must specify a first-level lookup before you can add a second-level lookup. • To let users look up polymorphic fields, select a polymorphic lookup field type on the first-level lookup or on the second-level lookup. • To use the Parent Case, Asset, and Case Source lookup fields on cases, change the field-level security to visible instead of hidden. Otherwise, your users see an error. • Users without Read access to the value of a lookup field see an error. • Person account records that display in contact Related Record components are read-only. • Cases are linked to default accounts that can’t be removed (unlinked) from the component unless the contact is also removed at the same time. • The Related Record component typically uses quick action metadata to determine which fields to show. However, if the user viewing the component has read-only access to the related record, a compact layout is used to render the fields instead. As a result, a read-only user sees a smaller set of fields.

        973 Extend Salesforce with Clicks, Not Code Lightning Pages

        Report Chart Component Use the Report Chart component to include a chart from a report in your Lightning page. If you leave the component’s Label field blank, the component’s label is derived from the report’s label. The chart refreshes if its report data is more than one day old. In the component properties, you can choose to display a refresh button to enable users to refresh the chart. Saving the report’s definitions also updates the chart data in the component. Setting a filter on the report chart data is supported only for record pages. If you set a filter option, the Report Chart component displays only that filtered data to users. This component is supported in API version 32.0 and later. It doesn’t work with reports in the My Personal Custom Reports folder. Report Chart components that refer to reports in the Unfiled Public Reports folder aren’t deployable when you include them in a package.

        Rich Text Component Use the Rich Text component to add text and simple HTML markup to your Lightning page.

        Note: JavaScript, CSS, iframes, and other advanced markup aren’t supported. To use advanced HTML elements in a component, we recommend using a Visualforce page component or a custom Lightning component. The Rich Text component uses Quill as its text editor. Keep these considerations in mind when using the text editor. • Quill wraps each line of text with tags. The tags can increase the number of characters in the rich text API value when you save the text. If you get a max length warning, break up the text into two Rich Text components. • In Quill, the default color for text is gray in the editor, but the text renders black in the output. • Selecting text using keyboard shortcuts, such as with Cmd+A, and then typing something new resets the formatting of the existing text. You can include up to 4,000 characters in the Rich Text component. This component is supported in API version 32.0 and later.

        Salesforce Surveys Component The Salesforce Surveys component adds an active survey to your Lightning page, so you can collect data from your users while they work on Salesforce records. This component is supported in API version 42.0 and later.

        Note: To create surveys and add them to Lightning pages, you must enable Salesforce Surveys in your org.

        Send Email Later - Pending List The Send Email Later - Pending List component shows the list of scheduled emails. From this list, your users can see pending emails, cancel an email, edit its scheduled time, or edit its content.

        Tableau CRM Dashboard Component The Tableau CRM Dashboard component surfaces an entire dashboard right where people work. The dashboard is fully functional and interactive. Users can refresh them, apply filters, and click chart segments to drill into filtered reports. Dashboards need space to display charts and tables. If an embedded dashboard is squished into too small a space, then a collapsed version displays instead of the full dashboard. Users can click View Dashboard to open a collapsed dashboard. Available in API version 41.0 and later. The Dashboard component isn’t available on record pages. Private dashboards aren’t available.

        974 Extend Salesforce with Clicks, Not Code Lightning Pages

        Tabs Component Use the Tabs component to add tabs to a region of your Lightning page. Choose from a set of standard tabs or create custom tabs to enhance record and Home pages for your Lightning Experience users. The Tabs component is supported only for Lightning Experience record and Home pages. You can place up to 100 tabs in a Tabs component. This component is supported in API version 36.0 and later.

        Twitter Component Social Accounts and Contacts must be enabled for your organization before you can add the Twitter component to a Lightning page.

        Visualforce Page Component Use the Visualforce Page component to include a Visualforce page in your Lightning page. If you leave the component’s Label field blank, the label is taken from the Visualforce page that you assign to it. If you leave the Height field blank, the Visualforce page’s height defaults to 300 pixels when it displays in the Salesforce mobile app. This component is supported in API version 32.0 and later. To appear in the Salesforce mobile app or Lightning Experience, the Visualforce page must have the Available for Salesforce mobile apps and Lightning pages option selected. This option is available for pages that are set to API version 27.0 and later.

        Wave Dashboard Component Use the Wave Dashboard component to include Tableau CRM dashboards in your Lightning page. Contact Salesforce to enable the Wave Dashboard component for the Lightning App Builder. Select the dashboard to display from the dropdown list. If you leave the Height field blank, the dashboard’s height defaults to 300 pixels when it displays in your Lightning page. You can control the visibility of the dashboard’s title and specify whether the dashboard appears when an error occurs. With the Open Links in New Windows attribute, you can specify where links from the dashboard to other assets are opened. With the Filter attribute, you can use JSON to filter dataset fields at run time. For more information, see Embed Tableau CRM Dashboards in Lightning Pages.

        SEE ALSO: Custom Lightning Page Components

        975 Extend Salesforce with Clicks, Not Code Lightning Pages

        Custom Lightning Page Components

        The Lightning App Builder supports custom Lightning components. EDITIONS Custom components in your org that are configured for use in the Lightning App Builder appear in the Lightning Components pane. Lightning App Builder available in: both Salesforce Classic and Lightning Experience

        Lightning Home and utility bar pages available in: Lightning Experience

        Lightning app and record pages available in: both the Salesforce mobile app and Lightning Experience

        Email application pane pages available in: both Salesforce Classic and Lightning Experience

        Available in: Group Essentials, Professional, Enterprise, Performance, Unlimited, and Developer Editions

        If you have a page to be used in the Salesforce mobile app, use only Lightning components that the mobile app supports. See Data Available in the Salesforce Mobile App. Your custom Lightning components don’t automatically work on Lightning pages or in the Lightning App Builder. To make a custom component usable in both: 1. Configure the component and its component bundle so that they’re compatible with the Lightning App Builder and Lightning pages. For Aura components, see the Lightning Aura Components Developer Guide. For Lightning web components, see the Lightning Web Components Developer Guide. . 2. Deploy My Domain in your org. When you deploy My Domain, references and links to Lightning resources are in the format https://MyDomainName.lightning.force.com. You can configure custom components to support different devices. For instance, you have a record page whose template supports both phone and desktop, and you activate the page for both. Then you add a phone-only component to the page. When the page is viewed on a phone, users see the component. When the page is viewed on a desktop, the phone-only component doesn’t appear.

        976 Extend Salesforce with Clicks, Not Code Lightning Pages

        Note: Pull to refresh doesn’t work for custom Lightning web components in the Salesforce mobile app.

        SEE ALSO: Standard Lightning Page Components My Domain

        Dynamic Lightning Pages

        Control when a component appears on a Lightning page by adding filter conditions and logic to EDITIONS its properties in the Lightning App Builder. For example, you can construct a filter that causes a rich text component on an opportunity page to display when the opportunity’s amount is greater than Lightning App Builder or equal to $1 million. available in: Salesforce Component visibility properties appear when you select a component on a record, app, or Home Classic and Lightning page in the Lightning App Builder. This behavior applies to standard components, custom Experience components, and components from AppExchange. No need to do anything to your custom Lightning pages available in: components. It’s all handled by the Lightning App Builder. Lightning Experience and the On record pages, you can choose record fields or advanced fields, such as fields from related objects Salesforce mobile app or from a global object like User. Field values in component visibility filters can’t span more than five fields. For example, Available in: Group Record.Account.Owner.Manager.Manager.Manager.LastName has six spans, Essentials, Professional, and therefore isn’t supported. Enterprise, Performance, Unlimited, and Developer Editions

        App and Home pages aren’t associated with an object, so the filters you can use are limited to other contexts, such as User, User Permission, or Device. But that doesn’t mean that they’re less powerful. If you don’t define a filter, the component displays on the Lightning page as usual. When you define one or more filters and set the filter logic for a component, the component is hidden until the filter logic criteria are met.

        In the Lightning App Builder, components that have at least one filter assigned are indicated with an icon ( ).

        977 Extend Salesforce with Clicks, Not Code Lightning Pages

        Visibility Rules on Dynamic Forms Fields and Field Sections You can make your Lightning record pages even more dynamic by setting visibility filters on Field and Field Section components. For example, you can have a field or set of fields hidden until a person with a certain profile, permission, or viewing on a certain device visits the page. Be careful when setting up visibility rules on multiple components in the same region. If your rules cause all the components in a region to be invisible at run time, the region will be empty. Visibility rules on fields are respected in the edit, clone, inline edit, and new record screens. Component visibility rules on field sections behave differently than they do on fields. Visibility rules on fields are assessed dynamically. Changes a user makes while editing a record can make fields appear and disappear as visibility rules are evaluated. Visibility rules on field sections aren't dynamic and don't react to what a user does while editing. Field section visibility rules are evaluated only after the record is saved.

        Component Visibility Based on Form Factor With a filter using the Device context, you can set a component to display exclusively when its page is viewed in a specific experience, such as a phone or a desktop.

        Custom Lightning components can also be set to support different form factors. For Lightning web components, see “Configure Your Component for Different Form Factors.” For Aura components, see “Aura Component Bundle Design Resources.”

        Supported Objects, Fields, Field Types, and Operators Two objects aren’t supported for component visibility filters: ProcessInstanceStep and ProcessInstanceWorkItem. On record pages, component visibility filters rely on the data captured in fields associated with the page’s object. Not all fields, field types, and operators are supported. These field types are supported: • String type fields: Autonumber, Currency, Email, Number, Percent, Phone, Text, Text Area, URL • ID • Checkbox (boolean) • Geolocation • Picklist • Formula fields which resolve to one of the above types • Roll-up summary fields which resolve to one of the above types These operators are supported:

        978 Extend Salesforce with Clicks, Not Code Lightning Pages

        • CONTAINS • = and == (Equal) • <> or != (Not Equal) • > (Greater Than) • >= (Greater Than or Equal) • < (Less Than) • <= (Less Than or Equal)

        SEE ALSO: Formula Operators and Functions Standard Lightning Page Components

        Build Localized Component Labels and Attribute Values on Lightning Pages with Custom Labels

        When you specify labels or attributes in the Lightning App Builder such as for components or custom EDITIONS tabs, you can use the {!$Label.customLabelName} expression to help define the label or attribute’s value. Lightning App Builder On a Lightning page, custom Tabs component labels and other component attribute values aren’t available in: both Salesforce localized when they’re entered as plain text in the Lightning App Builder. For example, if you have Classic and Lightning an org whose default language is English, and you have a Tabs component with three custom tabs Experience that you entered as Cars, Trucks, and Planes, the non-English users in your org see those tab label Lightning Home pages values as Cars, Trucks, and Planes when they view the page. The tab label values aren’t translated available in: Lightning into your users’ languages. Experience

        But configuring custom label values in the Lightning App Builder using the Lightning app and record {!$Label. } customLabelName expression lets users see labels in their chosen language pages available in: both the if you created a translation for that label in their language. Salesforce mobile app and The {!$Label.customLabelName} expression works with any custom labels that you Lightning Experience create in Setup using the custom label feature. The text that you define in the Value field for your custom label displays as the label value when the component renders on a Lightning page. And, Available in: Group if you create a translated value for the label, users using that language in your org see the translated Essentials, Professional, Enterprise, Performance, value. Unlimited, and Developer Expressions are supported only in String type fields in component labels and attributes on app, Editions Home, and record pages. You can’t use an expression in page-level properties. 1. Create a translated custom label in Setup. USER PERMISSIONS For more information, see Translate Custom Labels. To create and save Lightning 2. Navigate to the Lightning App Builder. From Setup, in the Quick Find box, enter App pages in the Lightning App Builder, then select Lightning App Builder. Builder: 3. Open an app, record, or Home Lightning page. • Customize Application 4. Select the component whose label or property you want to replace with your translated custom To view Lightning pages in label. the Lightning App Builder: • View Setup and 5. Enter {!$Label.customLabelName} in the label or attribute field, replacing Configuration “customLabelName” with the name of your custom label.

        979 Extend Salesforce with Clicks, Not Code Lightning Pages

        Label and property fields that support using this expression have an info bubble that says so.

        6. Save your changes. Users in your org whose language is set to the language of your translated label see the label or attribute in its translated value.

        Example: Your org’s default language is English, but you want the custom Planes tab on your Lightning page to show a translated custom label for your German users. Here’s how to do it. 1. Create a custom label in Setup with the name Planes_Label, and enter the Value as Planes. That’s what your English users see. 2. From the Translations related list on the custom label detail page, create a translation for the label with the language set to German and the Translation Text value as Flugzeuge. 3. Save the translation. 4. In the Lightning App Builder, open your page and click the Tabs component on the canvas. 5. In the properties pane, click the Planes tab, and in the Custom Label field, replace the Planes plain text with {!$Label.Planes_Label}.

        6. Click Done and save your page. When viewing the page, your English users see the tab as Planes, and your German users see the tab as Flugzeuge.

        Note: When a field in a component contains an expression, Salesforce can’t validate the value it resolves to. If the expression resolves to a value that’s invalid for the field, sometimes the component doesn’t work as expected. We recommend that you test the page in the translated languages before you make the page with the expression available to users.

        980 Extend Salesforce with Clicks, Not Code Create an App Home Page with the Lightning App Builder

        Create an App Home Page with the Lightning App Builder

        Create a home page for an app that you can add directly into Lightning apps and the Salesforce EDITIONS mobile apps. Your users can then easily access the objects and items that are most important in that app. Lightning App Builder 1. From Setup, enter App Builder in the Quick Find box, then select Lightning App Builder. available in: both Salesforce Classic and Lightning 2. Click New. Experience 3. Select App Page and then click Next. Lightning app pages 4. Give your app page a label, and then click Next. available in: both the The label can be up to 80 characters. Salesforce mobile app and Lightning Experience 5. Select a page template and click Finish. 6. Drag the components that you want onto the page. Available in: Group, Essentials Professional, Drag components up and down to rearrange them. You can also click a component’s top or Enterprise, Performance, bottom border to create an insertion point ( ) for the next component. Unlimited, and Developer 7. Click each component on the page to configure its properties. Editions 8. Click in the empty area of the canvas or on the Page link in the breadcrumb to configure the page properties. USER PERMISSIONS The Description field is limited to 255 characters. The Developer Name field is limited to 80 characters, but if you have a namespaced org, we recommend using fewer than 65 characters. To create and save Lightning pages in the Lightning App When you create a Lightning page, the developer name is derived from the first 40 characters Builder: of the label that you give the page. • Customize Application 9. Optionally add global actions to your page. To view Lightning pages in the Lightning App Builder: a. In the page properties, click Select. • View Setup and b. Add, remove, or reorder the actions for your page. Configuration Actions you select appear on the page’s action bar and in the highlights panel at the top of the page in Lightning Experience. An app page is the only type of Lightning page that you can add actions to in this way. Other Lightning pages derive their actions from the object and global page layouts.

        c. Click OK.

        10. Click Save when you’re done editing your page. To give your users access to the app page, you must activate it.

        SEE ALSO: Activate Your Lightning App Page Lightning App Builder

        981 Extend Salesforce with Clicks, Not Code Create a Mobile App Page with the Lightning App Builder

        Create a Mobile App Page with the Lightning App Builder

        Create a mobile home page for the Salesforce mobile app. Your users can see this page right when EDITIONS they log in.

        Note: These steps are similar to Create an App Home Page with the Lightning App Builder. Lightning App Builder That’s because when you create an app page or record page, it can be made available on available in: both Salesforce both Lightning Experience and the Salesforce mobile app. The following steps focus on Classic and Lightning Experience creating an app page for the mobile app only. 1. From Setup, enter App Builder in the Quick Find box, then select Lightning App Builder. Lightning app pages available in: both the 2. Click New. Salesforce mobile app and 3. Select App Page and then click Next. Lightning Experience 4. Give your app page a label, and then click Next. Available in: Group, The label can be up to 80 characters. Essentials Professional, Enterprise, Performance, 5. Select the first template (Header and Left Sidebar) and click Finish. Unlimited, and Developer If this is a mobile-only page, it doesn't matter which template you pick. If you plan to share this Editions page between mobile and desktop users, choose the template most appropriate for desktop use. On mobile devices, the page responsively collapses into a single column. USER PERMISSIONS 6. Make sure you’re viewing the template preview using the Phone form factor. The regions on the template are displayed in a one column layout. To create and save Lightning pages in the Lightning App Builder: • Customize Application To view Lightning pages in the Lightning App Builder: • View Setup and Configuration

        982 Extend Salesforce with Clicks, Not Code Preview Mobile App Pages in Lightning App Builder

        7. Drag the components that you want onto the page. Drag components up and down to rearrange them. You can also click a component’s top or bottom border to create an insertion point ( ) for the next component. To increase mobile adoption, we recommend making available the top features that your users use most frequently. For example, the Recent Items can take them back into the records that they were working with. Also, the List View standard components can be set to their open tasks to improve productivity in the mobile app. Remember that screen space and bandwidth are precious on mobile, so try to limit each page to 4 or 5 components at most. If you overload the page with features, it can be slow and harder to use. See Preview Mobile App Pages in Lightning App Builder on page 983.

        8. Click each component on the page to configure its properties. 9. Click in the empty area of the canvas or on the Page link in the breadcrumb to configure the page properties. The Description field is limited to 255 characters. The Developer Name field is limited to 80 characters, but if you have a namespaced org, we recommend using fewer than 65 characters. When you create a Lightning page, the developer name is derived from the first 40 characters of the label that you give the page.

        10. Optionally add global actions to your page. Global actions help your users perform tasks easily from the app page, like log a call, create a new case or event etc. a. In the page properties, click Select. b. Add, remove, or reorder the actions for your page. Actions you select appear on the page’s action bar and in the highlights panel at the top of the page in Lightning Experience. An app page is the only type of Lightning page that you can add actions to in this way. Other Lightning pages derive their actions from the object and global page layouts.

        c. Click OK.

        11. Click Save when you’re done editing your page. To give your users access to the mobile app page, you must activate it. You can limit the page to mobile users during the page activation process. After activation, you can add this to any Lightning App in the App Manager for your users to personalize. If your Lightning App is available on both desktop and mobile, you can use the same page across both. Or create a Lightning App specifically for your mobile users, and add it to the navigation there.

        Preview Mobile App Pages in Lightning App Builder

        For a consistent experience across devices, use the Lightning App builder to preview your record EDITIONS and app pages. The Salesforce mobile web experience is no longer available after Summer ’20. To customize and Available in: Lightning preview your apps and pages for Lightning Experience or the mobile app, use the App Builder. You Experience can also specify certain components as mobile- or desktop-only. Available in: Group If you need more than a preview, run the Lightning apps and components in the Salesforce mobile Essentials, Professional, app. Testing in the mobile app helps validate that users have the best experience on mobile. Enterprise, Performance, When you build a mobile app page, the steps include: Unlimited, and Developer Editions • Build a new app page with the App Builder on page 982 • Activate the page and add the page to your mobile navigation • Create a Lightning app in the App Manager for your users to personalize

        983 Extend Salesforce with Clicks, Not Code Preview Mobile App Pages in Lightning App Builder

        Watch a Demo (9 minutes) The following sections discuss best practices on building a mobile app page using the App Builder.

        Display Mobile-Friendly Components When you create a Lightning app page or record page via the App Builder, the template you choose controls how it displays across devices.

        Here are several ideas on including standard components on page 966 for mobile users. The list can vary depending on your user’s role. • The Report Chart component displays helpful data, such as your top deals, based on a filter. • The List View component can display your events, such as today’s agenda. • The Task List component can display your open tasks, overdue tasks, or another list based on a filter. • The Recent Items component lets you get back to the records you are working with recently. • The Launchpad component lets you add a grid of navigation items, such as your contacts or a custom Visualforce page, which users can access with one tap. If standard components don’t meet your requirements, create custom components on page 976.

        Customize Actions for the Mobile Page If you’re creating an app page, you can also customize the actions available for the page. On the Page link, click Select under the Actions label.

        984 Extend Salesforce with Clicks, Not Code Preview Mobile App Pages in Lightning App Builder

        Here are several popular actions for mobile users that make them more productive. Again, the list can vary depending on your user’s role. • Log a call • New case • New event • New task For more information, see Salesforce Mobile App Action Bar.

        Activate the Page for Mobile Users When you activate the page, you have the option to add the page to both Lightning Experience and mobile app. You can add the page to any mobile-enabled Lightning app. Adding your app page to Lightning Experience makes it available to users viewing the app on desktop and in the Salesforce mobile app.

        Enable Users to Personalize Tabs for the Mobile App If you haven't already, enable your Lightning apps for mobile in the App Manager so your users can access the same navigation on all devices. Or create a Lightning app if you want separate navigation items on mobile. To customize your mobile experience, personalize the app on desktop with your favorite tabs, and then use them on the mobile app. This guideline is optional but highly recommended to optimize your users’ mobile experience. For this use case, choose the Desktop and phone form factors.

        985 Extend Salesforce with Clicks, Not Code Preview Mobile App Pages in Lightning App Builder

        Add navigation items, including the app page you created and several basic tabs like Chatter and Groups. Keep the app lightweight since users can personalize their own tabs using this app.

        Add the profiles who need mobile access to this app. For example, the mobile app is ideal for your sales and marketing users who need access to the mobile app on the go. Both profiles can then use the mobile app to personalize the tabs they need for their role. If you have multiple Lightning apps available to different users profiles, the profiles also get access to the mobile app.

        Personalize Tabs for the Mobile App In Lightning Experience on desktop, users access the Lightning app you created. Go to a list view and open it in a new tab. This adds the list view to the mobile navigation and enable users to be productive in the mobile app.

        986 Extend Salesforce with Clicks, Not Code Preview Mobile App Pages in Lightning App Builder

        After adding tabs, users can edit the mobile navigation items, edit item names, and reorder the items.

        987 Extend Salesforce with Clicks, Not Code Preview Mobile App Pages in Lightning App Builder

        When users log in to the mobile app, the App Launcher lets them switch to the customized Lightning app. For more information, see Customize the Salesforce Mobile App.

        The actions you added are displayed on the home page screen with the components you added to the template in the App Builder.

        988 Extend Salesforce with Clicks, Not Code Preview Mobile App Pages in Lightning App Builder

        989 Extend Salesforce with Clicks, Not Code Activate Lightning Experience Home Pages

        Activate Lightning Experience Home Pages

        Is your custom home page ready for your users? Use the Activation function inside the Lightning EDITIONS App Builder to get the page out to them. You have three activation options. You can make your custom home page the default home page for all users, assign it to specific Lightning apps, or assign Lightning App Builder it to app-and-profile combinations. Assigning the page to a Lightning app or app-and-profile available in: both Salesforce combination gives your users access to a home page customized for the context they’re working Classic and Lightning in. Experience

        1. Create a home page or open an existing one in the Lightning App Builder. Lightning Home and utility 2. If you opened a home page that is ready for your users and doesn’t need editing, click Activation. bar pages available in: Lightning Experience 3. If you created a page or opened a page that needs adjustment, make the necessary changes, click Save, and then click Activate. Lightning app and record You have a few options for activating a home page. pages available in: both the • Make the page the org default. Salesforce mobile app and Lightning Experience • Make the page the default home page for specific Lightning apps. Email application pane • Assign the page to a combination of Lightning apps and profiles. pages available in: both 4. On the activation screen, click the tab for the option you’ve chosen, and follow the steps to Salesforce Classic and activate the page. Lightning Experience

        Tip: You can also assign home pages from Setup. Enter Home in the Quick Find box, Available in: Group and then select Home. Essentials, Professional, Enterprise, Performance, • Classic apps can be viewed in Lightning Experience, but you can’t display different Unlimited, and Developer home pages assigned for specific apps and profiles. Upgrade Classic apps to Lightning Editions apps from the App Manager to make home page assignments. • If you no longer want a page to be an app or org default, redo the activation process for the page, and select the option to remove it as the default. USER PERMISSIONS • If you activate a page and then return to make changes, you don’t have to activate To create and save Lightning it again. Clicking Save after you make your edits pushes the changes to your users. pages in the Lightning App Builder: • Customize Application To view Lightning pages in the Lightning App Builder: • View Setup and Configuration

        990 Extend Salesforce with Clicks, Not Code Activate Your Lightning App Page

        Activate Your Lightning App Page

        To make your custom app page available to users, you must activate it. You can also rename the EDITIONS Lightning page tab, adjust its visibility, and set its position in the navigation list. The Lightning App Builder’s activation feature makes this process easy. Lightning App Builder 1. To open your app page, from Setup, enter Lightning App Builder in the Quick Find available in: both Salesforce box, select Lightning App Builder, and then click Edit next to the page. Classic and Lightning Experience 2. In the Lightning App Builder, click Activation. 3. Update the activation properties, if desired. Lightning Home and utility bar pages available in: You can: Lightning Experience • Change the page’s custom tab label. By default, the label that you give the Lightning page Lightning app and record is used as the label for its custom tab. pages available in: both the • Change the custom tab’s icon. The icon that you choose here is used as the icon for the Salesforce mobile app and page in the mobile app and in Lightning Experience. Lightning Experience

        • Adjust the app page custom tab’s visibility. Email application pane Note: If you select System Administrators only, the tab is set to Default On pages available in: both for System Administrators. For all other users, it’s set to Default Off and doesn’t Salesforce Classic and Lightning Experience show up in the navigation of the apps it has been assigned to, but users can see the tab in the App Launcher in Lightning Experience and on the All Tabs page in Salesforce Available in: Group Classic. Essentials, Professional, If you select Active for all users, the tab is set to Default On for all users. It Enterprise, Performance, appears in the visible tabs for its associated app, in the App Launcher in Lightning Unlimited, and Developer Experience, and on the All Tabs page in Salesforce Classic. Editions

        4. Add the page to one or more Lightning apps. USER PERMISSIONS Adding your app page to Lightning Experience makes it available to users viewing the app on desktop and in the Salesforce mobile app. To create and save Lightning pages in the Lightning App 5. Set the page’s position in the Salesforce “Mobile Only” app navigation. Builder: The first item that you put in the mobile navigation list becomes your users’ landing page. • Customize Application To view Lightning pages in 6. Click Activate. the Lightning App Builder: Your Lightning page is now ready for your mobile and Lightning Experience users! • View Setup and Configuration To enable your users to personalize the app with their favorite tabs, create a new Lightning App in the App Manager. They can then use the tabs in the Salesforce mobile app.

        Tip: You can give your app page a custom icon image by editing the style of the page’s custom tab in Setup.

        SEE ALSO: Create Lightning Page Tabs Tab Settings

        991 Extend Salesforce with Clicks, Not Code Create Lightning Page Tabs

        Create Lightning Page Tabs

        Before you can include a Lightning app page in the Salesforce mobile apps or in a Lightning app, EDITIONS you must create a custom tab for it. When you first activate an app page in the Lightning App Builder, a tab is created for the page as Available in: both Salesforce part of the activation process. You can also create a tab for the page manually in Setup before you Classic (not available in all activate it. orgs) and Lightning Experience You can create a custom tab only for an App Page type of Lightning page. 1. From Setup, enter Tabs in the Quick Find box, then select Tabs. Available in: All editions 2. Click New in the Lightning Page Tabs related list. USER PERMISSIONS 3. Choose a Lightning page for the tab. 4. Enter a label. To create and edit custom tabs: This text is used as the display name for the Lightning page. • Customize Application 5. Select a tab style to set a color scheme and icon for the Lightning page tab. 6. Enter a description of the tab, if desired, and click Next. 7. Choose the user profiles the new custom tab is available for.

        Note: In Salesforce Classic, the Default On and Default Off options for Lightning page tabs don’t work the same way as for other custom tabs. The Lightning page menu item appears for the selected profiles in Salesforce for Android and Salesforce for iOS whether you choose Default On or Default Off. Select the Tab Hidden option to hide the Lightning page for the selected profiles.

        8. Click Save.

        Tip: When creating a custom icon for your Lightning page tab, follow these image guidelines. The icon should: • Be less than 10k in size • Be 120 x 120 pixels • Be a PNG with a transparent background • Have a resolution of 72 dpi • Not include a color background • Not include outer shadows on the inner icon graphic

        992 Extend Salesforce with Clicks, Not Code Create and Configure Lightning Experience Record Pages

        Create and Configure Lightning Experience Record Pages

        Use the Lightning App Builder to add, remove, or reorder components on a record page to give EDITIONS users a customized view for each object’s records. 1. Create a record page for Lightning Experience in one of these ways. Lightning App Builder available in: both Salesforce a. From the Setup menu on a record page, select Edit Page. Classic and Lightning Experience

        Lightning Home and utility bar pages available in: Lightning Experience

        Lightning app and record pages available in: both the Salesforce mobile app and Lightning Experience

        Email application pane pages available in: both Salesforce Classic and Lightning Experience

        Available in: Group Essentials, Professional, When you select Edit Page for the first time, Salesforce makes a copy of the standard page. Enterprise, Performance, This copy is what you edit in the Lightning App Builder. If a customized page exists and is Unlimited, and Developer active, selecting Edit Page opens that page to edit. Editions b. Create a page from the Lightning App Builder list page in Setup. To find it, enter App Builder in the Quick Find box, then select Lightning App Builder. USER PERMISSIONS To create an empty page, select a page template. To create a page prepopulated with standard components, clone the system default page. To create and save Lightning pages in the Lightning App c. Clone an existing custom Lightning page from its detail page or from the Lightning page Builder: list in Setup. • Customize Application d. Click New Page from the Pages list inside the Lightning App Builder. To view Lightning pages in the Lightning App Builder: 2. In the Lightning App Builder, add, edit, or remove components to change the page’s layout. • View Setup and Reorder components by dragging them around the canvas. Configuration 3. In the page properties, give your customized page a unique, descriptive label. To get to the page properties, click Page from the breadcrumb at the top of the properties pane.

        4. Save your page.

        993 Extend Salesforce with Clicks, Not Code Add and Customize Tabs on Lightning Pages Using the Lightning App Builder

        Hang on, you’re not done yet! To make your customized record page available to your Lightning Experience and mobile users, you must activate it. You can activate the page from the Save dialog when you save it for the first time or later using the Activation button.

        SEE ALSO: Add and Customize Tabs on Lightning Pages Using the Lightning App Builder Lightning App Builder Considerations Lightning App Builder Limits and Limitations

        Add and Customize Tabs on Lightning Pages Using the Lightning App Builder

        With the Lightning App Builder, you can create, update, delete, and change the order of tabs and EDITIONS tab sets on record and Home pages in Lightning Experience. Configure the tabs that your users see, name them whatever you like, and add components to each tab. Lightning App Builder 1. Open a Home or record page for Lightning Experience in one of these ways. available in: both Salesforce Classic and Lightning a. From the Setup menu, select Edit Page. Experience

        Lightning Home and utility bar pages available in: Lightning Experience

        Lightning app and record pages available in: both the Salesforce mobile app and Lightning Experience

        Email application pane pages available in: both Salesforce Classic and Lightning Experience

        Available in: Group Essentials, Professional, Enterprise, Performance, When you select Edit Page for the first time, Salesforce makes a copy of the standard page. Unlimited, and Developer This copy is what you edit in the Lightning App Builder. If a customized page exists and is Editions active, selecting Edit Page opens that page to edit.

        b. Open a page from the Lightning App Builder list page in Setup. To find it, enter App USER PERMISSIONS Builder in the Quick Find box, then select Lightning App Builder. To create and save Lightning 2. Add a Tabs component to the page. pages in the Lightning App A default set of tabs is added. Builder: 3. To add a tab, click Add Tab in the Tabs component properties. • Customize Application 4. Customize a tab by clicking it in the properties pane. You can select a different standard label To view Lightning pages in or click Custom and enter the tab name you want. the Lightning App Builder: • View Setup and Configuration

        994 Extend Salesforce with Clicks, Not Code Add and Customize Tabs on Lightning Pages Using the Lightning App Builder

        Note: Custom tab labels in the Tabs component—including those installed from packages—aren’t translated. For example, if you create a custom Goals tab in English, then view the page as a user whose language is set to French, the tab still displays as Goals. However, you can use the {!$Label.customLabelName} expression in a component label or attribute to represent a custom label that you create in Setup using the custom label feature. For more information, see “Build Localized Component Labels and Attribute Values on Lightning Pages with Custom Labels on page 979.”

        5. To add your first component to a tab, select the tab on the canvas and then drop the component directly below it.

        6. Reorder tabs in the Tabs properties pane by dragging and dropping them into position. You can’t drag and drop individual tabs on the canvas.

        SEE ALSO: Create and Configure Lightning Experience Record Pages Lightning App Builder Considerations Personalize the Navigation Bar in Lightning Experience

        995 Extend Salesforce with Clicks, Not Code Activate Lightning Experience Record Pages

        Activate Lightning Experience Record Pages

        Is your custom record page ready for your users? Use the Activation function inside the Lightning EDITIONS App Builder to get the page out to them. You can make your custom record page the default record page for all users, assign it to specific Lightning apps, or assign it to record types and profiles. Lightning App Builder Assigning the page to a Lightning app, record type, or profile gives your users access to a record available in: both Salesforce page customized for the context they’re working in. Classic and Lightning 1. Create a record page or open an existing one in the Lightning App Builder. Experience 2. If you opened a record page that is ready for your users and doesn’t need editing, click Lightning Home and utility Activation. bar pages available in: Lightning Experience 3. If you created a page or opened a page that needs adjustment, make the necessary changes, click Save, and then click Activate. Lightning app and record You have a few options for activating a record page. pages available in: both the • Make the page the org default for the object. Salesforce mobile app and Lightning Experience • Make the page the default object record page for specific Lightning apps. Email application pane • Assign the page to a combination of Lightning apps, record types, and profiles. pages available in: both • Assign the page to a form factor, such as a desktop or phone. Salesforce Classic and Lightning Experience 4. On the activation screen, click the tab for the option you’ve chosen, and follow the steps to activate the page. Available in: Group Essentials, Professional, SEE ALSO: Enterprise, Performance, Create and Configure Lightning Experience Record Pages Unlimited, and Developer Editions Lightning App Builder Considerations

        USER PERMISSIONS

        To create and save Lightning pages in the Lightning App Builder: • Customize Application To view Lightning pages in the Lightning App Builder: • View Setup and Configuration

        Break Up Your Record Details with Dynamic Forms

        The more fields that you have on your page layout, the more that the Record Detail component EDITIONS becomes a monolithic block of fields that you can’t customize. With Dynamic Forms, you can migrate the fields and sections from your page layout as individual components into the Lightning App Available in: Lightning Builder. Then, you can configure them just like the rest of the components on the page, and give Experience the users of that page only the fields and sections that they need. Dynamic Forms benefits you three ways. Available in: Group, Professional, Enterprise, • An instant upgrade from page layouts: Place fields and sections wherever you want. Performance, Unlimited, • Dynamic layouts: Use visibility rules to show and hide fields and sections. and Developer Editions

        996 Extend Salesforce with Clicks, Not Code Break Up Your Record Details with Dynamic Forms

        • Simpler layout management: – Manage the fields and sections on your pages in the Lightning App Builder without touching the page layout editor. – Reduce the number of page layouts you need with component visibility rules. – Take advantage of a single assignment model for the Lightning page instead of the dual model of assigning a Lightning page and a page layout.

        You can start using Dynamic Forms in two ways. • Create a custom object record page, then drag Field and Field Section components onto it. • Open an existing record page and migrate its record details using the migration wizard. Dynamic Forms doesn’t only affect how your users see fields on a record page. It also affects what they see when they click to edit, create, or clone a record. On Dynamic Forms-based pages, the fields that users see when creating, editing, or cloning come from the fields on the page, not from the page layout.

        Note: Dynamic Forms is supported on record pages for custom objects only.

        Migrate a Record Page to Dynamic Forms With Dynamic Forms, you can migrate the fields and sections from your existing record pages as individual components in the Lightning App Builder. Then you can configure them just like the rest of the components on the page, and give the users of that page only the fields and sections that they need. Dynamic Forms is supported only for custom objects. Required and Read-Only Fields in Dynamic Forms Universally required fields retain their status when you’re working with them on a Dynamic Forms-based Lightning page. However, you can make other fields required or read-only just for the page you’re working on. Dynamic Forms and Mobile The Dynamic Forms Field Section component and the Field components that go inside it are desktop-only. But your mobile users are still covered. The Record Detail - Mobile component gives your mobile users a way to see the record details on a Dynamic Forms-enabled page.

        997 Extend Salesforce with Clicks, Not Code Break Up Your Record Details with Dynamic Forms

        Dynamic Forms Tips and Considerations Keep these tips and considerations in mind when working with Dynamic Forms. Dynamic Forms Limitations Keep these limitations in mind when working with Dynamic Forms. Dynamic Forms Known Issues Keep these known issues in mind when working with Dynamic Forms.

        Migrate a Record Page to Dynamic Forms

        With Dynamic Forms, you can migrate the fields and sections from your existing record pages as EDITIONS individual components in the Lightning App Builder. Then you can configure them just like the rest of the components on the page, and give the users of that page only the fields and sections that Available in: Lightning they need. Dynamic Forms is supported only for custom objects. Experience 1. Open an existing custom object record page for Lightning Experience in one of these ways. Available in: Group, a. From the Setup menu on a record page, select Edit Page. Professional, Enterprise, Performance, Unlimited, and Developer Editions

        USER PERMISSIONS

        To create and save Lightning pages in the Lightning App Builder: • Customize Application To view Lightning pages in the Lightning App Builder: • View Setup and Configuration

        When you select Edit Page for the first time, Salesforce makes a copy of the standard page. This copy is what you edit in the Lightning App Builder. If a customized page exists and is active, selecting Edit Page opens that page to edit.

        b. From the Object Manager in Setup, open a custom object, then select Lightning Record Pages. c. Open a custom object record page from the Lightning App Builder list page in Setup. To find it, enter App Builder in the Quick Find box, then select Lightning App Builder.

        2. Click the Record Detail component. 3. In the component detail pane, click Upgrade Now to start the Dynamic Forms migration wizard.

        998 Extend Salesforce with Clicks, Not Code Break Up Your Record Details with Dynamic Forms

        4. Walk through the wizard, and select which page layout has the fields that you want to migrate to the page. Why choose a page layout when the Fields tab has all the fields you need? Well, the upgrade wizard takes the fields and sections from the page layout you choose and automatically adds them to your page. Just a few clicks and you’re done. No need to drag all those fields manually. As long as a field is inside a Field Section component, you can put it anywhere on the page, even inside tabs.

        Note: By default, fields and field sections are migrated into an Accordion component to prevent page performance issues. If you disable this option, migrated fields and sections are added to the page in place of the Record Detail component. If the Record Detail was in a region that's visible on page load, and you have a lot of fields, disabling this option can significantly impair page performance.

        As part of the migration process, the Record Detail component is removed from the page, replaced with fields and sections that you can configure and place anywhere you like.

        999 Extend Salesforce with Clicks, Not Code Break Up Your Record Details with Dynamic Forms

        If your record page supports the phone form factor, a “Record Detail - Mobile” component is added to your page as part of the migration. This new component is unique to Dynamic Forms. It displays the standard record detail fields and sections to your users when they view the page on a mobile device.

        SEE ALSO: Dynamic Forms and Mobile Break Up Your Record Details with Dynamic Forms

        Required and Read-Only Fields in Dynamic Forms

        Universally required fields retain their status when you’re working with them on a Dynamic EDITIONS Forms-based Lightning page. However, you can make other fields required or read-only just for the page you’re working on. Available in: Lightning A field set to Required in the field definition in the Object Manager is a universally required field. Experience Its Required value isn’t editable in the field’s properties in the Lightning App Builder property panel. Also, the read-only status of some standard fields—such as Created By, Last Modified By, Owner, Available in: Group, and Record Type—can’t be changed in the Lightning App Builder property panel. Professional, Enterprise, Performance, Unlimited, Fields marked as Required or Read-Only on a page layout retain that state when migrated into a and Developer Editions Dynamic Forms-based page. You can find all universally required fields for your page in the Universally Required Fields section of the Fields palette. Fields that you make required at the page layout level or in the Lightning App Builder property panel don’t appear in the Universally Required Fields section of the palette. If you set a field on a Lightning page to Required or Read-Only in the Lightning App Builder property panel, the behavior applies only to the field on that page, not all instances of the field.

        1000 Extend Salesforce with Clicks, Not Code Break Up Your Record Details with Dynamic Forms

        Be sure to include required fields on your Lightning pages. They aren’t added automatically. If there are required fields missing from the page, and the missing required fields don't have values, users can’t save a record after editing, creating, or cloning it. Don’t hide universally required fields with visibility filters.

        SEE ALSO: Break Up Your Record Details with Dynamic Forms Require Field Input to Ensure Data Quality Considerations for Universally Required Fields

        Dynamic Forms and Mobile

        The Dynamic Forms Field Section component and the Field components that go inside it are EDITIONS desktop-only. But your mobile users are still covered. The Record Detail - Mobile component gives your mobile users a way to see the record details on a Dynamic Forms-enabled page. Available in: Lightning When you migrate a record page that supports both desktop and phone to Dynamic Forms, a Experience Record Detail - Mobile component is added to the page for you. Available in: Group, But when you create a fresh page using a template that supports both desktop and phone, after Professional, Enterprise, adding the fields and field sections, you must add the Record Detail - Mobile component to the Performance, Unlimited, page yourself. and Developer Editions The Record Detail - Mobile component wraps fields from the Record Detail component into a mobile-only container. So, on pages that support both desktop and phone, your desktop users see the Field Section components, and your mobile users see the Record Detail - Mobile component.

        Example: Here’s what a page that you create in desktop mode in the Lightning App Builder looks like when viewed on a phone. The Field Section components just below the Highlights Panel on desktop are dropped on mobile, and the Record Detail - Mobile component takes over to deliver the sections and fields.

        1001 Extend Salesforce with Clicks, Not Code Break Up Your Record Details with Dynamic Forms

        The Record Detail - Mobile component displays with an “Unsupported form factor” message when viewed on a page in the Lightning App Builder in Desktop preview mode.

        SEE ALSO: Migrate a Record Page to Dynamic Forms Break Up Your Record Details with Dynamic Forms

        Dynamic Forms Tips and Considerations

        Keep these tips and considerations in mind when working with Dynamic Forms. EDITIONS

        General Considerations Available in: Lightning Experience • When you switch page templates on a page that uses Dynamic Forms, the list of available templates contains only the templates that are supported for your Dynamic Forms-enabled Available in: Group, page. Professional, Enterprise, • The Owner and Record Type fields get special handling in Dynamic Forms. They’re set to Performance, Unlimited, Read-Only, and that state isn’t editable in the properties pane. and Developer Editions • You can add more than one instance of the same field to a Lightning page, but all instances of that field on the page show the same data. • Programmatic versions of the accordion components don’t provide the same functionality as their App Builder counterparts. For example, lightning-accordion and lightning:accordion components don’t currently support lazy loading. • Expanding or collapsing a field section while designing a page has no effect on whether a section is expanded or collapsed for users during runtime. • When you clone a record based on a Dynamic Forms-enabled page that has visibility rules, all the fields referenced in the visibility rules are added to the cloned record, regardless of whether those fields are on the page. • When you save a new record with an empty custom object name, the API populates the custom object name field with the record ID. So make sure that the Name field is on the page and is marked as required.

        Visibility Rules and Dynamic Forms • If a field is hidden on a page due to a visibility rule, and a user edits the value of the field, its new or changed value isn’t saved. • Dependent picklist fields don’t respect visibility rules. Even if they have visibility rules assigned to them, dependent picklist fields still appear in the View All Dependencies list. • Component visibility rules on field sections behave differently than they do on fields. Visibility rules on fields are assessed dynamically. Changes a user makes while editing a record can make fields appear and disappear as visibility rules are evaluated. Visibility rules on field sections aren't dynamic and don't react to what a user does while editing. Field section visibility rules are evaluated only after the record is saved.

        Tips • We recommend not having both a Record Detail component and field sections on the same page. If you do, users can have issues with the page, including: – Multiple, overlapping save and cancel bars when both are on the page and both in inline edit. – Visibility rules on Field and Field Section components not working properly.

        1002 Extend Salesforce with Clicks, Not Code Break Up Your Record Details with Dynamic Forms

        – When users create, edit, or clone a record, the fields they see come from the Field Sections on the page, not from the Record Detail. – Field sections are top-down-left-right tab order only, while Record Detail is left-right-top-down tab order, which can cause confusion. As a result, fields inside a Field Section sometimes don’t line up horizontally, while Record Detail fields do.

        • Don’t place Field Section components on mobile-only Lightning pages. Field Section components are desktop-only and don’t appear when the page is viewed on a phone. • You can use one Lightning page for both desktop and phone. Add the Record Detail - Mobile component to the same page with your Field Section components. Your desktop users see the Field Section components, and your mobile users see the Record Detail - Mobile component.

        SEE ALSO: Dynamic Forms Limitations Dynamic Forms Known Issues Break Up Your Record Details with Dynamic Forms

        Dynamic Forms Limitations

        Keep these limitations in mind when working with Dynamic Forms. EDITIONS

        Limitations Available in: Lightning Experience • Dynamic Forms is supported on record pages for custom objects only. • Dynamic Forms doesn’t work in Internet Explorer 11. Users with IE 11 who try to view a page Available in: Group, that uses Dynamic Forms see a page with an error. Professional, Enterprise, • Dynamic Forms doesn’t work on pages based on pinned region templates and custom templates. Performance, Unlimited, and Developer Editions • Blank spaces aren’t supported. • You can add up to 100 fields per column in a Field Section component. • Only fields and sections containing fields are included when migrating a page to Dynamic Forms. Other elements on the page layout, such as custom links and blank spaces, aren't included. • If the page layout you choose to migrate has more fields and sections than we can handle, we migrate up to the first 100 sections in each region and the first 100 fields in each column. The rest of the fields are dropped, even if they’re required fields. You can manually add the dropped items later. If you change your mind after you make the switch, you can click the undo button ( ) to roll back the changes. • If you convert a section from two columns to one, the new single column can only hold 100 fields. If you had more than 100 fields total between the two columns, when you switch to a single column, the first 100 fields are moved into the single column, and the rest of the fields are dropped. If you change your mind after switching to single column, you can revert the change by immediately clicking the undo button ( ).

        1003 Extend Salesforce with Clicks, Not Code Break Up Your Record Details with Dynamic Forms

        • Users can expand or collapse field sections only while in view or inline edit mode, not in the full edit, create, or clone windows.

        SEE ALSO: Knowledge Article: Extended Support for Accessing Lightning Experience Using Microsoft Internet Explorer 11 Dynamic Forms Tips and Considerations Dynamic Forms Known Issues Break Up Your Record Details with Dynamic Forms

        Dynamic Forms Known Issues

        Keep these known issues in mind when working with Dynamic Forms. EDITIONS • Density settings for field sections aren’t respected in Lightning App Builder preview. Lightning App Builder preview always shows the Comfy setting for field sections. Proper density settings Available in: Lightning are applied during runtime. Experience • If you click View All Dependencies from the Path component, the dependencies that you see Available in: Group, come from the record details on the page layout, not from the Dynamic Forms fields on the Professional, Enterprise, page. Performance, Unlimited, • If you create a record from a lookup, the fields on the window that appears come from the and Developer Editions record details, not from the Dynamic Forms fields on the page. • The CurrencyISOCode field doesn’t display as required (with the asterisk) at runtime, although it still behaves as required. • When you hover over fields in the palette, the data types shown are inaccurate. • On a Dynamic Forms-based page, multiple instances of the same lookup field that look up to an object that’s not supported in the UI API result in a page error. See the User Interface API Developer Guide for the list of supported objects. • Fields in two-column Field Section components don’t horizontally align correctly. • For a non-UI API supported object that has a Forms-enabled object as a related list, if you click New from the related list, the parent lookup field doesn't appear in the New dialog. But you can save the new record. • A record’s printable view is based on the fields from its default page layout, not the fields on the Dynamic Forms-based page. • Dynamic Forms field components aren’t supported inside the Macro Builder. When a Dynamic Forms-enabled record page is opened inside of the Macro Builder, the field components don’t appear.

        Visibility Rule Known Issues with Dynamic Forms • Visibility rules based on parent object fields don’t work correctly. • When you clone a record based on a Dynamic Forms-enabled page that has visibility rules, all the fields referenced in the visibility rules are added to the cloned record, regardless of whether those fields are on the page. The field value used in the rule evaluation and the field’s saved value on the cloned record can vary, depending on the cloning user’s access to the field used in the visibility rule. – If the user has read and write access to the field used in the visibility rule, and the field has a value, the source record's original value is used in the rule evaluation and saved to the cloned record. – If the user has read and write access to the field used in the visibility rule, and the field has no value, the source record's blank value is used in the rule evaluation, but the cloned record saves with the field’s default value. – If the user has only read access to the field used in the visibility rule, the source record's original value is used in the rule evaluation, but the cloned record saves with the field’s default value.

        1004 Extend Salesforce with Clicks, Not Code Dynamic Interactions in the Lightning App Builder

        – If the user doesn’t have read or write access to the field used in the visibility rule, the source value is treated as blank, and the cloned record saves with the field’s default value.

        SEE ALSO: Dynamic Forms Tips and Considerations Dynamic Forms Limitations Break Up Your Record Details with Dynamic Forms

        Dynamic Interactions in the Lightning App Builder

        Dynamic Interactions is part of our continuing drive to make Lightning pages more dynamic and EDITIONS interactive. With Dynamic Interactions, an event occurring in one component on a Lightning page, such as the user clicking an item in a list view, can update other components on the page. Dynamic Available in: Lightning Interactions lets admins create applications with components that communicate and transform Experience based on user interactions, all in the Lightning App Builder UI. It unlocks capabilities that previously were reserved only for developers. Available in: Group, To get the most out of Dynamic Interactions, admins and developers work together. Professional, Enterprise, Performance, Unlimited, Developers write custom components that power the Dynamic Interactions. The developer defines and Developer Editions the events that the component supports and then exposes the events in the Lightning App Builder UI. Then, in the Lightning App Builder, an admin configures the event by setting up the interactions between the components. Dynamic Interactions has four major building blocks. • Event—Anything that can trigger an interaction, such as a mouse click, a button press, or a change in a field’s value. • Interaction—An activity that happens between the source and the target. • Source—The item triggering the event. Currently, only custom Lightning web components and the Dynamic Actions Bar component (Pilot) on page 969 are supported as sources. • Target—The item that’s the target of the interaction. Any component on a Lightning page can be a target. An event occurring in one component (the source) can trigger changes in one or more other components on the page (the targets). A single source can have multiple targets.

        Note: Dynamic Interactions is supported only on app pages, and interactions are limited to activity between components.

        Example: Kai (they/them) and Rina (she/her) are an admin and developer team. Kai wants to give their on-the-go users an easy way to check the location of various accounts so that they can plan efficient site visits using a simple app page. Kai enlists Rina’s help to make this happen. As a developer, Rina knows that she can wire up events between components using code. But she wants to give Kai the power to configure the event interactions in the way that they need to without having to come back to her every time a change is necessary. Rina creates a custom source component for Kai, plus two other components to act as event targets. After installing the new components in their org, Kai has an app page with three custom components: Account List, Account Detail, and Account Location (a map).

        1005 Extend Salesforce with Clicks, Not Code Dynamic Interactions in the Lightning App Builder

        The source component is the Account List on the left. It has an Item Selected event enabled, which Rina exposed to the Lightning App Builder UI using new Dynamic Interactions code. After Kai finishes configuring the event interactions, when a user clicks a list item in the Account List component, the event fires. The Account Detail component updates to show that account’s details. At the same time, the Account Location component pinpoints that account’s location on a map. Every new click or tap on an account in the list results in updating the content in the other two components.

        SEE ALSO: Lightning Web Components Dev Guide: Configure a Component for Dynamic Interactions in the Lightning App Builder Lightning Web Components Dev Guide: XML Configuration File Elements

        1006 Extend Salesforce with Clicks, Not Code Dynamic Interactions in the Lightning App Builder

        Configure Interactions in the Lightning App Builder

        After you have a custom source component with exposed events in your org, you can assign event EDITIONS targets and configure the event interactions in the Lightning App Builder. 1. From Setup, in the Quick Find box, enter App Builder, then select Lightning App Builder. Available in: Lightning Experience 2. Edit an existing app page, or click New to create one. 3. In the Lightning App Builder, add a custom source component to your page. Available in: Group, If you don’t have target components on your page, add those too. Professional, Enterprise, Performance, Unlimited, 4. Click the source component on the canvas. and Developer Editions 5. In the properties pane, click the Interactions tab. 6. Under the desired event, click Add Interaction. USER PERMISSIONS The properties pane changes to show you the interaction details. To create and save Lightning 7. Select an interaction. pages in the Lightning App Currently, the only interaction available is Update Properties. Builder: • Customize Application 8. Select the target component for the interaction. To view Lightning pages in Components are listed with their region location to help you select the correct component the Lightning App Builder: when you work on pages with components spread across multiple regions. • View Setup and Configuration

        9. Configure the target component properties. When you select a target component, its properties appear in the Interaction Details pane. There you define the value that you want each target property to have when the interaction happens. If you leave a target property blank, its value remains unchanged when the event triggers. To use an expression to define a target property value dynamically, click . Checkbox properties have a No change option. If you’ve changed the value of a checkbox property, use this option to reset it back to its original value, and to indicate that you want its value to remain unchanged when the event triggers.

        10. Save the page.

        SEE ALSO: Dynamic Interactions in the Lightning App Builder Dynamic Interactions Considerations

        1007 Extend Salesforce with Clicks, Not Code Dynamic Interactions in the Lightning App Builder

        Expressions in Dynamic Interactions Target Properties

        An expression is a small chunk of code that can be evaluated to a value. It can be as literal and EDITIONS simple as 1+1 or a more complex combination of variables, operators, and functions. One expression is supported for Dynamic Interactions in the Lightning App Builder: Available in: Lightning {!Event.eventPropertyName}. You can use this expression when setting target Experience component property values in the Lightning App Builder UI and in Metadata API. The value of the eventPropertyName part of the expression varies based on which properties the developer Available in: Group, makes available for the event in the source component. Professional, Enterprise, Performance, Unlimited, Note: If you see the button on a target property, you can set its value with an expression. and Developer Editions With an expression, you can pass a value, such as a record ID or an API name, to the target item. Then when the event fires, the target item can use that value. Using an expression to define a property value makes the event interaction dynamic. We can illustrate this with an example of an app page with custom Account List and Account Location components. Here, an admin is configuring an interaction between the Account List source component and the Account Location target component.

        The goal for the interaction in this example is that when a user clicks an account in the list, the Account Location component updates to show the selected account’s location as a point on a map. But the Account Location component needs to know the record ID of the selected account to do that. Passing the record ID into the Account Location component tells the component which record to look at to pull the address information. In this case, the developer made the recId property available as part of the event, so the target value can be set to the active list item’s record ID using the {!Event.recId} expression.

        1008 Extend Salesforce with Clicks, Not Code Dynamic Interactions in the Lightning App Builder

        Why not enter a 15- or 18-digit record ID into the field? If you do, any item clicked in the Account List always resolves to that one record ID, which isn’t dynamic and is incorrect. If the developer makes more than one target property available, you can set the property to be passed in by starting to type the expression in the field. After the period, you can use autocomplete to select which property to use in the expression. But don’t forget to add the ending bracket } after you make your selection.

        Note: Expression autocomplete doesn’t work when: • Using expressions in the rich text editor • Typing an expression in a text field without first clicking the expression button ( )

        SEE ALSO: Configure Interactions in the Lightning App Builder Dynamic Interactions Limits and Limitations Dynamic Interactions in the Lightning App Builder

        Dynamic Interactions Considerations

        Keep these considerations in mind when working with Dynamic Interactions. EDITIONS • Informational components within target components are ignored when the target component’s properties are shown in the Event property editor. Available in: Lightning • If you switch page templates for a page that contains Dynamic Interactions, the available Experience template list shows only templates that support Dynamic Interactions. Available in: Group, • Aura components re-render when an interaction targeting them is triggered. Professional, Enterprise, • Autocomplete doesn’t work when entering an expression in the rich text editor. Performance, Unlimited, and Developer Editions

        1009 Extend Salesforce with Clicks, Not Code Guidance for App Builder

        • After a component’s event metadata is used on a Lightning page or released as part of a managed package, certain breaking changes aren’t allowed, such as removing the event, renaming a property, or changing a property type.

        Dynamic Interactions Limits and Limitations

        Keep these considerations in mind when working with Dynamic Interactions in the Lightning App EDITIONS Builder. • Dynamic Interactions is supported only on app pages. Available in: Lightning • Only LWC custom components can be source components, but any component present on Experience the page (Aura or LWC) can be a target. Available in: Group, • Dynamic Interactions isn’t supported on pages based on custom page templates. Professional, Enterprise, • Only String and Rich Text type properties can use expressions to define their values. Performance, Unlimited, • The “required” property restriction isn’t respected when defining a new value for a target and Developer Editions property in Dynamic Interactions, regardless of its type or whether it’s defined with an expression. • Event is the only context supported for expressions in interactions. • You can use expressions only for properties of type String, Integer, and Boolean. • You can’t set a target property value as an array or list of values, such as a multi-select picklist. • You can set a target property value of a String attribute to empty or a Boolean attribute to false using Metadata API but not in the Lightning App Builder UI. • Dynamic Interactions doesn’t work in the Mobile Only app in the Salesforce mobile app or in the legacy tablet mobile experience. • When a dependent property is autopopulated with a value based on a selection you made or a value you entered in another property, the autopopulated value isn’t saved unless you “touch” the dependent property field by clicking into it or tabbing to it.

        Guidance for App Builder

        Get suggestions for improving your Lightning pages just when you need them. Guidance for App EDITIONS Builder gives you feedback for enhancing your Lightning pages right in the design phase, via tips in a docked prompt. Available in: Lightning Tips are available for categories such as performance, usability, and structural issues. Some issues Experience that the tips cover are also captured in the Salesforce Optimizer report. For example, if two components on a page are identical, you see a tip that tells you so. After you fix the issue, the tip Available in: Group disappears. Essentials, Professional, Enterprise, Performance, Unlimited, and Developer Editions

        1010 Extend Salesforce with Clicks, Not Code Guidance for App Builder

        If there are tips available for your page, you see an indicator icon on the Help menu. To hide the tips docked prompt while you design your page, go to the Help menu and select Mute Tips. You can reopen the tips prompt by selecting View Tips.

        SEE ALSO: Lightning App Builder Considerations Salesforce Help: Improve Your Implementation with Salesforce Optimizer

        1011 Extend Salesforce with Clicks, Not Code Lightning Page Performance

        Lightning Page Performance

        Several factors can negatively affect your Lightning page’s performance at runtime. For example, EDITIONS your users can run into page performance issues if they aren’t using the latest version of a Salesforce recommended browser to view the page. Some factors you can control, and others you can’t. Here Lightning App Builder are some ways you can improve performance while configuring your page in the Lightning App available in: both Salesforce Builder. Classic and Lightning Consider the number, type, and placement of components on the page. These design-related issues Experience can cause a page to load slowly: Lightning Home and utility • Too many components visible on page load bar pages available in: • Too many heavy-impact related lists visible, especially those lists with multiple-object Lightning Experience relationships Lightning app and record • Too many fields in your Record Detail component pages available in: both the Salesforce mobile app and • Having the News or Twitter component visible Lightning Experience If your page falls into one or more of these categories, we recommend that you move some components into a non-default tab or Accordion component section, unless you’re designing the Email application pane page for blind or low-vision users. For the heavy-impact related lists, we recommend that you move pages available in: both the related lists lower on their respective page layouts so that they aren’t part of the initial page Salesforce Classic and Lightning Experience load. If your Record Detail component has many fields, we recommend that you reduce the fields on Available in: Group your page layout to fewer than 60. Alternatively, move the Record Detail component into a Essentials, Professional, non-default tab or Accordion section so that it’s not part of the initial page load. Enterprise, Performance, Unlimited, and Developer For pages that are viewed on a phone, we recommend a maximum of eight visible components Editions per page. If a page has more than eight, put some in a tab or Accordion section or hide them for mobile with a visibility filter. You can see how your pages are performing in the Lightning Usage App from the App Launcher. It shows you the most used pages in your org and their page load time by browser or by page. Performance Analysis for App Builder automatically runs when you build a page. If your page performance is poor or moderate, recommendations to improve performance appear. You can manually check a Lightning record page’s runtime performance at any time by clicking Analyze from the Lightning App Builder toolbar. It assesses page performance based on all visible standard and custom components on the page. Components in nondefault tabs and Accordion sections aren’t analyzed. The User Metrics card provides 90 days of your org’s user data such as browser speeds, network latency, and number of cores. Use this information to help you decide which Performance Analysis for App Builder recommendations to take.

        Note: Salesforce measures performance in Experienced Page Time (EPT). The page load time mentioned here and in the Performance Analysis for App Builder tool is EPT.

        Considerations • If a page has more than 5 related lists or more than 25 fields in the record detail, users can encounter performance issues when viewing the page in the Salesforce mobile app. • In the Performance Analysis for App Builder tool: – Components that are restricted to the desktop form factor via a visibility rule aren’t included in the phone form factor performance assessment. – Analysis of page performance on a phone is available only on pages whose template supports the phone form factor.

        1012 Extend Salesforce with Clicks, Not Code Lightning App Builder Considerations

        – Components aren't the only factors influencing page load time, so the numbers in the component impact chart don't add up to 100% of the predicted page load time. – Analysis of pages for the desktop form factor is measured in seconds. For the phone form factor, the page is scored based on the components that are visible when the page loads on a phone. – User metrics are org-specific or page-specific data. Previously activated pages display metrics from visits to that page. New pages display metrics from visits to all org pages. Metrics displayed in a sandbox can differ from metrics in production.

        SEE ALSO: Supported Browsers and Devices Technical Requirements and Performance Best Practices Measure Performance for Your Salesforce Org Get Lightning Experience Adoption Insights with the Lightning Usage App

        Lightning App Builder Considerations

        Keep these considerations in mind when working with Lightning pages and Lightning apps in the EDITIONS Lightning App Builder. Lightning App Builder General available in: both Salesforce Classic and Lightning • The Lightning App Builder supports the same browsers as Lightning Experience and isn’t Experience supported on mobile browsers. The minimum recommended resolution for the Lightning App Lightning Home and utility Builder is 1280x1024. bar pages available in: • To reduce user confusion, give each tab and Accordion section a unique label. Lightning Experience • The Lightning App Builder palette displays only the components that are available for the Lightning app and record devices supported by the page template. For example, you’re working on a page whose template pages available in: both the supports only desktop, the component palette contains components that support desktop, Salesforce mobile app and whether they support desktop only or both desktop and phone. Lightning Experience • When you open a record page in the Lightning App Builder, you see only the components that are available for the object tied to that page. For person account pages, some of the components Email application pane pages available in: both you see apply only to business accounts. Salesforce Classic and • When viewing a page in the Lightning App Builder, the form factor switcher displays only the Lightning Experience devices that the page template supports. • If the Lightning App Builder canvas view is switched to a form factor that a component on the Available in: Group page doesn’t support, that component displays as a placeholder with a warning. Essentials, Professional, Enterprise, Performance, • When a component is viewed on a device that the component doesn’t support, it’s dropped Unlimited, and Developer from the page. Editions • If you’re curious about a component, click it to see more information in the properties pane. • You can create and edit a record page even if you don’t have permission to access the object that the page is associated with. You can add, remove, delete, and reconfigure components on the page, but you don’t see any of the content for the components that are based on that object. • In Salesforce Classic, Lightning page tabs don’t display on the All Tabs page when you click . Lightning page tabs also don’t appear in the Available Tabs list when you customize the tabs for your apps.

        1013 Extend Salesforce with Clicks, Not Code Lightning App Builder Considerations

        • When editing navigation items in a Lightning app, consider how many items you include. Users can’t remove the items you include in the navigation bar, and they can’t personalize the navigation bar when it contains more than 50 items. For example, if you include 32 items in an app’s navigation bar, users can add 18 more personal items. Users can personalize the navigation to add or move items, but users can't remove or rename the items that you add. • Put the activity timeline component at the bottom of a layout, with no other components beneath it. • On Lightning Experience record pages, a Record Detail component that contains more than four external lookup fields breaks the page at runtime.

        Page Templates • The Three Regions template and the pinned region templates are designed with Lightning console apps in mind. They feature a main region and two sidebars with fixed proportional widths. The main region is 50%, and the side region widths are each 25%. Three-region templates require more screen width to display correctly. Three-region templates can display incorrectly on certain devices or monitors with low resolutions. • When switching page templates, if a region in the template that you’re switching to has more than 25 components mapped to it, all components after the 25th are dropped from the page. You can proceed with the template swap, but you must then manually add the dropped components from the palette and reconfigure their properties. • The console pinned region templates let users view and work with records while navigating subtabs in console apps. These templates also work in apps with standard navigation. However, we recommend that you use a non-pinned region template in standard apps because those apps don’t benefit from a pinned region. When working with pinned region templates, keep the following in mind. – The templates are available only for record pages. – Pinned regions don’t support theming. For example, if you use custom theming to brand your app with the color green, the pinned region doesn’t apply the green color.

        Page Activation and Assignment • If a device isn’t on the options list when you try to assign a Lightning page as the org default, the page template doesn’t support it. • You can see which record pages are activated for which Lightning app and which form factor in the Lightning Record Pages related list in the Object Manager. • If you no longer want a page to be an app or org default, redo the activation process for the page, and select the option to remove it as the default. • If you activate a page and then return to make changes, you don’t have to activate it again. Clicking Save after you make your edits pushes the changes to your users. • If you no longer want a page assigned to a particular form factor, redo the activation process, and select the option to remove it. • If you activate a page for only one form factor, you can add support for another form factor later as long as the page’s template supports it. • Changes that you make to Lightning record page assignments aren’t immediately reflected in the Salesforce mobile app. To see a newly assigned record page, close and restart the Salesforce mobile app. • If there are no custom app-level page assignments set for the Service Console or Lightning Sales Console apps, users viewing those apps in the Salesforce mobile app see the org default record page assigned to the object instead of the system app default record page. • If you assign a custom record page as the org-wide default for an object, it becomes the default page for that object across all your Lightning apps. It also appears as the default record page for that object in Classic apps when you open them in Lightning Experience. • Accounts and person accounts have different standard default pages to begin with. However, when you create a Lightning page for accounts and assign it as the default for an org or an app, that page becomes the org or app default for business accounts and

        1014 Extend Salesforce with Clicks, Not Code Considerations and Limitations for Flows in Lightning Pages

        person accounts. To display a custom record page for person accounts, create a custom account record page, then assign it to the person account record type.

        Component Visibility Rules • If a visibility filter assigns a component to “Device equals desktop,” the component appears on a page when viewed in Lightning Experience on a desktop and when viewed in a browser on an iPad. • The Salesforce mobile app on an iPad uses the phone form factor. Salesforce viewed in a browser on an iPad uses the desktop form factor. These form factors affect components on record pages differently. – If the visibility filter is “Device not equal to desktop” or “Device equals phone,” the component appears on record pages in the Salesforce mobile app on a phone and an iPad. It doesn’t appear on pages viewed in a browser on an iPad. – If the visibility filter is “Device not equal to phone,” the component appears on record pages in Lightning Experience on a desktop and on pages viewed in a browser on an iPad. It doesn’t appear in the Salesforce mobile app on a phone or an iPad.

        Pages and Packages • If you package a Lightning page that references protected labels, then if a subscriber org clones that page, the protected labels cause the components that use them on the cloned page to be invalid. • A Lightning page installed from a managed package appears in the Lightning pages list with a Clone option rather than Edit or Delete. The Edit and Delete buttons are also replaced with Clone on the installed page’s detail page.

        SEE ALSO: Create and Configure Lightning Experience Record Pages Lightning App Builder Limits and Limitations Supported Browsers and Devices

        Considerations and Limitations for Flows in Lightning Pages

        Here are some things to keep in mind when you add a flow component to a Lightning page. EDITIONS Lightning pages always use Lightning runtime, so also review Limitations of Lightning Runtime for Flows. Available in: both Salesforce Classic and Lightning Running Flows from a Lightning Page Experience When a user opens a Lightning page that has a flow component, the flow runs when the page loads. Make sure that the flow doesn’t perform any actions – such as create or delete records Available in: Essentials, – before the first screen. Professional, Enterprise, Performance, Unlimited, Input Variable Limitations and Developer Editions • These variables aren’t supported. – Collection variables – Record variables – Record collection variables

        • The component supports only manually entered values for input variables. • Text input variables accept a maximum length of 4,000 characters.

        1015 Extend Salesforce with Clicks, Not Code Lightning App Builder Limits and Limitations

        Deployment Considerations Change sets and the Metadata API deploy all flows as inactive, which users can’t run. If you deploy a Lightning page (known as FlexiPage in the API) that contains a flow component, make sure to activate the flow.

        Lightning App Builder Limits and Limitations

        Keep these limits and limitations in mind when working with Lightning pages and Lightning apps EDITIONS in the Lightning App Builder. • In Salesforce Classic, the Default On and Default Off options for Lightning page tabs don’t work Lightning App Builder the same way as for other custom tabs. The Lightning page menu item appears for the selected available in: both Salesforce profiles in Salesforce for Android, Salesforce for iOS, and Salesforce mobile web whether you Classic and Lightning choose Default On or Default Off. Select the Tab Hidden option to hide the Lightning page Experience for the selected profiles. Lightning Home and utility • You can place up to 100 tabs in a Tabs component. bar pages available in: • A Lightning page region can contain up to 100 components. Lightning Experience • Lightning component global actions aren’t supported for app pages. Lightning app and record • Page overrides by profile aren’t supported in packaging. They are supported in change sets, pages available in: both the but have to be added manually. Salesforce mobile app and Lightning Experience • Dropdown menus in the Lightning App Builder can display up to 200 items. Enter a few characters, and all available matches are displayed as you type. Email application pane • Although you can add the Potential Duplicates component to person account pages, the pages available in: both Salesforce Classic and component doesn’t display duplicate person accounts. Lightning Experience • Custom tab labels in the Tabs component—including those installed from packages—aren’t translated. For example, if you create a custom Goals tab in English, then view the page as a Available in: Group user whose language is set to French, the tab still displays as Goals. However, you can use the Essentials, Professional, {!$Label.customLabelName} expression in a component label or attribute to represent Enterprise, Performance, a custom label that you create in Setup using the custom label feature. For more information, Unlimited, and Developer see “Build Localized Component Labels and Attribute Values on Lightning Pages with Custom Editions Labels on page 979.”

        Component Visibility Rules • A component can have up to 10 filters. • Visibility filters aren’t supported for individual tabs inside the Tabs component. • Some person account fields, including Email and Mobile, can’t be used in filters.

        SEE ALSO: Lightning App Builder Considerations

        Resources for the Point & Click Administrator

        In addition to online help, Salesforce creates guides and tip sheets to help you learn about our features and successfully administer Salesforce.

        1016 Extend Salesforce with Clicks, Not Code Resources for the Point & Click Administrator

        Platform and Apps

        Guides and Tip Sheets For End Users For Admins Implementing State and Country/Territory Picklists

        Useful Workflow Rules

        Useful Approval Processes

        Salesforce Sites Implementation Guide

        Formulas

        Guides and Tip Sheets For End Users For Admins Useful Formula Fields

        Tips for Reducing Formula Size

        Using Date and Date/Time in Formulas

        Useful Validation Rules

        1017 INDEX

        C N clickjack protection Notification Builder 461 Site.com 528 Custom fields P references 242 Prompts 57, 63, 68, 70, 72–73, 75, 77 Custom Help 93 S I Site.com In-App Guidance 57 clickjacking 528

        1018