I am running the latest version of Suite, please can anyone advise on how I change change the default user that a case is assigned to when logged?
I have set up a default user called Unassigned and would like everything to be logged under this user. I am aware that a workflow can be created for this however I am wondering if this can be done directly in the code?
You would be able to do this in the code via use of Logic Hooks. This would require some php knowledge to do.
You can find information on logic hooks: Here
I also wrote a post briefly explaining the process leading up to actually coding the hook: Here
If you need more clarification or help then feel free to ask
I found the below code which I thought would do what I wanted:
function display(){
if (empty($this->bean->fetched_row[‘id’]))
{
//Replace ‘Test User’ with the ‘Full Name’ value of the desired user
$this->bean->assigned_user_name = ‘Test User’;
//Replace the ID value below with that corresponding to the test user
$this->bean->assigned_user_id = 'f301e272-bdac-51a2-248b-4e1b5d2e3d95';
The following worked for me earlier, so it should hopefully work for you:
if (empty($bean->fetched_row[‘id’])){
$bean->assigned_user_id = " <ID> ";
}
Where I have entered , You should enter in the ID of User “unassigned”.
If you don’t know it, You can find this in your database table “users” and under the column “modified_user_id”. It will be a long string made up of letters, numbers and dashes.
Afterwards, run a Quick Repair and Rebuild from the admin menu and Clear your browser’s cache before testing it out.