List View doesn't show "Assigned to" field, even id the column is visible

Hello,

I would show in a List View the value of the field “Assigned to” .
I configured on Admin -> suite -> (my package) -> Layouts -> List View the field and deployed the new layout.
When I browse this list the column “Assigned to” is visible but it has no values.
It’s the same with other system filelds like “Created By”.

What am I missing ?

You’re missing telling us which SuiteCRM version you’re running :slight_smile:

No, seriously, I am guessing your issue is because you’re selecting fields that contain “ids” of users, not their actual names. So SuiteCRM avoids showing you something like 2c613c05-58c7-bdca-0157-5a61bfb52394 and just leaves a blank.

See if you can find a field called “assigned_to_name” or something similar. If not, there are ways to do it by editing files (instead of through the UI), but I’m not sure exactly how it’s done, sorry… try googling for it.

Hello, I’m using I’m using SuiteCrm 7.9.12.

The “Created By” and “Modified By Name” are two fields visible when I edit my custom object. They are empty when I see all records using the list view.

It’s pretty strange, I don’t understand what I’m missing.

There have been many versions after that one, maybe this is a bug already fixed.

You can try it on the live demo, this one has admin access:

https://www.softaculous.com/demos/SuiteCRM

I tried and you are right, I create one note and logged one call and the “Created by Name” is visible.
So the problem is in my custom object I suppose, but I also need to update my version.
Do you have any link to the guide on how to upgrade suiteCRM ? Thanks in advance.

Just make a proper backup, go to Admin / Upgrade Wizard and upload the upgrade package.

Hello, I updated to the latest version but the CREATED_BY_NAME field still missing in list view.

If I add this code in the listviewdefs.php I’m able to see the CREATED_BY ID, but I can’t see the creator name.

  'CREATED_BY_NAME' => 
  array (
    'type' => 'relate',
    'link' => true,
    'label' => 'LBL_CREATED',
    'id' => 'CREATED_BY',
    'width' => '10%',
    'default' => false,
	'customCode' => '{$CREATED_BY}'
  ),

Any suggestions? :frowning:

Here is a picture, I can also send the zipped full code of the custom module.

Why aren’t you simply adding the column to the List View in Studio?

I did it as my first attempt, here is a picture of the View List configuration using Studio. The field “created_by_name” is defined in the bottom of the left panel.

And what happens after creating in Studio and Deploying and doing a Quick Repair and Rebuild?

Do you see the Column there, but empty, or do you get no column at all?

At that moment, do you see any messages in your logs?

suitecrm.log
php_errors.log

Well, I see the column but empty. I can only see the ID after modifying the metadata\listviewdefs.php and adding the row

‘customCode’ => ‘{$CREATED_BY}’

in the $listViewDefs array.

I added the logs for reference. I don’t see any error.

The server in public, is possible to ask a quick check ? I can give the admin access.

This shouldn’t be happening

Fri May  4 15:27:24 2018 [3788][1][ERROR] Unable to find relationship sinis_segnalazione_created_by

If you do a Quick Repair and Rebuild, and scroll down to the bottom, do you see a button to sync vardefs? If so, press it.

Then do a Rebuild Relationships also (from Admin / repair).

Thank you, I synchronized the VarDef in the Repair page, but I still see these log errors :

Fri May  4 16:50:57 2018 [436][1][DEBUG] SugarBean[SINIS_Segnalazione].load_relationships, Loading relationship (created_by_link).
Fri May  4 16:50:57 2018 [436][1][ERROR] Unable to find relationship sinis_segnalazione_created_by
Fri May  4 16:50:57 2018 [436][1][WARN] created_by_link for sinis_segnalazione_created_by failed to load

Fri May  4 16:50:57 2018 [436][1][DEBUG] SugarBean[SINIS_Segnalazione].load_relationships, Loading relationship (assigned_user_link).
Fri May  4 16:50:57 2018 [436][1][ERROR] Unable to find relationship sinis_segnalazione_assigned_user
Fri May  4 16:50:57 2018 [436][1][WARN] assigned_user_link for sinis_segnalazione_assigned_user failed to load

Fri May  4 16:50:57 2018 [436][1][DEBUG] SugarBean[SINIS_Segnalazione].load_relationships, Loading relationship (modified_user_link).
Fri May  4 16:50:57 2018 [436][1][ERROR] Unable to find relationship sinis_segnalazione_modified_user
Fri May  4 16:50:57 2018 [436][1][WARN] modified_user_link for sinis_segnalazione_modified_user failed to load

What can I do in order to fix the missing relationships? Thanks in advance

I tried also to rebuild the relationships with no success.

That’s important! I’m sure something must have changed… are you sure your errors in the logs are after this change?

And when do the errors appear? Is it every time you show the List view?

Hello, I cleaned the logs and reload the list view, same error appears (at the end):


Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] current_language is: it_IT
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Found cache backend SugarCacheAPC
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Found cache backend SugarCacheFile
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Found cache backend SugarCacheMemcache
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Found cache backend SugarCacheMemcached
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Found cache backend SugarCacheMemory
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Using cache backend SugarCacheMemory, since 999 is less than 1000
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Found cache backend SugarCacheRedis
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Found cache backend SugarCachesMash
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Found cache backend SugarCacheWincache
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Using cache backend SugarCacheWincache, since 930 is less than 999
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Found cache backend SugarCacheZend
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Found language file: en_us.lang.php
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Found extended language file: en_us.lang.ext.php
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Found custom language file: en_us.lang.php
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Found language file: it_IT.lang.php
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Found extended language file: it_IT.lang.ext.php
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Found custom language file: it_IT.lang.php
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query:SELECT id, name, symbol, conversion_rate FROM currencies WHERE status = 'Active' and deleted = 0
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query Execution Time:0.00026297569274902
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] rebuilding cache for Users
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query:SELECT * FROM fields_meta_data WHERE  custom_module='Users' AND  deleted = 0
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query Execution Time:0.00026798248291016
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] rebuilding cache for Employees
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query:SELECT * FROM fields_meta_data WHERE  custom_module='Employees' AND  deleted = 0
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query Execution Time:0.00023794174194336
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] rebuilding cache for EmailAddresses
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query:SELECT * FROM fields_meta_data WHERE  custom_module='EmailAddresses' AND  deleted = 0
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query Execution Time:0.00023889541625977
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] rebuilding cache for UserPreferences
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query:SELECT * FROM fields_meta_data WHERE  custom_module='UserPreferences' AND  deleted = 0
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query Execution Time:0.00023102760314941
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] rebuilding cache for Administration
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query:SELECT * FROM fields_meta_data WHERE  custom_module='Administration' AND  deleted = 0
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query Execution Time:0.00025200843811035
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query:SELECT category, name, value FROM config
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query Execution Time:0.00023984909057617
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query:SELECT id FROM outbound_email WHERE type = 'system'
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query Execution Time:0.00016307830810547
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query:SELECT * FROM outbound_email WHERE id = 'd734aed5-87dd-0a0e-04a7-5a7cd12c6dc4'
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query Execution Time:0.00017905235290527
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Hook called: ::after_entry_point
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Including module specific hook file for custom/modules
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Including Ext hook file for custom/application
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Hook called: ::after_session_start
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Unable to find SugarController:: index
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] We have an authenticated user id: 1
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Hook called: Users::before_retrieve
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Including module specific hook file for custom/modules/Users
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Retrieve User : SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0
Fri May  4 18:23:15 2018 [3784][-none-][DEBUG] Limit Query:SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 Start: 0 count: 1
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query:SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1
Fri May  4 18:23:15 2018 [3784][-none-][INFO] Query Execution Time:0.000244140625
Fri May  4 18:23:15 2018 [3784][1][DEBUG] get_user_array query: SELECT id, first_name, last_name, user_name FROM users WHERE 1=1 ORDER BY first_name, last_name ASC
Fri May  4 18:23:15 2018 [3784][1][INFO] Query:SELECT id, first_name, last_name, user_name FROM users WHERE 1=1 ORDER BY first_name, last_name ASC
Fri May  4 18:23:15 2018 [3784][1][INFO] Query Execution Time:0.00023221969604492
Fri May  4 18:23:15 2018 [3784][1][INFO] Query:SELECT u1.first_name, u1.last_name from users  u1, users  u2 where u1.id = u2.reports_to_id AND u2.id = '1' and u1.deleted=0
Fri May  4 18:23:15 2018 [3784][1][INFO] Query Execution Time:0.00018000602722168
Fri May  4 18:23:15 2018 [3784][1][DEBUG] SugarBean[User].load_relationships, Loading relationship (reports_to_link).
Fri May  4 18:23:15 2018 [3784][1][INFO] Query:SELECT 
                    ea.email_address,
                    ea.email_address_caps,
                    ea.invalid_email,
                    ea.opt_out,
                    ea.confirm_opt_in,
                    ea.date_created,
                    ea.date_modified,
                    ear.id,
                    ear.email_address_id,
                    ear.bean_id,
                    ear.bean_module,
                    ear.primary_address,
                    ear.reply_to_address,
                    ear.deleted
                FROM email_addresses ea LEFT JOIN email_addr_bean_rel ear ON ea.id = ear.email_address_id
                WHERE 
                    ear.bean_module = 'Users'
                    AND ear.bean_id = '1'
                    AND ear.deleted = 0
                ORDER BY ear.reply_to_address, ear.primary_address DESC
Fri May  4 18:23:15 2018 [3784][1][INFO] Query Execution Time:0.0003209114074707
Fri May  4 18:23:15 2018 [3784][1][DEBUG] Hook called: Users::after_retrieve
Fri May  4 18:23:15 2018 [3784][1][DEBUG] FACTOR AUTH: -------------------------------------------------------------
Fri May  4 18:23:15 2018 [3784][1][DEBUG] FACTOR AUTH: --------------------- CHECK FACTOR AUtH ---------------------
Fri May  4 18:23:15 2018 [3784][1][DEBUG] FACTOR AUTH: -------------------------------------------------------------
Fri May  4 18:23:15 2018 [3784][1][DEBUG] FACTOR AUTH: User needs factor auth, request is not Logout
Fri May  4 18:23:15 2018 [3784][1][DEBUG] FACTOR AUTH: User does`nt need factor auth
Fri May  4 18:23:15 2018 [3784][1][DEBUG] Current user is: admin
Fri May  4 18:23:15 2018 [3784][1][DEBUG] Current user is: admin
Fri May  4 18:23:15 2018 [3784][1][DEBUG] setting cookie ck_login_id_20 to 1
Fri May  4 18:23:15 2018 [3784][1][DEBUG] setting cookie ck_login_language_20 to en_us
Fri May  4 18:23:15 2018 [3784][1][DEBUG] current_language is: en_us
Fri May  4 18:23:15 2018 [3784][1][INFO] Found language file: it_IT.lang.php
Fri May  4 18:23:15 2018 [3784][1][INFO] Found extended language file: it_IT.lang.ext.php
Fri May  4 18:23:15 2018 [3784][1][INFO] Found custom language file: it_IT.lang.php
Fri May  4 18:23:15 2018 [3784][1][INFO] Found language file: en_us.lang.php
Fri May  4 18:23:15 2018 [3784][1][INFO] Found extended language file: en_us.lang.ext.php
Fri May  4 18:23:15 2018 [3784][1][INFO] Found custom language file: en_us.lang.php
Fri May  4 18:23:15 2018 [3784][1][INFO] Found language file: it_IT.lang.php
Fri May  4 18:23:15 2018 [3784][1][INFO] Found language file: en_us.lang.php
Fri May  4 18:23:15 2018 [3784][1][INFO] Found extended language file: it_IT.lang.ext.php
Fri May  4 18:23:15 2018 [3784][1][INFO] Found custom language file: it_IT.lang.php
Fri May  4 18:23:15 2018 [3784][1][INFO] Found extended language file: en_us.lang.ext.php
Fri May  4 18:23:15 2018 [3784][1][INFO] Found custom language file: en_us.lang.php
Fri May  4 18:23:15 2018 [3784][1][DEBUG] rebuilding cache for SINIS_Segnalazione
Fri May  4 18:23:15 2018 [3784][1][INFO] Query:SELECT * FROM fields_meta_data WHERE  custom_module='SINIS_Segnalazione' AND  deleted = 0
Fri May  4 18:23:15 2018 [3784][1][INFO] Query Execution Time:0.00041699409484863
Fri May  4 18:23:15 2018 [3784][1][DEBUG] Performing action: action_listview MODULE: SINIS_Segnalazione
Fri May  4 18:23:15 2018 [3784][1][WARN] Image Add.gif not found
Fri May  4 18:23:15 2018 [3784][1][DEBUG] rebuilding cache for Favorites
Fri May  4 18:23:15 2018 [3784][1][INFO] Query:SELECT * FROM fields_meta_data WHERE  custom_module='Favorites' AND  deleted = 0
Fri May  4 18:23:15 2018 [3784][1][INFO] Query Execution Time:0.0003359317779541
Fri May  4 18:23:15 2018 [3784][1][INFO] Query:SELECT parent_id, parent_type FROM favorites WHERE assigned_user_id = '1' AND deleted = 0 ORDER BY date_entered DESC
Fri May  4 18:23:15 2018 [3784][1][INFO] Query Execution Time:0.0032849311828613
Fri May  4 18:23:15 2018 [3784][1][DEBUG] rebuilding cache for Trackers
Fri May  4 18:23:15 2018 [3784][1][INFO] Query:SELECT * FROM fields_meta_data WHERE  custom_module='Trackers' AND  deleted = 0
Fri May  4 18:23:15 2018 [3784][1][INFO] Query Execution Time:0.00021195411682129
Fri May  4 18:23:15 2018 [3784][1][DEBUG] Limit Query:SELECT item_id, item_summary, module_name, id FROM tracker WHERE id = (SELECT MAX(id) as id FROM tracker WHERE user_id = '1' AND deleted = 0 AND visible = 1) Start: 0 count: 50
Fri May  4 18:23:15 2018 [3784][1][INFO] Query:SELECT item_id, item_summary, module_name, id FROM tracker WHERE id = (SELECT MAX(id) as id FROM tracker WHERE user_id = '1' AND deleted = 0 AND visible = 1) LIMIT 0,50
Fri May  4 18:23:15 2018 [3784][1][INFO] Query Execution Time:0.0013718605041504
Fri May  4 18:23:15 2018 [3784][1][INFO] Tracker: retrieving 10 items
Fri May  4 18:23:15 2018 [3784][1][WARN] Image Add.gif not found
Fri May  4 18:23:15 2018 [3784][1][WARN] Image Schedule_Meeting.gif not found
Fri May  4 18:23:15 2018 [3784][1][WARN] Image Schedule_Call.gif not found
Fri May  4 18:23:15 2018 [3784][1][WARN] Image Create.gif not found
Fri May  4 18:23:15 2018 [3784][1][WARN] Image Today.gif not found
Fri May  4 18:23:15 2018 [3784][1][WARN] Image Add.gif not found
Fri May  4 18:23:15 2018 [3784][1][DEBUG] metadatafile=custom/modules/SINIS_Segnalazione/metadata/listviewdefs.php
Fri May  4 18:23:15 2018 [3784][1][DEBUG] get_user_array query: SELECT id, first_name, last_name, user_name from users WHERE status='Active' AND portal_only=0  ORDER BY first_name, last_name ASC
Fri May  4 18:23:15 2018 [3784][1][INFO] Query:SELECT id, first_name, last_name, user_name from users WHERE status='Active' AND portal_only=0  ORDER BY first_name, last_name ASC
Fri May  4 18:23:15 2018 [3784][1][INFO] Query Execution Time:0.00041508674621582
Fri May  4 18:23:15 2018 [3784][1][INFO] List View Where Clause: 
Fri May  4 18:23:15 2018 [3784][1][DEBUG] rebuilding cache for SavedSearch
Fri May  4 18:23:15 2018 [3784][1][INFO] Query:SELECT * FROM fields_meta_data WHERE  custom_module='SavedSearch' AND  deleted = 0
Fri May  4 18:23:15 2018 [3784][1][INFO] Query Execution Time:0.0002741813659668
Fri May  4 18:23:15 2018 [3784][1][INFO] Query:SELECT id, name FROM saved_search
				  WHERE
					deleted = '0' AND
				  	assigned_user_id = '1' AND
					search_module =  'SINIS_Segnalazione'
				  ORDER BY name
Fri May  4 18:23:15 2018 [3784][1][INFO] Query Execution Time:0.00093889236450195
Fri May  4 18:23:15 2018 [3784][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Fri May  4 18:23:15 2018 [3784][1][INFO] Query:SELECT id, name FROM saved_search
                  WHERE
                    deleted = '0' AND
                    assigned_user_id = '1' AND
                    search_module =  'SINIS_Segnalazione'
                  ORDER BY name
Fri May  4 18:23:15 2018 [3784][1][INFO] Query Execution Time:0.00041389465332031
Fri May  4 18:23:15 2018 [3784][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Fri May  4 18:23:16 2018 [3784][1][DEBUG] SugarBean[SINIS_Segnalazione].load_relationships, Loading relationship (created_by_link).
Fri May  4 18:23:16 2018 [3784][1][ERROR] Unable to find relationship sinis_segnalazione_created_by
Fri May  4 18:23:16 2018 [3784][1][WARN] created_by_link for sinis_segnalazione_created_by failed to load

Fri May  4 18:23:16 2018 [3784][1][DEBUG] SugarBean[SINIS_Segnalazione].load_relationships, Loading relationship (assigned_user_link).
Fri May  4 18:23:16 2018 [3784][1][ERROR] Unable to find relationship sinis_segnalazione_assigned_user
Fri May  4 18:23:16 2018 [3784][1][WARN] assigned_user_link for sinis_segnalazione_assigned_user failed to load

Fri May  4 18:23:16 2018 [3784][1][DEBUG] SugarBean[SINIS_Segnalazione].load_relationships, Loading relationship (modified_user_link).
Fri May  4 18:23:16 2018 [3784][1][ERROR] Unable to find relationship sinis_segnalazione_modified_user
Fri May  4 18:23:16 2018 [3784][1][WARN] modified_user_link for sinis_segnalazione_modified_user failed to load

Here are also the two zipped folders of my custom module, I hope it may help:

custom\modules\SINIS_Segnalazione
\modules\SINIS_Segnalazione

The custom module name is “SINIS_Segnalazione”

Sorry, I don’t have time (much less on a weekend) to start installing other people’s code and trying to debug it.

I’m afraid I don’t know how to help you further. Maybe you can try redoing the module, watching carefully the logs for any errors during the Studio actions and deployment. Maybe then you will see an error that gives you a clue to a solution…

Hello, I understand perfectly your point of view.
Can you suggest me an alternative way to show this created_by_name field?
I mean, is possible doing this using a customcode attribute in the listviewdefs.php? Or do I need to create custom variables and uae the. In the listviewdefs.php?

Thank you for your time and help.