+ Start a Discussion

Help on apex issues

i am having 2 issus, can u pls help on this :
1. How can i place below data Into Map :
        productType=Whole Life, 

2. When calling Wrapper class from one class to another class getting below error :
Illegal assignment from List<NewCtr.caseInfoWrapper> to List<String>

global class NewCtr {
public static List<caseInfoWrapper> caseInfoWrapperRecords(List<ATD_Application__c> applicationList,Id partyId){
      List<caseInfoWrapper> lsCaseWrappers = new List<caseInfoWrapper>();
        for(ATD_Application__c caseInfo : applicationList){
            caseInfoWrapper wrapper = new caseInfoWrapper();
            wrapper.partyId = caseInfo.Party__c;
            wrapper.productType = 'Whole Life';
        return lsCaseWrappers;
global with sharing class NewHandler {

    list<caseInfoWrapper> wrapperRecords = NewCtr.caseInfoWrapperRecords(applicationList,partyId);
change as below, 
list<NewCtr.caseInfoWrapper> wrapperRecords = NewCtr.caseInfoWrapperRecords(applicationList,partyId);

I think the wrapper class caseInfoWrapper is defined in the class NewCtr, so change in accordingly.
It would be better if you share the complete code to check what exactly the error is.

Thank You,
Rajesh Adiga P.

Where you have defined the wrapper class, can you share the complete code as it is...