Dashlet Filter on Relate field returns no data

Hello.

I think this is a core function of SuiteCRM.

Can any body help to find a code fix for this issue: https://github.com/salesagility/SuiteCRM/issues/6577

In Dashlet, search filter returns “no data” result if we apply search for any relate field for that specific module.

Thanks very much

Hi,

Issue fixed on SuiteCRM 7.11.7, Please try on the latest version.

Please take the backup of CRM and database before upgrade to the latest version.

If you have any query please let me know.

Thank You!

Hi and thank you very much for your message.

I am actually using suitecrm Version 7.11.7.
And the error is still there…
Are you sure it has been solved?

Best regards.

Hi,

Yes, we have installed the fresh SuiteCRM 7.11.7 and create a custom relate field and it’s working fine in the dashlet filter functionality.

Please check on fresh SuiteCRM 7.11.7 may be functionality break from some customization.

Thank You!

Thank you for your answer Ashish,

I just tested by creating a custom relate field for my custom module using Studio => I can filter by this relate field in dashlet
I added a field to my custom module vardefs using the same code as generated by Module Builder (below) => I can’t filter bu this relate field in dashlet

Could you help me and tell me where I am wrong in the code ?

'manager_id' => 
    array (
      'required' => false,
      'name' => 'manager_id',
      'vname' => 'LBL_MANAGER_ID',
      'type' => 'id',
      'massupdate' => 0,
      'no_default' => false,
      'comments' => '',
      'help' => '',
      'importable' => 'true',
      'duplicate_merge' => 'disabled',
      'duplicate_merge_dom_value' => 0,
      'audited' => false,
      'inline_edit' => true,
      'reportable' => false,
      'unified_search' => false,
      'merge_filter' => 'disabled',
      'len' => 36,
      'size' => '20',
    ),
'manager_name' => 
    array (
      'required' => false,
      'source' => 'non-db',
      'name' => 'manager_name',
      'vname' => 'LBL_MANAGER_NAME',
      'type' => 'relate',
      'massupdate' => 0,
      'no_default' => false,
      'comments' => '',
      'help' => '',
      'importable' => 'true',
      'duplicate_merge' => 'disabled',
      'duplicate_merge_dom_value' => '0',
      'audited' => false,
      'inline_edit' => true,
      'reportable' => true,
      'unified_search' => false,
      'merge_filter' => 'disabled',
      'len' => '255',
      'size' => '20',
      'id_name' => 'manager_id',
      'ext2' => 'Users',
      'module' => 'Users',
      'rname' => 'name',
      'quicksearch' => 'enabled',
      'studio' => 'visible',
    ),

Could you test on your side ?

Hi.

Can someone test it and confirm or infirm this bug ?

Thank you

Hello.
Sorry to insist, can anyone try this and tell me if this is a bug for everyone or just for me ?
Thank you !

Hello. No news on this bug. on SuiteCRM 7.11.8.

Query Failed:  SELECT  users.id , users.created_by  FROM users  LEFT JOIN users_cstm ON users.id = users_cstm.id_c  where (requester_user_id='f252962d-b024-70cd-1d91-498d48c48229' ) AND users.deleted=0: MySQL error 1054: Unknown column 'requester_user_id' in 'where clause'

It doesn’t join the current module in the query !!!

1/ When creating a custom relate field for my custom module using Studio
=> I can filter by this relate field in dashlet
=> It work PERFECTLY in List view
2/ When creating the field by code using the same code as generated by Module Builder (below)
=> The Dashlet returns no data, and the error above is logged
=> It work PERFECTLY in List view

Since there is nobody working on this bug, I can dig and find a solution.
Please answer my questions so I can move forward:

  • Why List view queries and Dashlet list queries are not build with the same code ?
  • Where is the code building the list query for a Dashlet ?

Thanks.

Hello. This disappeared in the last years but came back on 7.12.?

Can any one try and tell me if he has the same problem ?

Thanks

I found how to do it. Need to copy the way the relate field is defined for account member of.

In vardef:

'manager_id' => 
array (
	'name' => 'manager_id',
	'vname' => 'LBL_MANAGER_ID',
	'type' => 'id',
	'required' => false,
	'reportable' => true,
	'audited' => true,
	'comment' => '', 
),
'manager_name' => 
array (
	'required' => false,
	'name' => 'manager_name',
	'rname' => 'user_name',
	'id_name' => 'manager_id',
	'vname' => 'LBL_MANAGER_NAME',
	'type' => 'relate',
	'isnull' => 'true',
	'module' => 'Users',
	'table' => 'users',
	'massupdate' => false,
	'source' => 'non-db',
	'len' => 36,
	'link' => 'manager_link',
	'unified_search' => true,
	'importable' => 'true',
),	
'manager_link' => array(
	'name' => 'manager_link',
	'type' => 'link',
	'relationship' => 'manager_relationship',
	'module' => 'Users',
	'bean_name' => 'users',
	'link_type' => 'one',
	'source' => 'non-db',
	'vname' => 'LBL_MEMBER_OF',
	'side' => 'right',
),

then add a relationship below:

'relationships' => array(
'manager_relationship' => array(
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'AGR_Inspections',
'rhs_table' => 'agr_inspections',
'rhs_key' => 'manager_id',
'relationship_type' => 'one-to-many'
)
),