You need to sign in to do that
Don't have an account?

Current Weather report
hi,
can anyone help me to find a way to get current weather report for account records????
can anyone help me to find a way to get current weather report for account records????
<apex:page standardController="Account">
<h3>Current Weather</h3>
<div id="current-weather"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script>
jQuery(document).ready(function($) {
$.ajax({
url : "https://api.wunderground.com/api/<YOUR_API_KEY_GOES_HERE>/geolookup/conditions/q/{!Account.BillingState}/{!Account.BillingCity}.json",
dataType : "jsonp",
success : function(parsed_json) {
var location = parsed_json['location']['city'];
var temp_f = parsed_json['current_observation']['temp_f'];
$("#current-weather").text("Current temperature in " + location + " is " + temp_f);
}
});
});
</script>
</apex:page>
If you want to have a weather report of Account Records, I would suggest you a wonderful Application named as 'Smart Multi Weather Information', which you can install from AppExchange that would get you the weather forecasts of not only Account records, but also of Leads, Contacts and Contracts. You can go through the link below to install it:
https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000DXzYeEAL
For a better understanding, you can also check our user guide manual https://webkul.com/blog/salesforce-smart-multi-weather-information/
This application displays a complete Weather Forecast of above mentioned objects in detail.
Feel free to contact us anytime if you have any issue related to configuration of this Application.
Support: https://support@webkul.com
Ajit Kumar
Salesforce Consultant
Webkul Software Private Ltd.
Hey Cheyne,
I installed the unmanaged app whose link you have provided. However, after I signed up to get the API keys, it says no API. And, its asking to first buy a weather station to get the API keys.
I also have a requirement to show the weather report in Salesforce lightning component. My requirement is to create a Lightning Component to display the weather report.
Please help!