• WHO WE ARE
  • WHAT WE DO
    • Salesforce
      • Implementations
        • Sales Cloud
        • Service Cloud
        • CPQ
        • Field Service Lightning
        • Field Service for SMEs
      • Developments
        • Salesforce Customization
        • Custom Application Development
        • AppExchange Product Development
      • Migrations
        • Classic to Lightning Migration
        • Other Systems to Salesforce Migration
      • Integrations
    • Data Science
      • BI Solutions
      • AI/ML solutions
      • Agentic AI
  • HOW WE DO
    • Delivery Model
    • Our Works
  • REACH US
    • Contact Us
    • Careers
  • BLOG
    • WHO WE ARE
    • WHAT WE DO
      • Salesforce
        • Implementations
          • Sales Cloud
          • Service Cloud
          • CPQ
          • Field Service Lightning
          • Field Service for SMEs
        • Developments
          • Salesforce Customization
          • Custom Application Development
          • AppExchange Product Development
        • Migrations
          • Classic to Lightning Migration
          • Other Systems to Salesforce Migration
        • Integrations
      • Data Science
        • BI Solutions
        • AI/ML solutions
        • Agentic AI
    • HOW WE DO
      • Delivery Model
      • Our Works
    • REACH US
      • Contact Us
      • Careers
    • BLOG
  • [email protected]
  • (+91) 44-49521562
Merfantz - Salesforce Solutions for SMEs
Merfantz - Salesforce Solutions for SMEs
  • WHO WE ARE
  • WHAT WE DO
    • Salesforce
      • Implementations
        • Sales Cloud
        • Service Cloud
        • CPQ
        • Field Service Lightning
        • Field Service for SMEs
      • Developments
        • Salesforce Customization
        • Custom Application Development
        • AppExchange Product Development
      • Migrations
        • Classic to Lightning Migration
        • Other Systems to Salesforce Migration
      • Integrations
    • Data Science
      • BI Solutions
      • AI/ML solutions
      • Agentic AI
  • HOW WE DO
    • Delivery Model
    • Our Works
  • REACH US
    • Contact Us
    • Careers
  • BLOG

Refresh Salesforce Record Page with Triggered Flow & Aura Component

  • June 13, 2024
  • Tech Blogger
  • Salesforce Development & Implementation, Salesforce Developments Tutorial
  • 0

Introduction:

Refresh a Salesforce record page after a specific field change can enhance user experience and ensure data accuracy. This process involves using a record-triggered flow and an Aura component, leveraging platform event subscriptions to automatically update the record page in real-time. This guide will walk you through the steps to set up this functionality in Salesforce.

Components Involved

  1. List and describe the components involved in setting up the feature:
  • Record-Triggered Flow
  • Aura Component
  • Platform Event

Step-by-Step Guide

  1. Creating the Aura Component
  • In the Developer Console, go to File > New > Lightning Component. 
  • Enter a Name for your component (e.g., AccountRefreshComponent)
  • Copy and paste the below code.

AccountRefreshComponent.cmp

<aura:component  implements=“flexipage:availableForAllPageTypes” access=“global” >
    <aura:handler name=“init” value=“{!this}” action=“{!c.doInit}” />
    <lightning:empApi aura:id=“empApi” /> 
</aura:component>


AccountRefreshComponentController.js

({
    doInit : function(component, event, helper) {
        var channel = ‘/event/QuoteRefreshEvent__e’;
        const replayId = -1;
       
        const empApi = component.find(“empApi”);
    

//A callback function that’s invoked for every event received
        const callback = function (message)
        {
           
            console.log(” ==== > Refreshed Sucessfully < === “);
            $A.get(“e.force:refreshView”).fire();
            var obj = message.data.payload;
        };
       
        // Subscribe to the channel and save the returned subscription object.
        empApi.subscribe(channel, replayId, callback).then(function(newSubscription) {
            //console.log(“Subscribed to channel 1” + channel);
        });
       
        const errorHandler = function (message) {
            console.error(“Received error “, JSON.stringify(message));
        };
       
        //A callback function that’s called when an error response is received from the server for the handshake, connect, subscribe, and unsubscribe meta channels.
        empApi.onError(errorHandler);
    }
})

2.Subscribing to Platform Events

  • Click on the Gear icon (Setup) in the upper-right corner.
  • In the Quick Find box, type “Platform Events”.
  • Select “Platform Events” from the search results.
  • Click on the “New Platform Event” button.
  • Create a platform event object as shown in the screenshot below

Subscribe Platform Events

  • Create a field called “Message” as shown in the screenshot below.

Create an Field Called Message

  • Click Save button to apply the changes.

3.Setting Up the Record-Triggered Flow

  • Use your Salesforce credentials to log in.
  • Click on the Gear icon (Setup) in the upper-right corner.
  • In the Quick Find box, type “Flows” and select Flows under Process Automation.
  • Click on the New Flow button.
  • In the Flow Type selector, choose Record-Triggered Flow.

Choose the Record Triggered Flow for refresh record page.

  • Click Create.
  • Select the object you want to trigger the flow (e.g., Account).
  • Configure the Create element as shown in the screenshot below.

(Note: Select the platform event you have created for the refresh.)

Choose The Object

  • Click the Save & Activate button to apply the changes.

Conclusion

In conclusion, the implementation of record-triggered flows and Aura components, coupled with platform event subscriptions, offers a seamless solution for dynamically refresh salesforce record page. By leveraging these functionalities, users can ensure real-time updates to specific fields, enhancing user experience and maintaining data accuracy. This integrated approach demonstrates Salesforce’s versatility in streamlining processes and facilitating efficient data management within organizations.

Author Bio

Tech Blogger
+ Recent Posts
  • Comprehensive Overview of Salesforce Agent-Force Platform
    June 12, 2025
    Comprehensive Overview of Salesforce Agent-Force Platform
  • Salesforce GraphQL Revolutionizing Data Queries in CRM
    June 6, 2025
    Salesforce GraphQL: Revolutionizing Data Queries in CRM
  • Unlocking the Power of Dynamic Forms in Salesforce Lightning App Builder
    May 29, 2025
    Unlocking the Power of Dynamic Forms in Salesforce Lightning App Builder
  • Einstein Activity Capture Boosting Productivity & Relationship Intelligence
    May 22, 2025
    Einstein Activity Capture: Boosting Productivity & Relationship Intelligence
Tags: Salesforce Development & Implementation
  • Previous How to Embed a Salesforce Flow in a Visualforce Page
  • Next Test Salesforce Rest API using Postman
Merfantz Technologies is a leading Salesforce consulting firm dedicated to helping small and medium enterprises transform their operations and achieve their goals through the use of the Salesforce platform. Contact us today to learn more about our services and how we can help your business thrive.

Discover More

Terms and Conditions
Privacy Policy
Cancellation & Refund Policy

Contact Info

  • No 96, 2nd Floor, Greeta Tech Park, VSI Industrial Estate, Perungudi, Chennai 600 096, Tamil Nadu, INDIA
  • (+91) 44-49521562
  • [email protected]
  • 9:30 IST - 18:30 IST

Latest Posts

Comprehensive Overview of Salesforce Agent-Force Platform
Comprehensive Overview of Salesforce Agent-Force Platform June 12, 2025
Salesforce GraphQL Revolutionizing Data Queries in CRM
Salesforce GraphQL: Revolutionizing Data Queries in CRM June 6, 2025
Unlocking the Power of Dynamic Forms in Salesforce Lightning App Builder
Unlocking the Power of Dynamic Forms in Salesforce Lightning App Builder May 29, 2025

Copyright @2023 Merfantz Technologies, All rights reserved