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
davcondevdavcondev 

communitiesselfregcontroller

I'm messing around with managed packages and I have included some customized oob communities code.

Two situations I can see: install managed package and then enable communities, or vice versa. I'm guessing last install wins in these cases?
Carolina Ruiz MedinaCarolina Ruiz Medina
Hi Davcondev,
As you know it is not possible to package communities, however it is possible to package any class. But I'm wondering what exactly do you need, as if you package a selfregcontroller this one will make reference to an account. This could be obviously dinamic to be set up through a custom setting. 

Comming back to your question, I'm guessing that what you would like to do is to use the packaged code in the creation of a new community, in its selfregcontroller, is it correct? 
Then you can enable communities first, or after install the package, because at any time you will need to manually edit the selfregcontroller to make reference to your classes.  Obviously if you enable and create before you have the package you won't be able to make reference to your code till the package is installed.

Hope it helps :) 

Carolina Ruiz MedinaCarolina Ruiz Medina
Oh! as a little note, remeber if you need to use classes from a managed package this ones need to be global. ( I think you alreday know :) )