For more information about this, see this post.
- A salesforce organisation with my domain enabled and setup correctly
- At least one force.com site
- This unmanaged package
Install the package in the org you wish to try it in (can be a sandbox)
Ensure the package is installed for admins only
Once installed, go to the ‘Maintenance Config’ tab by clicking the ‘+’ button on the tab bar and click the ‘Perform Initial Setup’ button. You only need to click this once.
Once this has completed successfully, you will see the below;
Next, go to Setup > Develop > Sites
If you have a force.com site already, you can skip this step next two steps
Enter a domain name you wish to use (remember, you cannot modify this once its been set) and press ‘Check Availability’ Once you have chosen a domain that is avaiable, accept the terms and conditions and press ‘Register My Force.com Domain’
Now, click ‘New’ and configure the site as follows;
Site Label: Maintenance Site
Active Site Home Page: SFDCMaintLoginSidebar
Default Web Address: maint
Clickjack Protection Level: allow framing by any page
Accept the defaults for the rest of the fields
If you have an existing force.com site, under ‘Site Visualforce Pages’ click ‘Edit’
and then add the ‘SFDCMaintLoginSidebar’ page to the ‘Enabled Visualforce Pages’ section
Ensure you have activated your force.com site when you are finished.
Once you have done this, Setup > Administer > Domain Management > My Domain
Under the ‘Authentication Configuration’ Heading, click ‘Edit’
Populate the ‘Right Frame URL’ with the URL of your force.com site and press save.
Once you have completed these steps, logout of salesforce to check your changes have worked.
Make sure you login using your domain (not login.salesforce.com)
Once logged in, go to Setup > Develop > Custom Metadata Types
Select ‘Manage Records’ next to ‘Salesforce Maintenance Exempt User’
Create a new record, and populate the details of the user you want to exclude from Maintenance freezes (e.g DevOps, System Admin)
Once complete, go to the ‘Maintenance Configuration’ tab and press ‘Enable Maintenance Mode’
Any users who are not exempt will be frozen, and you will a different login page