SugarCRM Account Re-assign Logic Hook

This SugarCRM Logic Hook was used to overcome a common issue with SugarCRM. SugarCRM CE doesn’t automatically reassign an Account’s related contacts when the Account is reassigned. This often creates visibility/usability issues due to the lack of permissions (roles). The logic hook below reassigns the Accounts related contacts and opportunities saving you the time of doing it manually as well as preventing multiple contact issues. This logic hook also manages a reassigning mapping to general store users based on status set. … Continue reading SugarCRM Account Re-assign Logic Hook

SugarCRM Leads Logic Hook

This SugarCRM logic hook was used to automatically assign leads to users based on status. This mapping was required to help users reassign leads to users such as the “Dead Targets User”. See the logic hook below for the mapping details. In order for this Logic Hook to function the Usernames must exist. … Continue reading SugarCRM Leads Logic Hook

SugarCRM Users Logic Hooks

Custom Logic Hooks are a great way of adding functionality to SugarCRM. The logic hook below was used to establish a default role for new users. This was required for the automatic LDAP Users functionality that is built into SugarCRM. This logic hook was used with SugarCRM CE 5.2 in a production environment.

<?php
// custom/modules/Users/logic_hooks.php

// Do not store anything in this file that is not part of the array or the hook version. This file will
// be automatically rebuilt in the future.
$hook_version = 1;
$hook_array = Array();
// position, file, function
$hook_array['after_login'] = Array();
$hook_array['after_login'][] = Array(1, ‘SugarFeed old feed entry remover’, … Continue reading SugarCRM Users Logic Hooks