AnsweredAssumed Answered

Error while executing a report for relate field (Accounts to Users)

Question asked by Venkatesh Babu on May 15, 2019
Latest reply on May 16, 2019 by Venkatesh Babu

Hello Folks,

 

I'm trying to create a Relate field via code and find below the vardef

$dictionary['Account']['fields']['manager_name_c'] = array(
'required' => false,
'source' => 'non-db',
'name' => 'manager_name_c',
'vname' => 'LBL_MANAGER',
'type' => 'relate',
'massupdate' => true,
'no_default' => false,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'enabled',
'duplicate_merge_dom_value' => '1',
'audited' => true,
'reportable' => true,
'unified_search' => false,
'merge_filter' => 'disabled',
'calculated' => false,
'len' => '255',
'size' => '20',
'id_name' => 'user_id3_c',
'ext2' => 'Users',
'module' => 'Users',
'rname' => 'name',
'quicksearch' => 'enabled',
'studio' => 'visible',
);

While executing a report for manager_name_c, i get this error in the log

[FATAL] Error executing query Query Failed: SELECT IFNULL(accounts.id,'')
FROM accounts
LEFT JOIN accounts_cstm accounts_cstm ON accounts.id = accounts_cstm.id_c
WHERE (((( accounts.user_id3_c='de5f4b32-315c-11e7-b335-00155ddcc563')
)))
AND accounts.deleted=0
LIMIT 0,100: MySQL error 1054: Unknown column 'accounts.user_id3_c' in 'where clause'

 

Am I missing something with the vardef? I don't see this issue for the other relate field. 

 

Any help would be highly appreciated!

 

Thanks,

Venkatesh

Outcomes