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

i want to try to bind the variable to wrapper throught the get the reset api but i can't
public class AccountGroup {
@AuraEnabled
public static string doWebCallTest(Id pv_ObjectId){
//return utility_wrapper.parse(HW_WebCall_OROServices.prepareWebCall('similarUsers', new list<String>(), pv_ObjectId));
string respons = HW_WebCall_OROServices.prepareWebCall('similarUsers', new list<String>(), pv_ObjectId);
Map<String,String> customerIds = new Map<String,String>();
system.debug('respons'+respons);
fromJSON deserializedJsonString = (fromJSON) System.JSON.deserialize(respons, fromJSON.class);
system.debug('deserializedJsonString*************'+deserializedJsonString);
System.debug('gv_ResponseBody********************' + deserializedJsonString.gv_ResponseBody);
This varaiable to assined to wrapper class that wrapper to bined the ui part but i am not get the result were i am strucking
/***** fromJSON1 similarusers = (fromJSON1) System.JSON.deserialize(deserializedJsonString.gv_ResponseBody, fromJSON1.class); *********/
system.debug('similarusers+++++++++++++++++'+similarusers);
Set<String> mySet = new Set<String>();
Map<String,List<String>> myMapresponse = new Map<String,List<String>>();
for(cls_similar_users s :similarusers.similar_users){
mySet.add(s.id);
myMapresponse.put(s.id,s.reasons);
}
system.debug('mySet'+mySet);
system.debug('myMapresponse'+myMapresponse);
Map<Set<String>,Map<String,List<String>>> sndMap = new Map<Set<String>,Map<String,List<String>>>();
Map<String,String> accMap = new Map<String,String>();
// list<account> aa = [select id, name,Auxmoney_ID__c from account where Auxmoney_ID__c in :mySet];
list<account> aa = [SELECT Id, Name, Street__c, Number__c,auxmoney_ID__c, Postal_Code__c, City__c, PersonEmail, TOLABEL(Kundenstatus__c), AK_faehig__c, TOLABEL(Berufsgruppe__c),
(SELECT Id, auxmoney_ID__c, Wunschbetrag__c, TOLABEL(Restkreditversicherung__c), TOLABEL(Vertriebskanal__c), Monatliche_Rate__c, Laufzeit__c, Effektivzins__c, TOLABEL(QS_Fall__c), TOLABEL(auxmoney_Score__c), StageName, Erstellt_am__c
FROM Opportunities ORDER BY Erstellt_am__c DESC)
FROM Account
WHERE auxmoney_ID__c in :mySet];
for(Account a : aa){
accMap.put(a.auxmoney_ID__c,a.Name);
system.debug('accMap'+accMap);
// accMap.put(a.Name,a.Auxmoney_ID__c);
}
Map<List<String>,List<List<String>>> mymaps = new Map<List<String>,List<List<String>>>();
Map<Set<String>,List<List<String>>> myMapf = new Map<Set<String>,List<List<String>>>();
// Map<Set<String>,List<String>> mymapss = new Map<Set<String>,List<String>>();
Map<Set<Set<String>>,Map<List<String>,List<List<String>>>> mymapss = new Map<Set<Set<String>>,Map<List<String>,List<List<String>>>>();
system.debug(myMapresponse.keySet());
system.debug(accMap.keySet());
for(String s :accMap.keySet()){
system.debug(myMapresponse.containsKey(s));
if(myMapresponse.containsKey(s)){
system.debug('inside loop'+s);
myMapf.put(accMap.keySet(),myMapresponse.values());
mymaps.put(accMap.values(),myMapresponse.values());
mymapss.put(myMapf.keySet(),mymaps);
}
}
system.debug('mymapss'+mymapss);
system.debug('mymaps'+mymaps);
system.debug('myMapf'+myMapf);
system.debug('sndMap'+sndMap);
similarusers.lstAccs=aa;
system.debug('accountslist'+aa);
respons=JSON.serialize(similarusers);
System.debug('Return respons**************'+respons);
System.debug('Return respons.similar_users**************'+respons);
string resmap = JSON.serialize(mymapss);
System.debug('resmap++++++++++++++'+resmap);
return respons;
}
public class fromJSON{
public String gv_ResponseBody;
public String gv_Message; //
public boolean gv_IsWebCallSuccess;
public boolean gv_IsWebCallExceute;
public boolean gv_IsLoggingSuccess;
public String gv_HTTPStatus; //OK
public Integer gv_HTTPCode; //200
public boolean gv_HasError;
//public cls_similar_users[] similar_users;
public list<account> lstAccs;
}
public class fromJSON1{
public cls_similar_users[] similar_users;
public list<account> lstAccs;
}
class cls_similar_users {
public String id; //2030733
public list<string> reasons;
}
public class both{
public Map<Set<Set<String>>,Map<List<String>,List<List<String>>>> responsemap;
public fromJson1[] bothval;
//public String id;
// public String name;
// public String reasons;
}
public class wrapperuser{
//public list<httpwrapperuser> wrapperuser{get;set;}
public list<httpwrapperuser> similarusers{get;set;}
}
public class httpwrapperuser{
public string id {get;set;}
public string reasons{get;set;}
public string MatchAddress{get;set;}
public string MatchLastnameStreetCity{get;set;}
public string MatchNameBirthday{get;set;}
public string MatchPhoneNumber{get;set;}
}
}
@AuraEnabled
public static string doWebCallTest(Id pv_ObjectId){
//return utility_wrapper.parse(HW_WebCall_OROServices.prepareWebCall('similarUsers', new list<String>(), pv_ObjectId));
string respons = HW_WebCall_OROServices.prepareWebCall('similarUsers', new list<String>(), pv_ObjectId);
Map<String,String> customerIds = new Map<String,String>();
system.debug('respons'+respons);
fromJSON deserializedJsonString = (fromJSON) System.JSON.deserialize(respons, fromJSON.class);
system.debug('deserializedJsonString*************'+deserializedJsonString);
System.debug('gv_ResponseBody********************' + deserializedJsonString.gv_ResponseBody);
This varaiable to assined to wrapper class that wrapper to bined the ui part but i am not get the result were i am strucking
/***** fromJSON1 similarusers = (fromJSON1) System.JSON.deserialize(deserializedJsonString.gv_ResponseBody, fromJSON1.class); *********/
system.debug('similarusers+++++++++++++++++'+similarusers);
Set<String> mySet = new Set<String>();
Map<String,List<String>> myMapresponse = new Map<String,List<String>>();
for(cls_similar_users s :similarusers.similar_users){
mySet.add(s.id);
myMapresponse.put(s.id,s.reasons);
}
system.debug('mySet'+mySet);
system.debug('myMapresponse'+myMapresponse);
Map<Set<String>,Map<String,List<String>>> sndMap = new Map<Set<String>,Map<String,List<String>>>();
Map<String,String> accMap = new Map<String,String>();
// list<account> aa = [select id, name,Auxmoney_ID__c from account where Auxmoney_ID__c in :mySet];
list<account> aa = [SELECT Id, Name, Street__c, Number__c,auxmoney_ID__c, Postal_Code__c, City__c, PersonEmail, TOLABEL(Kundenstatus__c), AK_faehig__c, TOLABEL(Berufsgruppe__c),
(SELECT Id, auxmoney_ID__c, Wunschbetrag__c, TOLABEL(Restkreditversicherung__c), TOLABEL(Vertriebskanal__c), Monatliche_Rate__c, Laufzeit__c, Effektivzins__c, TOLABEL(QS_Fall__c), TOLABEL(auxmoney_Score__c), StageName, Erstellt_am__c
FROM Opportunities ORDER BY Erstellt_am__c DESC)
FROM Account
WHERE auxmoney_ID__c in :mySet];
for(Account a : aa){
accMap.put(a.auxmoney_ID__c,a.Name);
system.debug('accMap'+accMap);
// accMap.put(a.Name,a.Auxmoney_ID__c);
}
Map<List<String>,List<List<String>>> mymaps = new Map<List<String>,List<List<String>>>();
Map<Set<String>,List<List<String>>> myMapf = new Map<Set<String>,List<List<String>>>();
// Map<Set<String>,List<String>> mymapss = new Map<Set<String>,List<String>>();
Map<Set<Set<String>>,Map<List<String>,List<List<String>>>> mymapss = new Map<Set<Set<String>>,Map<List<String>,List<List<String>>>>();
system.debug(myMapresponse.keySet());
system.debug(accMap.keySet());
for(String s :accMap.keySet()){
system.debug(myMapresponse.containsKey(s));
if(myMapresponse.containsKey(s)){
system.debug('inside loop'+s);
myMapf.put(accMap.keySet(),myMapresponse.values());
mymaps.put(accMap.values(),myMapresponse.values());
mymapss.put(myMapf.keySet(),mymaps);
}
}
system.debug('mymapss'+mymapss);
system.debug('mymaps'+mymaps);
system.debug('myMapf'+myMapf);
system.debug('sndMap'+sndMap);
similarusers.lstAccs=aa;
system.debug('accountslist'+aa);
respons=JSON.serialize(similarusers);
System.debug('Return respons**************'+respons);
System.debug('Return respons.similar_users**************'+respons);
string resmap = JSON.serialize(mymapss);
System.debug('resmap++++++++++++++'+resmap);
return respons;
}
public class fromJSON{
public String gv_ResponseBody;
public String gv_Message; //
public boolean gv_IsWebCallSuccess;
public boolean gv_IsWebCallExceute;
public boolean gv_IsLoggingSuccess;
public String gv_HTTPStatus; //OK
public Integer gv_HTTPCode; //200
public boolean gv_HasError;
//public cls_similar_users[] similar_users;
public list<account> lstAccs;
}
public class fromJSON1{
public cls_similar_users[] similar_users;
public list<account> lstAccs;
}
class cls_similar_users {
public String id; //2030733
public list<string> reasons;
}
public class both{
public Map<Set<Set<String>>,Map<List<String>,List<List<String>>>> responsemap;
public fromJson1[] bothval;
//public String id;
// public String name;
// public String reasons;
}
public class wrapperuser{
//public list<httpwrapperuser> wrapperuser{get;set;}
public list<httpwrapperuser> similarusers{get;set;}
}
public class httpwrapperuser{
public string id {get;set;}
public string reasons{get;set;}
public string MatchAddress{get;set;}
public string MatchLastnameStreetCity{get;set;}
public string MatchNameBirthday{get;set;}
public string MatchPhoneNumber{get;set;}
}
}