Superbadgeもうまくいかんし、Apexも何が悪いんだか...
分からん
もう今日は止めよう。8時間かかっても、3しかクリアーできなかった
List<Contact> updateContactList = new List<Contact>();
Set<String> ContactSet = new Set<String>();
ContactSet.add('Abigail Mason;abbiemason@example.com');
Set<String> xxxSet = new Set<String>():
Map<String,String> xxxMap = new Map<String,String>();
for (String con : ContactSet){
List<String> xxx = con.Split(';');
xxxSet.add(xxx[0]);
xxxMap.put(xxx[0],xxx[1]);
}
List<Contact> ContactList = [select Id,Name from contact where Name =: xxxSet];
for (Contact con : ContactList){
Contact c = new Contact();
c.Id = con.Id ;
String e = (String)xxxMap.get(c.Name);
if (e != null) {
c.email = e;
updateContactList.add(c);
}
}
:になっていた!!!!
List<Contact> updateContactList = new List<Contact>();
Set<String> ContactSet = new Set<String>();
ContactSet.add('Abigail Mason;abbiemason@example.com');
Set<String> xxxSet = new Set<String>();
Map<String,String> xxxMap = new Map<String,String>();
for (String con : ContactSet){
List<String> xxx = con.Split(';');
xxxSet.add(xxx[0]);
xxxMap.put(xxx[0],xxx[1]);
system.debug('*******xxx***' + xxxMap);
}
List<Contact> ContactList = [select Id,Name from contact where Name =: xxxSet];
system.debug('***********' + ContactList.size());
for (Contact con : ContactList){
Contact c = new Contact();
c.Id = con.Id ;
String e = (String)xxxMap.get(con.Name);
system.debug('********e***' + e);
if (e != null) {
c.email = e;
updateContactList.add(c);
}
}
system.debug(updateContactList.size());
if (updateContactList.size() > 0) update updateContactList;