Upgrade safe approach is best development practice not only sugarCRM but all type of coding specially in open source projects. In sugarCRM upgrade safe approch means upgrade code without loss of modification/customization,
If our modules/plugins or other customization are upgrade safe then we will no loss data/customization in future when upgrade the sugar version or upgrade any modules etc.
SugarCRM provide high level of safe upgrade cutomization with custom folder. for example if we are customizing any module we should copy the file in custom folder then modify. When sugarCRM upgrade then it modify core files, and custom folder remains same. Thus our customization become safe.
To modify list view or any other view we can follow sugar mvc customization. Create controller in /custom/modules/MODULENAME/Controller.php. This controller will look for action in /custom/modules/MODULENAME/__actionfile__.php and then it checks for its view in /custom/modules/MODULENAME/views/view.VIEWNAME.php. This is mvc approcah of sugar and we can use it for safe upgrade
Customization of layout files can be 2 types one is theme level and other is view level. In theme level we can override layout of theme including header footer etc and these file can be store in cutom/themes/Sugar/tpls, originally. These files are available at /themes/Sugar/tpls.
In view level customization we can override view.edit.php predisplay function. To do this create a view i.e. view.edit.php in custom/module_name/views/. After this create tpl file in \custom\include\EditView\EditView.tpl
Sugar beans are very useful to access data without using sql. mostly all types of query area available in beans
$mybean = new Contact(); $mybean->retrieve('contact id'); $mybean>load_relationship('module name'); $mybean->name = 'ne name'; $mybean->save();