"No match for field:" when autopopolate field

my problem is this:
I have 2 custom modules related to each other (Module A, Module B), when I “create Module A” I select the related field inside it and according to the choice made, other fields are filled. It works until I try to save, at which point the red text appears next to the related field:
“No match for field: <field_name>”.
This procedure is managed by the editviewdefs.php file of the module in which I am inserting (Module A):

array (
name’ => ‘<related_field_name>’,
displayParams’ =>
array (
field_to_name_array’ =>
array (
name’ => array(’<related_field_name>’,‘name’),
‘pnr’ => ‘pnr_c’,

I can’t figure out what the problem is, it’s the same code I used on another occasion, but there, the related module (Module B from the previous case), was Users.

I tried deleting
'field_to_name_array' =>
from the previous code, the error on saving disappears, but the fields it should fill are left empty.

Please, does anyone have any idea how to fix this? Thanks!!!

Can no one give me a solution for this problem?
I should add that the version of Suite is:
Sugar Version 6.5.25 (Version 344)

I’ve solved it, the id must also be added to the field_to_name_array:

id' => <field>ida,
1 Like