You need to sign in to do that
Don't have an account?
hiteshwar marni
wrappper class parsing issue
Hi below is my class and wrapper class
public class manageProductsController {
@AuraEnabled
public static string insertOpportunityLineItems(String oppId,list<Prodsearch> selctdProdList){
system.debug('####SELTDPRODlIST####'+selctdProdList);
system.debug('*****oppId*****'+oppId);
system.debug('=====BEFORE FOR LOOP====');
for(Prodsearch ps:selctdProdList){
system.debug('=====IN FOR LOOP====');
string [] prodPricBookIds = ps.issueCode.split('-');
system.debug('IDIDIDIDIDIDID'+prodPricBookIds);
opportunityLineItem oli = new opportunityLineItem();
oli.OpportunityId = oppId;
oli.Product2Id = prodPricBookIds[0];
oli.Quantity=1;
oli.UnitPrice=10;
insert oli;
}
return null;
}
public class Prodsearch{
@AuraEnabled
public list<string> prodFamily{get;set;}
@AuraEnabled
public string subProd{get;set;}
@AuraEnabled
public string issueCode{get;set;}
}
}
I'm getting the following data in the debug
|####SELTDPRODlIST####({prodFamily=LDP-V, subProd=LDP-V BASIC, issueCode=01t28000000fLaDAAU-01u28000001Dx58AAC})
|*****oppId*****0060K00000TxL2g
but execution is getting fauiled before FOR LOOP with exception
FATAL_ERROR System.UnexpectedException: Salesforce System Error: 1026148476-352 (-230392578) (-230392578)
Please help me on this,
Thanks
Hitesh
public class manageProductsController {
@AuraEnabled
public static string insertOpportunityLineItems(String oppId,list<Prodsearch> selctdProdList){
system.debug('####SELTDPRODlIST####'+selctdProdList);
system.debug('*****oppId*****'+oppId);
system.debug('=====BEFORE FOR LOOP====');
for(Prodsearch ps:selctdProdList){
system.debug('=====IN FOR LOOP====');
string [] prodPricBookIds = ps.issueCode.split('-');
system.debug('IDIDIDIDIDIDID'+prodPricBookIds);
opportunityLineItem oli = new opportunityLineItem();
oli.OpportunityId = oppId;
oli.Product2Id = prodPricBookIds[0];
oli.Quantity=1;
oli.UnitPrice=10;
insert oli;
}
return null;
}
public class Prodsearch{
@AuraEnabled
public list<string> prodFamily{get;set;}
@AuraEnabled
public string subProd{get;set;}
@AuraEnabled
public string issueCode{get;set;}
}
}
I'm getting the following data in the debug
|####SELTDPRODlIST####({prodFamily=LDP-V, subProd=LDP-V BASIC, issueCode=01t28000000fLaDAAU-01u28000001Dx58AAC})
|*****oppId*****0060K00000TxL2g
but execution is getting fauiled before FOR LOOP with exception
FATAL_ERROR System.UnexpectedException: Salesforce System Error: 1026148476-352 (-230392578) (-230392578)
Please help me on this,
Thanks
Hitesh