Skip to main content
A Trailblazer Community está no Slack! Receba respostas mais rapidamente, conecte-se com outros Trailblazers e aprenda com especialistas. Participe da comunidade

Customize UI Components and Field Mappings

Learning Objectives

After completing this unit, you’ll be able to:

  • Describe the role of editors and renderers.
  • Assign custom Lightning web components to Editor and Renderer roles.
  • Determine when to customize UI components, including when to use automatic or manual field mapping.

The Power of Custom UI Components

A powerful feature of Lightning types is the ability to customize the user experience. This is done in the UI Configuration tab, where you assign specific Lightning web components to act as the editor and renderer. When configuring an editor or renderer, you select from your organization’s available Lightning components. Search for the component by name, review its properties, and confirm it’s appropriate for the specific role of input or output.

Editors: Controlling Data Input

The editor controls which component users interact with to enter or modify data. By default, Lightning types use standard input components, but you can override this setting to point to a custom Lightning web component that provides:

  • Branded styling that matches your organization’s design system
  • Specialized input controls (sliders, date pickers, rich text editors)
  • Dynamic behavior based on user input
  • Client-side validation and user guidance

Renderers: Displaying Data Output

The renderer manages which component displays the data as output. Configuring a custom Lightning web component as the renderer allows you to:

  • Format data for optimal readability.
  • Add visual elements like icons, badges, or progress indicators.
  • Create responsive layouts for different screen sizes.
  • Implement interactive displays.

Understanding Field Mappings

Field mappings are the bridge between your schema definition and your Lightning web components. They define how data flows from the backend schema to the frontend components and back again. Proper field mapping ensures seamless data exchange and prevents data loss or corruption.

Automatic Field Mapping: The Easy Path

The simplest and most reliable approach to field mapping is automatic mapping. When a field in your Lightning component has the exact same name as a field in your schema, the system automatically links them. No configuration required, no room for error.

Example of Automatic Mapping

Schema Field

Lightning Component Field

customerEmail

customerEmail

Result: Automatically linked

This is why consistent naming conventions are so important. When you design your schema and build your components with matching field names, field mapping becomes effortless.

Manual Field Mapping: When Names Differ

Manual mapping is necessary when field names don’t match between your schema and components. This situation arises when:

  • You integrate with the components that use different naming conventions.
  • You need to map legacy field names to modern conventions.

Example Requiring Manual Mapping

Schema Field

Lightning Component Field

customerEmail

email

Result: Requires manual mapping to connect them

The Field Mapping Interface

The field mapping interface provides a visual way to connect schema fields with component fields. You’ll see your schema fields on one side and your component fields on the other, and you create explicit connections between related fields. The system tracks these mappings and applies them during data exchange.

You now know how to assign custom editors and renderers to control the UI experience and how field mappings connect your schema to components. In the final unit, you apply these concepts hands-on by building a complete Lightning type for Agentforce Employee agent in Lightning Experience.

Resources

Compartilhe seu feedback do Trailhead usando a Ajuda do Salesforce.

Queremos saber sobre sua experiência com o Trailhead. Agora você pode acessar o novo formulário de feedback, a qualquer momento, no site Ajuda do Salesforce.

Saiba mais Continue compartilhando feedback