I do not have access to the backend of my version of SuiteCRM and want to hide SubPanels in certain Modules, so I know how to do it in an upgrade safe way by creating a custom layoutdef.php BUT I was curious whether anyone knows how I can create a module that I can upload to Suite using the Module Loader that will just place the layoutdefs where I need it?
Hi,
You need not create a module for upload the custom layoutdef.php in SuiteCRM.
You can create a package that has manifest.php that copy the file and custom folder that contains the layoutdef.php.
Manifest Code for Copy the File in SuiteCRM:-
<?php
/**
*
* SugarCRM Community Edition is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
*
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
*/
// THIS CONTENT IS GENERATED BY MBPackage.php
$manifest = array (
0 =>
array (
'acceptable_sugar_versions' =>
array (
0 => '6.5.25',
),
),
1 =>
array (
'acceptable_sugar_flavors' =>
array (
0 => 'CE',
1 => 'PRO',
2 => 'ENT',
),
),
'readme' => '',
'key' => 'outr',
'author' => 'Outright',
'description' => '',
'icon' => '',
'is_uninstallable' => true,
'name' => 'Outright_upload_Custom_Layout',
'published_date' => '2019-09-18 09:14:13',
'type' => 'module',
'version' => 1568798053,
'remove_tables' => 'prompt',
);
$installdefs = array(
'id' => 'package_1391608631',
'copy' => array(
0 => array(
'from' => '<basepath>/Files/custom/modules/Accounts/myFile1.php',
'to' => 'custom/modules/Accounts/myFile1.php',
),
1 => array(
'from' => '<basepath>/Files/custom/modules/Accounts/myFile2.php',
'to' => 'custom/modules/Accounts/myFile2.php',
),
2 => array(
'from' => '<basepath>/Files/custom/modules/Accounts/myFile3.php',
'to' => 'custom/modules/Accounts/myFile3.php',
),
),
);
?>
Thank You!
That is exactly what I needed just was not 100% confident as to the process. Your advice was perfect.
Thanks
Is their a similar way that you can use this method to remove relationships/change relationships that were not created in Studio?
Hi,
Can you please explain the purpose of updating the existing relationship in the SuiteCRM so I can understand the exact requirement and help you.
Thank You!
Hi
My Accounts to Projects is a many-to-many relationship but I would like to change it to a one-to-many relationship so that one account can have many projects.
By doing one-to-many I will then also get the subpanel in Accounts effectively showing the Projects.
Hope that makes sense
Hi,
Thank you for the explanation. I understood the requirement.
You can hide the account subpanel from code and create a new relationship one-to-many between accounts and projects.
Because itβs not advisable to modify the existing relationship of SuiteCRM.
Thank You!