Hello community,
I am getting into the development of suitecrm and have some questions regarding customization.
I have made changes to the pdf export and csv export in list view in the following files:
include/export_utils.php (override of export method)
modules/AOS_PDF_Templates/formLetterPdf.php
modules/AOS_PDF_Templates/generatePdf.php
I have been trying to put these files in the custom/modules/AOS_PDF_Templates/ and custom/include/ folder but the changes will not override the original files.
Is there any way to make these changes upgrade safe?
Thanks for any help!!
generatePdf and formLettter are an entry points. They are defined in include/MVC/Controller/entry_point_registry.php. So in order to make an upgrade safe changes you need to create a file for each entry point in custom/Extension/application/Ext/EntryPointRegistry/
generatePdf.php
<?php
$entry_point_registry['generatePdf'] = array(
'file' => 'custom/modules/AOS_PDF_Templates/generatePdf.php',
'auth' => true,
);
formLetter.php
<?php
$entry_point_registry['formLetter'] = array(
'file' => 'custom/modules/AOS_PDF_Templates/formLetterPdf.php',
'auth' => true,
);
This will allow you to change the path of the files.
The export_utils are being used by export.php - which is also a entry point. So if you wish to change the export function you will need to create a custom version of the export.php file and then replace the require_once(βinclude/export_utils.phpβ); statement with location of your file. Then add an other file to custom/Extension/application/Ext/EntryPointRegistry/
<?php
$entry_point_registry['export'] = array(
'file' => 'custom/export.php',
'auth' => true,
);
Once you have defined the custom entry points you will need to reset your file permission (if you are using Linux or Mac) and then run a repair and rebuild.
2 Likes