Relationship link field issue

Hello i have an custom module amendment and have a relationship one to many mapped to another custom module approval records , so when i try to map a record it shows undefined please help or tell me where i could be going wrong ?

Screenshot 2025-06-03 172810

Is it text field? Is your another module is custom too?

No it is a link field that is created from one to many relationship and my another module is custom as well.

Hello George,

that is quite odd - I cannot replicate that.
You’ve built a relationship like here:

?

When does the undefined show up, after you’ve saved the record and now you’re editing it?

Can you show screenshots of the studio fields / relationships?

You’ve done this via Studio, right?
And do you have other code customizations or plugins on your instance?

Hello the undefined shows up when i choose a record in the linked module,

and it also says there is not match for the link field that is created.

Hi @george7

Usually when you see “undefined” in a relate field after creating a custom relationship, it means SuiteCRM is unable to fetch the display label for the related record. A few common things to check:

  1. Primary display field :– In your custom module (Amendment), make sure the module has a valid field marked as the “Name” field. SuiteCRM uses the name field (or the first vardef marked as name) to display the record in relate fields. If your module doesn’t have a proper name field, it often shows “undefined”.
  2. Relationship field setup:- Check the generated vardefs under custom/Extension/modules/<module>/Ext/Vardefs/ and ensure id_name and module values are correct.
  3. Language labels:– If the field label is missing in your language file, SuiteCRM also displays "undefined:. Check custom/Extension/modules/<module>/Ext/Language/en_us.lang.php to make sure the label exists.
  4. Repair & Rebuild.