I have a custom object
@AuraEnabled
public static List<Donation__c> onLoad(string recordId){
List<Donation__c> donList = new List<Donation__c>();
Contact con = [select id, Name, (select id, Name, Email1__c from Donations__r) from Contact where id=:recordId];
for(Contact c: con.Donations__r){
donList.add(new Donation__c(c,false));
}
return donList;
}
but in this line:
donList.add(new Donation__c(c,false));
Compile Error:
Type requires name=value pair construction: Donation__c
Any advice? Thanx
Donation__c
supposed to do with theContact
record, or with thisBoolean
?