You need to sign in to do that
Don't have an account?
SFDC Techie
How to get geocode for bulk record based on billing address using Google Map API (REST API)
Hi All,
I able to get geocode for single record based on billing adderess whan insert or update.For this I wrote trigger on account object and calling future callout methos in a class and working good.
But I anable to get geocode based on billing adderess when insert or update bulk records from dataloader.When I am trying to update more than 50 getting below error like "Too many future calls: 51".
Even though I have sent list of acount id to future callout method from trigger, in future callout method for each record I am calling webservice so I am getting "Too many future calls: 51".
I also tried to schedule future callout method for evert 1 minute in this getting status 'ok' and status code '200' but geocode is null.
Here is the code
Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('https://maps.googleapis.com/maps/api/geocode/json?address='+geoAddress + '&key=' + Label.Google_API_Key+'&sensor=false');
request.setMethod('GET');
request.setTimeout(60000);
HttpResponse response = http.send(request);
Please help me how to get geocode for bulkrecords and how to send multiple record in single callout.
I able to get geocode for single record based on billing adderess whan insert or update.For this I wrote trigger on account object and calling future callout methos in a class and working good.
But I anable to get geocode based on billing adderess when insert or update bulk records from dataloader.When I am trying to update more than 50 getting below error like "Too many future calls: 51".
Even though I have sent list of acount id to future callout method from trigger, in future callout method for each record I am calling webservice so I am getting "Too many future calls: 51".
I also tried to schedule future callout method for evert 1 minute in this getting status 'ok' and status code '200' but geocode is null.
Here is the code
Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('https://maps.googleapis.com/maps/api/geocode/json?address='+geoAddress + '&key=' + Label.Google_API_Key+'&sensor=false');
request.setMethod('GET');
request.setTimeout(60000);
HttpResponse response = http.send(request);
Please help me how to get geocode for bulkrecords and how to send multiple record in single callout.