function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Silpi Roy 14Silpi Roy 14 

I have a requirement like JSON for an external weather forecasting is given ,Based on the website details in lead object the greeting message should be displayed.Please suggest me to solve it(URGENT).

I have a requirement like JSON for an external weather forecasting is given ,Based on the website details in lead object the greeting message should be displayed.Please suggest me to solve it(URGENT).
Silpi Roy 14Silpi Roy 14
Requirement is :In Leads need to display a section where it can show information based on weather.com.
roni shoreroni shore
still not clear...do you want to create an iframe to display the website? or you have the JSON. so, you can create a wrapper class and fetch the details?
Silpi Roy 14Silpi Roy 14
Hi Rahul the idea is integration with accuther-I used below code snippet but getting error-
public static AccuWether(String path){
  HttpRequest req = new HttpRequest();
  req.setEndpoint('http://dataservice.accuweather.com/forecasts/v1/daily/' + accuWetherKey + path);
  req.setMethod('GET');
  Http http = new Http();
  HttpResponse res = new HttpResponse();
  res = http.send(req);
  return accuWether.parse(res.getBody());
}
public static AccuWether parse(String jsonString) {
  return (AccuWether) System.JSON.deserialize(jsonString, AccuWether.class); }
        System.debug('Service Response is------->'+strResponse);
    }