We are close to the Christmas and end of the year. So wishing you all a very merry Christmas and a new year. I have never shared a code with you all lately. This time will be sharing code which I wrote just for fun sometime: “Lightning Component : Simple Currency exchange value”.
Lightning Component : Simple Currency exchange value
This is a simple lightning component which can be used in lightning UI/Experience to get INR(Indian Rupees) value of the base currency you mention. This is just hard coded as INR for now, but you can make changes to fit this into any currency you want. You can make it more re-usable and package it for sharing.
The code is simple and straight forward. If you have basic JavaScript and Apex knowledge you should be able to get it. If not and need some help, let me know.
Git Repo
I have created a Git repository for this project. Any one interested to improve the code and share it are most welcome. The link to the repo is : Currency Exchange
Usage
You can use it easily by copying the code from the Git Repo and save it in your org. Once saved the component code, you can go to the lightning home page editor or any page that uses lightning experience and drag the component to any place you want. Once you are on the page where you have added the component, you can place your base currency and you will get the current exchange rate in INR. As I said it is in INR as hard coded, but you can always change it.
Conclusion
So, just wanted to share this one so that someone out there will improve it and share ahead. Please let me know if you find any issues or you wanted to give some suggestions, please do so here in the below comment section or in the Git Hub repository.
Keep reading and sharing…..
Leave a Reply