Tag: sugarcrm

Add tracking icon and popup in Listview

  Tracking_orders.php:::::::::::::::: <?php  $track=$_REQUEST['trackcode'];  if($track)  {  $track=preg_replace('/\s+/', '', $track); if(startsWith($track, "JC")==true) { $link = "<script>window.open('https://www.roylmail.com/track-your-item?trackNumber=".$track."', 'width=710,height=555,left=160,top=170')</script>"; } else { $link = "<script>window.open('http://www.parceforce.com/track-trace?trackNumber=".$track."', 'width=710,height=555,left=160,top=170')</script>"; } echo $link; echo "<script type=\"text/javascript\" charset=\"utf-8\">window.self.close()</script>";  }  else  { echo "Invalid Tracking Code"; } function startsWith($haystack, $needle) {     // search backwards starting from haystack length characters from the end…
Read more


May 29, 2018 0

Disable Dahslets and AddDashlet button for all users

1) step: Open file : sugarcrm/modules/Home/index.php comment line 280 $sugar_smarty->assign('maxCount', empty($sugar_config['max_dashlets_homepage']) ? 15 : $sugar_config['max_dashlets_homepage']); $sugar_smarty->assign('dashletCount', $count); $sugar_smarty->assign('dashletIds', '["' . implode('","', $dashletIds) . '"]'); //$sugar_smarty->assign('columns', $display); 2) perform repair. 3) now Dahslet will be disable from all users FOR DISABLE ADD-Dashlet Button. Goto => System Setting  Click on Prevent user customizable Homepage layout: checkbox. Result : Without…
Read more


January 2, 2014 0

SugarCRM Quote PDF customization

1) Customize Fonts in default PDF of SugarCRM copy and Edit  custom/modules/Quotes/sugarpdf/sugarpdf.quotes.php add html tag for font. like '<b>'.value.'</b>' for bold '<u>'.value.'</u>' for underline '<i>'.value.'</i>' For Example you want to change for quote number :  Code:  1.(For Label) : $quote[0]['TITLE'] = '<u><b><i>'.$mod_strings['LBL_PDF_QUOTE_NUMBER'].'</i></b></u>';                  2.(For Value)     :  …
Read more


September 29, 2013 0

Duplicate Finder

This is what i have find during surfing on internet, Give an indication next to phone number if it is found to be repeated over various Contacts : 1.Create a process_record logic hook in custom/modules/Contacts/logic_hooks.php <?php $hook_array['process_record'][] = Array(1, 'Check Dup', 'custom/modules/Contacts/checkDup.php','checkDupC', 'checkDupF'); 2. Create a file checkDup.php in SugarCRM/custom/modules/Contacts/ <?php class checkDupC{ function checkDupF($bean){…
Read more


July 7, 2013 0

Dependable Required Field

e.g.:         My Module Name : Desner        Field                   : desnerStatus_c ( DropDown ) (Values :  nitin, blog, spot, nrsd) Condition : if i select nrsd from desnerStatus_c dropdown want description required else remove validation. Step1: Copy or make path like Sugarcrm/custom/modules/Desner/views/view.edit.php Step2: copy…
Read more


June 26, 2013 0

Hide Subpanel from Module

Want to Hide Subpanel from Module Permanently? Goto : sugarcrm/custom/Extension/modules/Leads/Ext//Layoutdefs/ see for the  layoutdefs.ext.php if not than create. ( e.g. hide champaign subpanel ) edit that file and add line: unset($layout_defs['Leads']['subpanel_setup']['campaigns']);  Than repair and rebult. Note: You need to create the folders and files if they doesn´t exist.              If you…
Read more


May 29, 2013 0

Copy Field into Related SubPanel

Copy Fields from parent module to related module at real time, e.g : Need to create case from contacts and want contact field fill in new created case. Steps => 1 Go to studio and create related field of Contacts in Case module. Make this field in Edit View, Detail View and Quick Create view.…
Read more


April 2, 2013 0

Add Field in Address

1) make fields name area_c by studio in contacts and accounts and leads 2) change in /include/SugarFields/Fields/Address/EditView.tpl add line one line after country {{assign var="area" value=$displayParams.key|cat:'_address_area_c'}}  after that add one TR : <tr> <td id="{{$area}}_label" width='{{$def.templateMeta.widths[$smarty.foreach.colIteration.index].label}}%' scope='row' > {sugar_translate label='LBL_AREA' module='{{$module}}'}: {if $fields.{{$area}}.required || {{if $area|lower|in_array:$displayParams.required}}true{{else}}false{{/if}}} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span> {/if} </td> <td> <input type="text" name="{{$area}}" id="{{$area}}"…
Read more


March 19, 2013 0

Show and hide Panel on load and click on checkbox

Step1: Create one .js file in root /var/www/crm/*.js Step2: include file in editview.php step3: onload run file: step4: call function on checkbox event:


March 10, 2013 0

Disable Last view in SugarCRM

There is two way to disable lastview. 1) you can write logic hook in custom/modules/Users/logic_hook.php after_retrive AND delete all data write in tracker table. 2) if You want to disable for perticular Module, for e.g. Disable for Account module go to modules/Accounts/account.php find get_summary_text() function comment (//) return value. Best of Luck…


January 29, 2013 0