Change user when isn't administrator

Hey,

The linked thread above should hopefully show you the format of where to add the code, but it should be as follows:

Create a new file at:
/custom/Extensions/modules/Accounts/Ext/Logichooks/

(if this directory does not exist, feel free to create it)

With content like the following:

<?php
$hook_array['before_save'][] = Array(1, 'Dont allow editing of Assignee', 'custom/modules/Accounts/keepAssignee.php','keepAssigneeC', 'keepAssigneeF');

(Feel free to rename any files/functions/classes )

Then, in the location specified in the Logic Hook line created above, create a file with the same name
(ie: in custom/modules/Accounts/ location, i created ‘keepAssignee.php’)

In this file, I added the code snippet posted in my first reply


Then, in the CRM Run a Quick Repair and Rebuild
Just to note, the code doesn't fully do what you have requested above But it should prevent non-admin users from changing the “Assigned User” value.

Let me know if you have any issues with the above