I am getting this Error:
Initial term of field expression must be a concrete SObject: LIST
while Executing the Following code through Execute Anonymous:
public List<id> sitecontractids = new List<id>();
public List<Engineer_Checklist__c> ssnewList = new List<Engineer_Checklist__c>();
public List<SiteContracts__c> scnewlist= new List<SiteContracts__c>();
public List<SiteContracts__c> newsc = new List<SiteContracts__c>();
public List<SiteContracts__c> scList =[SELECT id, name From SiteContracts__c LIMIT 200];
for(SiteContracts__c scnewid :scList ){
sitecontractids.add(scnewid.id);
}
ssnewList =[Select Id, X6L_Water_Qty__c, X9L_Water_Qty__c, X3L_Water_Mist_Qty__c, X6L_Water_Mist_Qty__c, X9L_Water_Mist_Qty__c,
X2L_AFFF_Qty__c, X3L_AFFF_Qty__c, X6L_AFFF_Qty__c, X9L_AFFF_Qty__c, X2KG_CO2_Qty__c, X5KG_CO2_Qty__c,
X1_KG_Dry_Powder_Qty__c, X2KG_Dry_Powder_Qty__c, X4KG_Dry_Powder_Qty__c, X6KG_Dry_Powder_Qty__c,
X9KG_Dry_Powder_Qty__c, X3L_Wet_Chem_Qty__c, X6L_Wet_Chem_Qty__c, X1X1_Fire_blan_Qty__c, X12x12_FB_Qty__c,
X12x18_FB_Qty__c, XHose_Reel_19_Qty__c, FA_Travel_Time__c, FA_Job_Time__c, ALUnit_Qty__c,
FA_Smoke_Detector_Qty__c, FA_Heat_Detector_Qty__c, FA_Break_Glass_Call_Point_Qty__c,
FA_Bell_Sounder_Qty__c, FA_Automatic_Door_qty__c, FA_Central_Station_Link_Qty__c,
FA_Remote_Indicator_Qty__c, FA_Beacon_Qty__c, FA_Emergency_Light_Qty__c, FA_Keyswitch_Qty__c,
FA_Type_of_Panel__c, Age_of_Panel__c
From Engineer_Checklist__c
Where Fire_Extinguisher_Service_complete__c=true AND Site_Contract__c !=NULL AND
Site_Contract__c IN :sitecontractids Order By lastmodifieddate desc LIMIT 200];
for(Engineer_Checklist__c ssli:ssnewList)
{
newsc.X6L_Water__c=ssli.X6L_Water_Qty__c;
newsc.X9L_Water__c=ssli.X9L_Water_Qty__c;
newsc.X3L_Water_Mist__c=ssli.X3L_Water_Mist_Qty__c;
newsc.X6L_Water_Mist__c=ssli.X6L_Water_Mist_Qty__c;
newsc.X9L_Water_Mist__c=ssli.X9L_Water_Mist_Qty__c;
newsc.X2L_AFFF__c=ssli.X2L_AFFF_Qty__c;
newsc.X3L_AFFF__c=ssli.X3L_AFFF_Qty__c;
newsc.X6L_AFFF__c=ssli.X6L_AFFF_Qty__c;
newsc.X9L_AFFF__c=ssli.X9L_AFFF_Qty__c;
newsc.X2KG_CO2__c=ssli.X2KG_CO2_Qty__c;
newsc.X5KG_CO2__c=ssli.X5KG_CO2_Qty__c;
newsc.X1KG_DRY_POWDER__c=ssli.X1_KG_Dry_Powder_Qty__c;
newsc.X2KG_DRY_POWDER__c=ssli.X2KG_Dry_Powder_Qty__c;
newsc.X4KG_DRY_POWDER__c=ssli.X4KG_Dry_Powder_Qty__c;
newsc.X6KG_DRY_POWDER__c=ssli.X6KG_Dry_Powder_Qty__c;
newsc.X9KG_DRY_POWDER__c=ssli.X9KG_Dry_Powder_Qty__c;
newsc.X3L_WET_CHEMICAL__c=ssli.X3L_Wet_Chem_Qty__c;
newsc.X6L_WET_CHEMICAL__c=ssli.X6L_Wet_Chem_Qty__c;
newsc.X1_x_1m_Fire_Blanket__c=ssli.X1X1_Fire_blan_Qty__c;
newsc.X1_2_x_1_2m_Fire_Blanket__c=ssli.X12x12_FB_Qty__c;
newsc.X1_2_x_1_8m_Fire_Blanket__c=ssli.X12x18_FB_Qty__c;
newsc.Hose_Reel_19mm__c=ssli.XHose_Reel_19_Qty__c;
newsc.Al_Unit__c=ssli.ALUnit_Qty__c;
newsc.Smoke_Detector_Qty__c=ssnewlist.FA_Smoke_Detector_Qty__c;
newsc.Heat_Detector_Qty__c=ssnewlist.FA_Heat_Detector_Qty__c;
newsc.Break_Glass_Call_Point_Qty__c=ssnewlist.FA_Break_Glass_Call_Point_Qty__c;
newsc.Bell_Sounder_Qty__c=ssnewlist.FA_Bell_Sounder_Qty__c;
newsc.Automatic_Door_Qty__c=ssnewlist.FA_Automatic_Door_qty__c;
newsc.Central_Station_Link_Qty__c=ssnewlist.FA_Central_Station_Link_Qty__c;
newsc.Remote_Indicator_Qty__c=ssnewlist.FA_Remote_Indicator_Qty__c;
newsc.Beacon_Qty__c=ssnewlist.FA_Beacon_Qty__c;
newsc.Emergency_Light_Qty__c=ssnewlist.FA_Emergency_Light_Qty__c;
newsc.Keyswitch_Qty__c=ssnewlist.FA_Keyswitch_Qty__c;
newsc.Type_of_Panel_DVR__c=ssnewlist.FA_Type_of_Panel__c;
newsc.Age_of_Panel_DVR__c=ssnewlist.Age_of_Panel__c;
newsc.Job_Time__c=ssnewlist.FA_Job_Time__c;
newsc.Travel_Time__c=ssnewlist.FA_Travel_Time__c;
newsc.Time__c='Minutes';
newsc.Job_time_value__c='Hours';
scnewlist.add(newsc);
}
update scnewlist;
Can any one suggest me what is wrong in my code.
Thanks in advance.