How to Use Dynamic Forms in Lightning

Salesforce
EmpowerCodes
Oct 29, 2025

Salesforce has continuously evolved its Lightning Experience to make user interfaces more intuitive, flexible, and efficient. One of the most powerful features that transformed how record pages are built is Dynamic Forms. Introduced to simplify page layouts and provide a personalized user experience, Dynamic Forms allow Salesforce Admins to configure field visibility, group fields into sections, and create context-driven forms — all without writing a single line of code.

In this comprehensive guide, we’ll walk through how to use Dynamic Forms in Lightning, explore their benefits, setup process, real-world use cases, and best practices for 2025 and beyond.

What Are Dynamic Forms in Salesforce?

Dynamic Forms let you customize the layout of record detail pages in the Lightning App Builder. Instead of relying solely on traditional page layouts, you can use the Field Section and Field Components to place specific fields or sections anywhere on the page.

This gives admins the power to control field visibility, conditional rendering, and field grouping, making record pages more personalized and efficient for different user roles.

For example, you can show certain fields only when the “Opportunity Stage” equals “Closed Won,” or hide sensitive fields from users who don’t need to see them.

Why Salesforce Introduced Dynamic Forms

Before Dynamic Forms, Salesforce page customization relied heavily on:

  • Standard page layouts, which were static and applied organization-wide.

  • Record types combined with multiple layouts to control field visibility.

This approach worked but led to maintenance headaches. Managing dozens of layouts for various profiles was time-consuming and inefficient.

Dynamic Forms solve these problems by offering:

  • Component-based layout flexibility.

  • Field-level visibility control.

  • Reduced dependency on multiple page layouts.

Benefits of Using Dynamic Forms

Dynamic Forms are a game-changer for Salesforce Admins, Developers, and end users alike.

1. Personalized User Experience

Show only relevant fields based on the user’s role, record type, or data context. For example, a sales rep may see deal-related fields, while a finance user views only billing information.

2. Fewer Page Layouts to Maintain

Eliminate the need to create multiple layouts for different profiles. Instead, define visibility rules directly within the Lightning record page.

3. Better Page Performance

Since only visible fields are loaded, page load times improve significantly — especially for records with large numbers of fields.

4. Improved Admin Efficiency

Admins can drag and drop fields directly in the Lightning App Builder without switching to the traditional layout editor.

5. Enhanced Flexibility

You can place field sections alongside charts, related lists, or custom components, offering a unified view for users.

Supported Objects for Dynamic Forms

Dynamic Forms were initially available only for custom objects, but Salesforce has since expanded support.

As of 2025, Dynamic Forms are supported for:

  • Custom Objects

  • Standard Objects:

    • Account

    • Contact

    • Opportunity

    • Lead

    • Case

Salesforce continues to roll out support for additional standard objects with every release, so it’s worth keeping an eye on new updates.

Setting Up Dynamic Forms in Lightning

Setting up Dynamic Forms is simple and intuitive. Here’s how to do it step-by-step.

Step 1: Open Lightning App Builder

  1. Navigate to Setup → Object Manager.

  2. Select the object you want to customize (e.g., Account).

  3. Go to Lightning Record Pages and click Edit (or New Page to start fresh).

Step 2: Enable Dynamic Forms

If Dynamic Forms are supported for your object, you’ll see an option to “Upgrade Record Detail” in the Lightning App Builder.

  1. Click Upgrade Now.

  2. Choose Create Fields Section to replace the existing “Record Detail” component.

  3. Salesforce automatically converts your layout into field sections.

Step 3: Add Field Sections and Fields

  1. From the Components Panel, drag Field Section onto the page.

  2. Inside each section, add fields using the Fields component.

  3. Rename sections (e.g., “Customer Details,” “Payment Info,” “Contract Data”) for clarity.

Step 4: Configure Field Visibility Rules

Dynamic Forms allow conditional visibility based on logic.
For example:

  • Show “Discount Field” only if Stage = Negotiation.

  • Display “Billing Address” only when Account Type = Customer.

To set this up:

  1. Click a field or section.

  2. In the right panel, click Add Filter under “Set Visibility.”

  3. Define conditions using field values, record type, or user permissions.

Step 5: Save and Activate the Page

  1. Click Save once your configuration is complete.

  2. Use Activation Settings to assign the page as the default for specific apps, profiles, or record types.

Once activated, users will immediately experience the new Dynamic Form layout.

Example: Dynamic Form for Opportunity Object

Imagine you’re configuring an Opportunity record page for your sales team.

Goal: Show different field sections based on the stage of the deal.

Configuration:

  • Section 1: Basic Info – Always visible (Opportunity Name, Owner, Amount).

  • Section 2: Negotiation Details – Visible only when Stage = “Negotiation/Review.”

  • Section 3: Closed Deal Info – Appears only when Stage = “Closed Won.”

This setup ensures that users only see relevant information at each stage, improving productivity and reducing clutter.

Best Practices for Using Dynamic Forms

To get the most out of Dynamic Forms, follow these best practices:

1. Keep It Simple

Avoid adding too many conditional rules on one page. Over-complex visibility logic can confuse users and impact performance.

2. Group Related Fields

Organize fields into meaningful sections, such as “Contact Information,” “Billing Details,” and “Preferences,” to enhance readability.

3. Use Consistent Naming

When naming sections and fields, use clear, standardized titles so users can easily navigate the page.

4. Test Across Profiles

Dynamic Forms can behave differently for users with different permissions. Always test across various profiles before deployment.

5. Monitor Performance

Although Dynamic Forms improve load speed, excessive components or logic can slow down rendering. Use the Lightning Page Analysis Tool to check performance metrics.

6. Combine with Dynamic Actions

Dynamic Forms work beautifully with Dynamic Actions, allowing you to control button visibility (e.g., “Approve,” “Convert”) based on conditions.

7. Use Compact Layouts for Key Fields

For fields users need to see at a glance, configure Compact Layouts to display key details at the top of the record page.

Limitations of Dynamic Forms

While powerful, Dynamic Forms still have some limitations as of 2025:

  • Not all standard objects are supported yet.

  • Field-level security still applies — Dynamic Forms can’t override permissions.

  • Not supported on mobile for all configurations (check Salesforce release notes).

  • Related Lists still require separate components.

Salesforce continues to enhance support and functionality in each release, so expect these limitations to reduce over time.

Real-World Use Cases

1. Role-Based Record Views

A sales manager sees fields related to team performance and discounts, while a finance user sees invoicing and payment terms — all on the same record page.

2. Industry-Specific Forms

For a healthcare company, patient-related fields can be dynamically displayed based on record type (Inpatient vs. Outpatient).

3. Approval-Stage Visibility

In a case management system, additional fields like “Manager Comments” or “Resolution Summary” only appear when the case moves to specific statuses.

4. Simplified Onboarding

New users can be guided through simplified forms that gradually reveal additional fields as they progress.

Advanced Features to Explore

1. Dynamic Forms with Record Types

Combine record types and Dynamic Forms to display entirely different field groups for specific business processes.

2. Integration with Conditional Components

Use visibility filters not just for fields but also for charts, related lists, and custom Lightning components for a fully dynamic page.

3. Dynamic Forms for Mobile (Beta)

Salesforce continues to enhance mobile compatibility, allowing users to access personalized record views on the go.

Troubleshooting Common Issues

  • Dynamic Form Not Appearing: Ensure the object supports it and that you’re editing a Lightning Record Page (not a Classic layout).

  • Missing Fields: Some fields may be excluded due to FLS (Field-Level Security) or field dependencies.

  • Slow Page Load: Review page analysis and reduce unnecessary components.

Future of Dynamic Forms

As Salesforce continues to unify the user experience, expect:

  • Full support for all standard objects.

  • Real-time field updates via Reactive Screens.

  • Smarter AI-driven field visibility based on usage analytics.

Dynamic Forms will soon become the standard for page design, replacing traditional layouts entirely.

Conclusion

Dynamic Forms mark a major leap forward in how Salesforce Admins design and manage record pages. With their flexibility, personalization options, and conditional visibility, they empower organizations to deliver cleaner, faster, and more intuitive user experiences.

Whether you’re building for sales, service, or operations, mastering Dynamic Forms ensures your Salesforce environment remains modern, efficient, and aligned with your business goals.

Start small, experiment with conditional logic, and watch your Lightning pages transform into truly dynamic and user-centric experiences.