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
vivek singh08481200707119766vivek singh08481200707119766 

when we make a test class error massage ''''''''''''

Error: Compile Error: Entity is not org-accessible at line 2 column 9



how i solve it
my test class is --------------------------------------------------------------------

@isTest
private class invoiceTrackerTestSuite {
static testMethod void runPositiveTestCases() {
      Account objAccount = new Account();
      objAccount.Name = 'Vivek';
      objAccount.Type = 'Supplier';
      objAccount.Phone = '1234';
      objAccount.CurrencyIsoCode = 'AUD';
      insert objAccount;
      Contact objcontact = new contact();
      objcontact.LastName = 'Singh';
      objcontact.CurrencyIsoCode = 'AUD';
      objcontact.Account = objAccount ;
      insert objContact;
     
      opportunity objopportunity= new opportunity ();
      objopportunity.Name = 'Hindi2014';
      objopportunity.CloseDate = system.Today();
      objopportunity.Account = 'objAccount';
      objopportunity.Vendor__c = 'objaccount.id';
      objopportunity.StageName = 'Closed Won - Signed';
      objopportunity.Billing_Terms__c = 'On Completion';              
      objopportunity.Type = 'New Business';
      insert Objopportunity;
    
     
     
   opportunitylineitem objopportunitylineitem = new opportunitylineitem();
    insert objopportunitylineitem ;
   
    Invoiceobjinvoice=new Invoice();
    objInvoices.Account_Invoice__c='Neo@Ogilvy';
    objInvoices.Amount__c='2400';
    objInvoices.Invoice_link__c='google';
    objInvoices.Invoice_Status__c='Paid';
    objInvoices.Opportunity_invoices__c='DD Test 2015';
    objInvoices.Site_or_Partner__c='RAP';
    insert objinvoice;
   
  }
}
VPROKVPROK
try changing from PRIVATE class invoiceTrackerTestSuite {
to:
PUBLIC class invoiceTrackerTestSuite {
vivek singh08481200707119766vivek singh08481200707119766
this is solve  but code coverage is 0 how we increse this test class code coverage
VPROKVPROK
Did you run your test class? (setup-develop-Apex Test Execution)
Can't say until I see the code :)
Btw, please use "Add code sample" button (looks like <>) to post code. I will be much more readable.