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

Install the application to the default layout.


We are finishing the development of our application and would like to customize the installation process.

Actually we are interested in such behavior: 

The installation request user if he interested to put the application to the default layout. If yes we should add it to his layout. In other case do nothing. 

If such behavior is not possible, how can we put the application to the users default layout during the installation without the request?


I don't believe there is a way to do this. Changing page layout assigment remains an activity performed by the adminstrator exclusively through the system-provided tools under the Setup menu. 


The nearest we found to this was by assigning Custom Profiles to Page Layouts and then distributing the Profiles and Layouts with the package. This requires the Administrator installing to the Package to assign your Custom Profiles to the nearest equivalents in his Org.


The best technique is to have the Adminisrator create some 'stub' profiles with the same names as the 'real' profiles in your package. For example have the admin clone the Platform User profile and name it after one of the profiles you've created. When the admin installs your package there is step in which he can assign your profiles (and the associated layouts) to his 'stub' profiles. Then he just assigns Users to the Profiles and off you go.