Build Lightning Apps With These Exciting Salesforce Summer ’20 Features

Kam Patel
AppExchange and the Salesforce Ecosystem
4 min readJul 1, 2020

Salesforce’s Summer ’20 release has a number of awesome, new Lightning features. I’m excited to highlight and demonstrate some of my favorite Lightning features using a sample app. You can find the demo app with all the features covered in this article in this repo.

Features We’ll Cover

Dynamic Forms is the evolution of Lightning Record Pages which lets you break up the page within the Lightning App builder so you can place fields, sections in multiple tabs and apply rules to show and hide fields and sections. This reduces the need for multiple page layouts. More information here.

Dynamic Actions provide a highly configurable component that supports actions that can be configured right in the Lightning App Builder. As with dynamic forms, you can show and hide individual actions based on rules. More information here.

Lightning Messaging Service is designed to enable communication between Visualforce, Aura, and Lightning Components anywhere on a Lightning Page. LMS provides a simple API to publish and subscribe to messages throughout Lightning Experience on the page. More information here.

With new updates, Lightning Flow can now be Triggered from any record change or platform event which means that there is now less dependency on the Process Builder. More information here.

Our Use Case

Consider a customer applying for a loan with a financial institution. As part of the application process, the loan officer has to upload documents with customer information, forward them to a third-party and await confirmation of receipt. That process might take some time before the application could move forward to the next stage. Once the third party confirms receipt of the documents, the application stage in the UI is automatically updated which notifies the loan officer. The update also triggers a refresh of the dynamic forms/action.

Loan Record Page Layout

Here are the key components on the Loan record page.

Path: Loan officer updates this to advance the loan application to the next stage

Action bar: This dynamic action bar is configured to expose selected actions based on filter criteria.For example, the “Submit For Approval” action is configured to be visible only when the loan application advances to the “Sent to third party” stage. This makes it easier for the Loan officer to focus only on select sections/fields.

Dynamic form: Different sections/fields of dynamic form are configured for a set filter criteria e.g. House Loan section is displayed only when Loan record type is “House”. This makes it easier for the Loan officer to focus only on select sections/fields.

Custom LWC: This custom component “objectFieldUpdate” subscribes to a platform event using emp api raised by the “HandleDocumentUpload” flow. On receiving the event it calls refreshApex method which causes Path, Dynamic Forms and Actions to refresh & reflect changes in the Loan status. It also publishes a Lighting Message Service message to indicate status refresh.

Custom VF: This Visualforce page subscribes to the Lighting Message Service to update itself on refresh message sent by the Custom LWC.

Demo Video

The video shows how the loan officer marks the stage as “Documents Uploaded” and waits for the headless Lightning Flow to send a Platform Event indicating completion of the document

Known Limitations and Upcoming Features

  • Dynamic Forms is currently in pilot and Dynamics Action is in beta. Both features currently work only with custom objects and can be self-enabled by your org administrator. For ISVs partners, Dynamic Forms and Dynamic Actions will be package-able once the features are generally available (GA).
  • The limit of active Platform Event subscribers is 2000. So in this case, if emp-api receives an error on subscribe, make sure to build exception handling to relay the error to the user in a way that allows them to continue to work effectively.

Conclusion

In summary, Salesforce Summer ’20 has lots of cool new declarative and programmatic Lightning features, and I hope this blog post helped you learn or get interested in some of those features. Happy coding!

--

--

Kam Patel
AppExchange and the Salesforce Ecosystem

Hello! I work at Salesforce as a technical expert for ISV partners. I love going for long walks, socializing, public speaking and teaching kids in rural areas.