Set "Assign to" as manual

For “Assigned to” field, is it possible to disable the automatic assignment of my name to every account, contact, activities task, notes, history, etc. that I created? There are another fields that already does the same thing and these are “Date Created”, “Date Modified”, “Created By”, etc.

Automatic assignment are unnecessarily cluttering my list on the dashboard and it is a hassle going through each record to remove myself. In my opinion, “assigned to” should be left empty at time of creation and be set as manual for selective delegation.

you have many options, if you don’t want to use the “Assigned to” at all, you can remove it from studio, you will be able to create things but they wont be assigned to anyone, if you want to unset the default Assigned to “yourself” you can create a JavaScript file that do this, if you just want to save things but without assigned to filled, you can create a before_save logic hooks to achieve this.

best regards

Actually I will like to use the Assigned to but tweak its behaviour by keeping the field empty at time of record creation. Can you please provide me more details on before_save logic hook as this might be what I’m looking for? Thanks.

if you want to keep it empty in all modules you can modify this file include/EditView/EditView2.php and comment out this line

$this->focus->assigned_user_id = $current_user->id;

but this is not upgrade safe, and I don’t know how to make it upgrade safe,maybe a dev can help. If you want to make it upgrade safe for each module you can create a javascript file, call it in each module and unset the id.

this is with logic hooks but it wont set in empty, it will just remove it before it gets saved to the database



$hook_version = 1;
$hook_array   = Array();

$hook_array['before_save']   = Array();
$hook_array['before_save'][] = Array(
	//Processing index. For sorting the array.
	//Label. A string value to identify the hook.
	'before_save example',
	//The PHP file where your class is located.
	//The class the method is in.
	//The method to call.




    if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    class logic_hooks_class
        function before_save_method($bean, $event, $arguments)
            $bean->assigned_user_id = false;
            $bean->assigned_user_name = false;


best regards

1 Like