• Jun Gao5
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I am using Tooling API to create an Apex class, I noticed that if the class body has a reference to any object (standard or custom), it throws a compilation error.

For example, if the class body has:
Account a;

the error is: no access to account. 

How do I get around this?
I am using Tooling API to create an Apex class, I noticed that if the class body has a reference to any object (standard or custom), it throws a compilation error.

For example, if the class body has:
Account a;

the error is: no access to account. 

How do I get around this?