4

I developed my app,

The controller is complete, and also the visualforce, but I need to hide my code at installing the app in another salesforce account. How can I make this possible?

Is there any way to hide both codes? The apex and the code behind?

Thanks in advance.

6

You'll want to refer to the ISVForce guide, but in summation, if you're using a managed package, your Apex Code will be hidden from subscribers, but your Visualforce and JavaScript cannot be hidden.

  • Was about to say that too - if they put the content of the page in a Component it will be hidden though – Phil Hawthorn Jan 21 '16 at 17:17
  • @sfdcfox Do you have good tutorial about how to do this? I read the article but it redirect me to many links, links for this, links for that, but it does not have any structure about how to do this?! Thanks in advance – Rodolfo Lanshore Jan 21 '16 at 20:08
  • I doubt there's a tutorial, simply because there's nothing to do out of the ordinary. To hide your Apex Code, define a namespace, create a managed package, add your code to the package, and upload. The only caveat here is that global classes can be seen by subscribers. Public or less will have the body of the code hidden from subscribers automatically. – sfdcfox Jan 21 '16 at 20:35
  • It's not that simple it's seems, this error shows everywhere: No test methods found in the Apex code included in the package. At least 75% test coverage is required. – Rodolfo Lanshore Jan 21 '16 at 21:21
  • 2
    @RodolfoLanshore See Add a Test Class and How to Write Good Unit Tests. – sfdcfox Jan 21 '16 at 22:20
4

The way to create this is to create a managed Salesforce package.

That way your customers can use your controller and VF page, but they will not be able to access the source code of the Apex class. That will not hide your VF markup though.

  • I think user still able to view VF page code correct ? – Ratan Paul Jan 21 '16 at 17:18
  • 1
    You're right. I have double-checked and modified my answer accordingly. Thanks! – mkorman Jan 21 '16 at 17:21
  • This information redirect me to a lot of links, the manual, partner community. My question now is, do I need to be part of the salesforce partner community to enable this managed salesforce packages? So, it'll be through some kind of payment? – Rodolfo Lanshore Jan 21 '16 at 17:38
  • You don't need to be part of the partner community and it's absolutely free (unless you want it listed on the App Exchange). I will try to post a different link if I can find it. – mkorman Jan 22 '16 at 14:27
  • There is another writeup here (sfdcsrini.blogspot.com/2015/01/…), which seems to be a bit more step-by-step. – mkorman Jan 22 '16 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.