[SalesForce] Cannot execute batch class from a managed beta

My project has a batch class. Before I package my project into a managed beta, I test I can run the batch class from the Developer console.

My_Batch b = new My_Batch();
Database.executeBatch(b);

Everything runs.

However, when I install this managed beta into a new org and try the same code from a developer console, I get:

Invalid type: My_Batch

What is not ok to run the batch class from the managed beta?
Is there any other way I can run it?

Thanks.

Best Answer

You need to prefix the My_Batch with the namespacesprefix of the package: [namespace].My_Batch b = new [namespace].My_Batch();

Related Topic