Hi we have a @future class created, however we have this error as per the screen shot below
Please find the code below
public with sharing class Addressfuture {
public Addressfuture()
{
List<String> Addresses = new List<String>();
AddressHelper obj1 = new AddressHelper('1 hase st','san Francisco','CA','94105');
AddressHelper obj2 = new AddressHelper('2 hase st','San francisco','CA','94105');
AddressHelper obj3 = new AddressHelper('3 hase st','San francisco','CA','94105');
Addresses.add(JSON.serialize(obj1));
Addresses.add(JSON.serialize(obj2));
Addresses.add(JSON.serialize(obj3));
callfuture(Addresses);
}
@future
Static void callfuture(List<String> Addresses)
{
Address currAddress = null;
for(String sur: Addresses)
{
currAddress =(Address)JSON.deserialize(sur,AddressHelper.class);
system.debug('Deserialized in future:' +currAddress.street);
}
}
}
public with Sharing class Address {
public string street{get;set;}
public string city{get;set;}
public string state{get;set;}
public string zip{get;set;}
Public Address(string s,String c,String st,String z)
{
Street = s;
City = c;
State = st;
Zip = z;
}
}
Please advise
Thanks,
AddressHelper
class?