Think. Build. Salesforce Solutions.

Salesforce Consulting Services across Salesforce Clouds & Across App Lifecycles

Blog

How to Update Status for Salesforce object in a custom Lightning Component?

In Salesforce, maintaining the last update status of a view once it loads as a component can be tricky. JavaScript has an asynchronous way of executing after all. Resetting the counter after each component refresh from the custom refresh button may take a while to debug. Here is a way I resolved my problem. With a few tweaks here and there with some horseshoe fitting hope it helps you too.

status for salesforce object

Step 1: Create an attribute that shows the listing status
status for salesforce object
status for salesforce object
Step 2: Look in the component markup and place your attribute as per the requirement
status for salesforce object
Step 3: Inside your, JS Controller calls the set Interval method inside the Init method
status for salesforce object
Step 4: Inside the helper call make the apex calls and query data
status for salesforce object
Step 5: Define the logic that updates the component
status for salesforce object

One Comment

  1. stella george May 28, 2021 at 11:07 am - Reply

    Amazing content on Salesforce Lightning component ! Thanks for sharing !

Leave A Comment