Covid-19 Tracker in Salesforce – Lightning Component

Hello Folks in this post I’m going to provide you the code of the Covid 19 Tracker which I created Last year and demonstrated over my youtube channel.

The problem is on that tutorial I forgot to add one important point which is Remote site Settings. So before you start writing Code make sure you create a remote site setting for the API.

To add a remote site setting:

  1. From Setup, enter Remote Site Settings in the Quick Find box, then select Remote Site Settings.
  2. Click New Remote Site.
  3. Enter a descriptive term for the Remote Site Name.
  4. Enter the URL (https://api.covid19api.com)for the remote site.
  5. Optionally, enter a description of the site.
  6. Click Save.

Learn more about Salesforce Flow Bootcamp

Sample of the Covid 19 Tracker (In the video tutorial code is not optimized so you can see the change in the code)

Now you can start creating your Lightning Component & Apex Controller

Apex Class Covid19Controller

 

Apex Class Covid19Parser

 

Lightning Component Covid19Tracker

 

Controller

 

Helper

Style

 

Result:

 

 

 

 

 

 

 

For the video tutorial check this out

Get complete Roadmap To Learn Salesforce Admin And Development 👇

    Share Now

    Shubham is the Founder of Salesforce Geek. He is also a Salesforce Certified Consultant.

    Similar Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *