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
MitchellbMitchellb 

Not able to access custom object in Apex project

I have created a custom object which I am unable to reference in side newly created class. The error I receive is:

 

Save error: Invalid type: Invoice_Statement_c

 

Is there a location where I need to modify permissions or object type that will make this object accessible in the code?

Best Answer chosen by Admin (Salesforce Developers) 
ForcepowerForcepower

Just need an extra underscore in there before the last c:  Invoice_Statement__c

 

SF adds __c to all custom objects in the API name.