Received error

"Entity is not api accessible (Line: 1, Column: 8)"

Could not find what is actually causing error, or what it means.

  • 4
    I'm voting to close this question as off-topic because it never contained enough detail to answer in the first place.
    – Adrian Larson
    Sep 19, 2016 at 19:35

5 Answers 5


I had a line like following

Project p = projectsMap.get( projId );

When I changes this line to

Project__c p = projectsMap.get( projId );

everything has been saved ok. Actually I meant Project__c (custom object), not sure what Project could be.

  • 1
    You can always edit your question to add more details to it instead of posting them as an answer. I have updated your question with your additional code. Please delete this answer post. Mar 16, 2015 at 9:31
  • @VamsiKrishna This actually is an answer though, eventhough the question wasn't very clear, this explains how it was solved. Mar 16, 2015 at 9:37
  • wow I m going blind.. thought these change in code is causing the above error & didn't think the other way. Mar 16, 2015 at 9:45
  • Please, do not edit my question.
    – Patlatus
    Mar 16, 2015 at 15:18
  • I ran into this confusing error when I accidentally tried to create a Queue object rather than a Group.
    – xn.
    Feb 25, 2016 at 0:46

Ran into this error recently when trying to use the AggregateResult class. Turns out the API version on the class in the org I was in was at 16. Moved it up to a higher API version (arbitrarily used 20.0 but could have gone to the latest, I suppose) and stopped getting the error.


I wrote Owner.Id instead of acc.OwnerId and got this error

Issue in my code was


While it should have been


There must be some object which is used illegally. Try to rectify such errors. Ex.

Account acc = new Account();
acc.Type__c = 'Prospect';
Direct_number__C = '';

Here the 3rd line should be acc.Direct_number__C = ''; See if you have made any such mistake.


I encountered this error, when I was trying to declare an instance of a Price Book standard Object.

My wrong declaration was:

PriceBook pb = new PriceBook();

Actually it should have been(after I checked with the standard dettails in Workbench):

PriceBook2 pb = new PriceBook2();

Things to keep in mind here:

  • This error indicates that you are referencing to a standard object or field, in the wrong way.
  • The error shows the row of the class declaration, not to the actual row where it takes place, so you have to check manually where might be the cause.

A best practice for this, is to consult with the info of the Workbench interface, that provides more dettailed info for every entity in salesforce.

Not the answer you're looking for? Browse other questions tagged .