AnsweredAssumed Answered

Trying to understand the assigned_user field...

Question asked by Jaume Albaig├Ęs on Oct 27, 2014
This is a multi-question post. Will try to write properly... :-)

When you create a custom module, SugarCRM puts a bunch of default fields in it (Id, Name, Description and so on). One of those fields is the assigned_user, which, actually, is not a field... but three: assigned_user_name, assigned_user_id and assigned_user_link.

First question: why does SugarCRM need three fields to manage one single value and how does it use the three fields across the system? I can imagine part of the answer but would like to properly understand the whole issue.

Let's follow. Once you publish or deploy the custom module and create a record for the new module, the assigned_user value is not shown as a link in the detail view.

Second question: is this a bug?

More. If you make no edit in the Module Builder to the assigned_user field, no info related to this field is included in varderfs.php. SugarCRM will pull the info needed from its own base classes. That seems ok. But...

... if you make some edit to the field (for example, change the label or check the audit checkbox), then SugarCRM includes field info in vardefs.php "overriding" its own base info. That seems ok too. But...

... in what seems another bug, when you create or edit a record, you can't pull a user name via Ajax and the popup user list won't show anything. (At least part of) The reason is that in the info contained in vardefs.php the attribute module is set to empty instead of Users. So...

Third question: is this a bug too?

Thank you very much!

I am on SugarCRM CE 6.5.11.