function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
l00p3yl00p3y 

Im missing somthing..... Initial term of field expression should be concrete SObject

I am attempting to create a custom class that I can call from a Trigger.  I am getting the error stated above but I am not quite understanding the dilemma... Any assistance would very useful....

 

 

public class StateCoverage { public static void coverage(StateCoverageScript__c[] scs){ scs.Total_Accounts__c = [Select count() From Account a where a.BillingState = : scs.StateAbbreviation__c ]; scs.Run_Script__c = false; scs.Last_Run_Date__c = system.today(); } }

 

 

 

 

 

SuperfellSuperfell
Your function says its takes an array, but you're accessing the scs variable as if its not an array.