#474 - User created records - Limit "Assigned To" Field To Read Only
Can the above be done? What I'm looking at is to restrict the user from having the ability to assign their records to other users from the "Assigned To" field.
Can the above be done? What I'm looking at is to restrict the user from having the ability to assign their records to other users from the "Assigned To" field.
10 years ago
Although SugarCRM doesn't work that way by default, you can customize it to do so.
With SecuritySuite you may be able to do this by create a custom view for a specific group in Studio and hide the Assigned To field on the edit view.
Otherwise, one way would to be create a before_save logic hook. In it detect if it is a certain user that shouldn't be able to reassign such as if they are in a certain group. If so, then make sure that the assigned_user_id is set back to the original assigned_user_id value (generally this is in $bean->fetched_row['assigned_user_id']).
10 years ago
Hi there,
The first suggestion would not work as hiding the Assigned To field on the edit view will result in the record not being assigned to any user.
Apologies, as I don't understand coding that much, so it doesn't make sense to me.
10 years ago
Did you try the first suggestion? It should work to hide the field. Typically SugarCRM will default the Assigned To user to the current user on a new record if you hide that field. It will keep it the same as it was before if it is an edit.
10 years ago
When you mentioned "hide", I take it you meant to remove Assigned To field from the Edit view layout? If yes, then I can say for sure it doesn't work.
SugarCRM will default to the current user on a new record only if you have the field on the edit layout. Removing it will cause the record to not have any user assigned to it. This happens when the user (non-admin) is the one creating new records.
10 years ago
Well that's no good then. If you did have someone who could do a little code then this would work along with having a logic hook that set the assigned_user_id upon save. I don't know of a solution then that won't require some amount of custom code. It's just a little bit off of how SugarCRM is designed to work.
10 years ago
Other than having to learn about coding a logic hook, can a workflow handle this? I had a look around at the module and it seems possible?
I'm using SuiteCRM by the way.
10 years ago
Yes, most of the time workflows will do the job. It all depends on the workflow tool. I believe SuiteCRM has a way for you to set the assigned user based on some condition such as which group a user belongs to.