Skip to main content

Dynamic Forms on Salesforce Standard Objects

In the latest release Salesforce finally let us to migrate fields and sections from page layout to any place on the record page as individual components. This of course means, that you can set visibility of those fields and sections individually. Unfortunately it all works on Custom Objects only… Or not? Though Dynamic Forms really work just on Custom Objects, I will show you easy workaround for Standard Objects.

In the tutorial we will display Shipping Address on Account in the right region aside from the rest of the record. To accomplish this we will use Lightning App Builder to create new Record Page for Contact object and quick action to create custom section layout. For this interesting idea I would like to thank my colleague Emma Peeters, who introduced the workaround on my recent project.

Update Account page layout

First we will remove the Shipping Address Section from Page Layout on Account Object.

  1. Go to Object ManagerAccountPage LayoutsAccount Layout and remove Shipping Address altogether.

Create Quick Action

This is the core of our workaround. We will use quick action to create layout from fields we want to display in separate component. When we are done, we will just place it on Record Page.

  1. Go to Object ManagerAccountButton, Links and Actions
  2. Create New Action
    • Action Type: Update a record
    • Standard Label Type: None
    • Label: Shipping Address
    • Name: ShippingAddress
  3. 3. Place Shipping Address on the layout

Create Record Page in Lightning App Builder

We’ve created our “Dynamic Form” as a Quick Action and now we need to display it. For the purpose of our tutorial, we will use right column.

  1. Open any Account
  2. Click on the Gear icon in the top right corner and select Edit Page
  3. Search for Related Record in the Standard Component List
  4. Add the component to the right region and configure it
    • Header Label: Shipping Address
    • Lookup Field: Use This Account
    • Update Action: Shipping Address
    • Create Action: Empty

Our job is done! Make it useful now and never discuss this (or anything else) on the Clubhouse.

Comments

  1. This also works for communities ??
    Can we configure same for communities?
    I want display specific section for based on drop down picklist .using above case it could possible by setting component visibility based on drop down picklist value.
    But not able to do same for communities /Do you have any suggestion??

    TIA

    ReplyDelete
    Replies
    1. Hello, sorry for late reply. In communities your hands are definitely tied. The only solution to cover both requirements are to build custom LWC. You simply take lightning-record-form component and wrap it into the component, that would expose: a) API names of the fields to be displayed b) number of columns c) conditions, when the block should be displayed.

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. HI Jain,

    This is Not working in case of Lookup Fields( In community).
    Lookup Fields show the record Id value not the name of record.

    ReplyDelete
  4. Excellent article and with lots of information. I really learned a lot here. Do share more like this.
    Salesforce Training in Chennai
    Salesforce Training Online
    Salesforce Institute in Bangalore

    ReplyDelete
  5. Nice article, its very informative content..thanks for sharing...Waiting for the next update.

    swift developer course in chennai
    swift developer certification training in chennai

    ReplyDelete
  6. Nice article, its very informative content..thanks for sharing...Waiting for the next update.
    R Training in Chennai
    R Programming Training in Chennai

    ReplyDelete
  7. You have done good work by publishing this article here. I found this article too much informative, and also it is beneficial to enhance our knowledge. Grateful to you for sharing an article like this. Best app to share large file

    ReplyDelete
  8. Great Article Cloud Computing Projects

    Networking Projects

    Final Year Projects for CSE

    JavaScript Training in Chennai

    JavaScript Training in Chennai

    The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

    ReplyDelete
  9. How To Make Money On Sports Betting
    Online sports betting is wooricasinos.info available for a ford escape titanium whole host of US and European sports betting หารายได้เสริม markets. Some US states, https://octcasino.com/ like 나비효과 Louisiana and New Jersey, allow

    ReplyDelete
  10. Thank you for sharing useful information with us. please keep sharing like this. And if you are searching a unique and Top University in India, Colleges discovery platform, which connects students or working professionals with Universities/colleges, at the same time offering information about colleges, courses, entrance exam details, admission notifications, scholarships, and all related topics. Please visit below links:



    Sushant University in Gurugram

    The Assam Royal Global University in Jorha

    Alliance University in Bangalore

    REVA University in Bangalore

    Centurion University of Technology and Management in Bhubaneswar

    ReplyDelete
  11. If you are looking for a reliable and comprehensive Salesforce training course in Gurgaon , then APTRON is the perfect place to start. With our expert trainers and hands-on approach, you can learn everything you need to know about Salesforce and its various applications. Our courses are designed to provide a practical understanding of Salesforce, from basic concepts to advanced topics such as data management, automation, and reporting.

    ReplyDelete

Post a Comment

About author

My photo
Jan Binder
- Salesforce team lead, architect and developer (9x certified)
- experience with leading projects and teams (PMs & devs)