Real time Salesforce mini Project using LWC with Integration. Show Weather Details of city!
Ғылым және технология
Get hands-on experience by creating a real time Salesforce mini project using LWC, Apex Class and Integration to show Weather details of any city.
Learn to integrate Salesforce with Weather API.
Sign Up to Open Weather URL
openweathermap.org/
Please find the source code by accessing the below URL, I have uploaded the project in GitHub.
github.com/shahbazkhan800/You...
#salesforce #integration #weather #api #lwc #apex #handson #project
Пікірлер: 26
Hi friends!! Please find the source code by accessing the below URL, I have uploaded the project in GitHub. github.com/shahbazkhan800/KZread-Tutorials/tree/main/Weather%20Forecast%20Project
@jammascot
7 ай бұрын
ok i got it thanks sir love you
@jammascot
6 ай бұрын
No base file for markup://c:weather details error shows sir
Thank you for explaining in such a simple way.
Simply Superb Explanation in short period Thanks for ur efforts
@codewith_Khan
6 ай бұрын
Thanks and glad it helped. Please subscribe the channel if not done already.
Explanation 👌👌 unique project ❤❤ Thanks ❤
@codewith_Khan
3 ай бұрын
Glad it helped!! Please subscribe the channel if not done already!!
Thank you so much sir
@codewith_Khan
6 ай бұрын
Always happy to help!! Please subscribe the channel if not done already.
Super
@codewith_Khan
6 ай бұрын
Always happy to help!!
@codewith_Khan
6 ай бұрын
Please subscribe the channel if not done already.
how can i show this data in line chart fromat ? can you explain please
@codewith_Khan , I would like to know you did you know about the format of the result it would give you? Could you tell us as well that how do we find out about the resukt of any given API so that we destructure the results accordingly, like how you did while deserializing the result of the given api.
@codewith_Khan
3 ай бұрын
Hi, please watch this part of the video 13:45 where I talked about the structure of the API response that we receive. You can also simply execute the below code snippet from anonymous window of Developer Console and look for the debug statements that I have placed in the code(the API response result and the API response body). I have just took that debug statement and explained in the video as structure of the response.. [In below code please update "apiKey" with your unique API Key] //Frame the Enpoint URL String cityName = 'Hyderabad'; String apiKey = 'Your API Key'; String endpoint = 'api.openweathermap.org/data/2.5/weather'; endpoint += '?q='+cityName; endpoint += '&units=metric'; endpoint += '&APPID='+apiKey; //Callout to Weather API Http http =new http(); HttpRequest req = new HttpRequest(); req.setEndpoint(endpoint); req.setMethod('GET'); HttpResponse res = http.send(req); system.debug('response result => '+res); system.debug('response body=> '+JSON.deserializeUntyped(res.getBody()));
@codewith_Khan
3 ай бұрын
Please subscribe the channel if not done already!!
How to store json in salesforce, where we are mentioning the json formate details?
@codewith_Khan
18 күн бұрын
Hi friend! Since the data is going to change on every click so we are not storing the response JSON in any SObject rather storing in a wrapper class which simply returns the formatted data from apex to LWC. Please subscribe the channel if not done already!!
@codewith_Khan what is the IDE you used to edit the LWC?
@codewith_Khan
23 күн бұрын
Hi friend!! Its a Chrome extension that gives the ability to create/edit LWC directly in Salesforce org! You can watch this video to know more about it. kzread.info/dash/bejne/m6Ob0dOxg7GTqcY.htmlsi=FwYv05ABxOsnuSx8
instead of creating wrapper class ,why we haven't created the sobject of the data ,which is coming from the weather api?
@codewith_Khan
2 ай бұрын
Hey bro! Storing the api response in sObject will cause inserting/updating the record(s) into Database every time hence since this is a dynamic data that will change every time we hit the api so returning into a wrapper class is more efficient where we dont have to insert the record and then return the same record to our LWC to display!
Where can i get source code?
@codewith_Khan
7 ай бұрын
I have uploaded the source code in GitHub you can access it using below URL github.com/shahbazkhan800/KZread-Tutorials/tree/main/Weather%20Forecast%20Project
@codewith_Khan
6 ай бұрын
Please subscribe the channel if not done already.