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
Serge DevSerge Dev 

Do packaged apex classes/triggers just unpackage themselves upon installation?

I've created a bunch of apex classes and triggers and placed them into a package which was then uploaded (via Salesforce -> Create -> Packages).

It produced a url for the package.

I've logged onto another Salesforce account and installed this package - and it seems what it did was just unpackage all the classes/triggers -- the functionality was working fine, but I could view all the code..

Is this all the package feature does? Provides a convenient way to pass classes from one place to another? Is there a way to conceal the classes from the user?

If I was to deploy this package to AppExchange, would people be able to view the code upon installing the app?

Or are the classes/triggers only viewable in developer accounts?
Best Answer chosen by Serge Dev
sweetzsweetz
Hi Serge,

You can use managed package so that your code will not be visible. It is also fully upgradeable. You can see this url for the complete information of packages 
https://help.salesforce.com/apex/HTViewHelpDoc?id=sharing_apps.htm&language=en

All Answers

sweetzsweetz
Hi Serge,

You can use managed package so that your code will not be visible. It is also fully upgradeable. You can see this url for the complete information of packages 
https://help.salesforce.com/apex/HTViewHelpDoc?id=sharing_apps.htm&language=en
This was selected as the best answer
Prem_PalPrem_Pal
Hey Serge,

While creating a package you have 2 options:
1.Managed
2.Unmanaged

What you have created is an unmanaged package, while you need exactly is a managed package.

To create a managed package you need to have a namespace for your organization.

So register the namespace first and then try to create a managed package.

That should help you!

Thanks,
Prem