2

I'm working on a project for which we have enabled a community on a sandbox. We have removed most of the pages and classes that were automatically generated when a community or site is created (for instance MyProfile.page, ChangePassword.page, etc) and created some custom pages for those functions.

We have put all our metadata in a repository and are able to deploy the changes to a different sandbox. When we deploy the revision with all the community-stuff in it to a different sandbox, it all works as expected and the community/site is enabled on the sandbox. However, all of the default pages and classes are also generated. Is there a way to prevent Salesforce from creating all those classes and pages when a site is created?

1 Answer 1

1

Looks like you should refresh the sandbox from the PRODUCTION before starting deployment on the same .

The other way could be write a destructive XML script that has list of all class names and page names you want to delete it and run this script using ANT everytime you do a deployment .

2
  • The production environment does not have the community yet. That's part of the problem, we want to be able to deploy our community from the repository to the production environment, without having to manually remove the additional standard stuff from there. I'm exploring the possibilities of the destructiveChanges.xml file now. Aug 4, 2016 at 12:00
  • I was looking at my history of questions and realized I have some question with no accepted answer. I did in the end use a destructiveChanges file. I could not find a way to actually prevent the files from being created. Mar 15, 2017 at 6:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .