AnsweredAssumed Answered

create non-db link field

Question asked by Indrajeet Latthe on Feb 12, 2018
Latest reply on Sep 6, 2018 by Anthony Watson

I've two modules Ords_Products and Accounts

I want one field "comment" to get added for subpanel(Ords_Products) only in Accounts, I've also one relation "accounts_ords_products_1" with the same table name where I want to store it so,

I've added following field in /custom/metadata/accounts_ords_products_1MetaData.php

(I've posted only added code in fields array)


'comment' =>
        'name' => 'comment',
        'type' => 'varchar',
        'len' => 255,

then I've created file in /custom/Extension/modules/Ords_Products/Ext/Vardefs/comment.php with following code

$dictionary["Ords_Products"]["fields"]["product_comment"] = array (
    'name' => 'product_comment',
    'label' => 'Comment',
    'type' => 'varchar',
    'source' => 'non-db',
    'link' => 'accounts_ords_products_1',
    'rname_link' => 'comment',

Then I added that field in subpanel from Accounts module via Studio but I'm getting following error in sugarcrm.log
"Unknown column 'accounts_ords_products_1.comment' in 'field list'"