Custom module problem record id undefined

Suitecrm 8.0.1

  1. build a simple module
  2. add one relation, e.g. to accounts
  3. install the module
  4. add a record to the new module and connect to the relationship

No matter how to set up permissions,
Administration> Repair> Quick Repair and Rebuild
I rebuilt everything that was possible.

“Undefined” is displayed as the record’s id, so when you click on the record, the following information appears:
“You are not authorized to view this page. Please contact your system administrator.”

I can enter and view these records independently, I can see their name, which means they are loading properly, but as a link to a given record there is.
… / public / # / accounts / record / undefined
“undefined” shows up both in the list and when you enter a record.
You can’t see much in the logs even in debug mode.
Possibly it could make a difference
[WARN] ModuleNameMapper | mapName | ‘test’ not mapped to ‘frontend’

By the way, I noticed that if there is a 1to1 relation to the users record, no matter if there are correct entries in the relational table or if it is completely empty, there will be errors in the logs
[ERROR] Warning: Multiple links found for relationship test2_users within module test2

I have run out of ideas on how to get around this.
The topic was raised, but Quick Repair and Rebuild does not solve the problem.

Hi @Jurij0123,

Sorry for the delay in replying.

Was the relationship added a one-to-one relationship?

There is an known issue with relationshipgs that seems very similar to what you’ve described.

Anyway there maybe ways to work around it, depending on the relationship and the goal.

Thank You for Your answer Clemente
It doesn’t matter whether the relationship is one-to-one or many-to-one, it is constantly undefined.
They work for many to many and one to many because of course the bottoms are in the sub panels.

I was still achieving the same result as recommended in the topic. “Undefined” record UUID on one-to-one custom module relationship linked field url #30
i.e. I set the data in the file
config / services / module / module_routing.yaml
for connected in my case with the accounts package
index: false
list: false
record: false

Administration> Repair> Quick Repair and Rebuild

./bin/console cache: clear

Additionally, I rebuilt the package in the builder module and saved undefined as well.

Possibly whether the same data is saved somewhere for the new package as for the standard one
config / services / module / module_routing.yaml

Hi @Jurij0123,

Some questions to understand the problem.

  1. This a one to one relationship between accounts and cases is that it?
  2. When you are on cases and click on the record to go to the account it gives the undefined right?
  3. Could you check if there are any errors on the browsers console please?
  4. Could you send me the relationship definition from the module where you click to get to the other module? Meaning, if you click and accounts is undefined, I would like to see the relationship definition from the module we start from.

1 No. This a one to one and/or one to many relationship between accounts and new module.
2 No. When I am on “new module” and click on the record to go to the account it gives the undefined. And on grid od record with “new modues” and click on the record to go to the account it gives the undefined.
3 There are no any errors on the browsers console.
4 I do not know exactly what definition it is about, I am sending a whole new module. (70.5 KB)

Hi @Jurij0123,

Could you try the following please?

on the files: relationships/vardefs/xxx_yyy_accounts_name.php and relationships/vardefs/xxx_yyy_accounts_3_XXX_YYY.php.
Or the deployed versions that go to public/legacy/custom/Extension/modules/<your-module>/Ext/Vardefs

Change the type of xxx_yyy_accounts_3accounts_idb and xxx_yyy_accountsaccounts_ida from link to id

Then do 2 repair and rebuilds. Go to your custom module. Refresh the page (just to make sure we don’t have anything cached on the front end)

I think this may help. Please let me know how it goes.

PS: I may only be able to get back to you tomorrow.

1 Like

Thank you so it helped.

However, for example, on the Accounts panel, something does not work anymore
Replacing “link” with “id” for relationship for one to many new module xxx still undefined after rebuild

$ dictionary [“Account”] [“fields”] [“xxx_yyy_accounts_2xxx_yyy_ida”] = array (
‘name’ => ‘xxx_yyy_accounts_2xxx_yyy_ida’,
‘type’ => ‘id’,
‘relationship’ => ‘xxx_yyy_accounts_2’,
‘source’ => ‘non-db’,
‘reportable’ => false,
‘side’ => ‘right’,

But this is the direction. Is there any “system” solution to not fix it manually? I have over 30 new modules and I am rebuilding steel.

Hi @Jurij0123,

Yeah , I need to check locally. I wasn’t able to replicate the issue on my side. I’ve created a custom module and some relationships but worked fine at first. I think I might have something different.

Anyway, I kind of guess where the problem lies, but I need to be able to replicate it first in order to do a fix.

The system solutions is to fix the Suite 8 link generation in order to cope with this scenario.

Regarding the xxx_yyy_accounts_2_Accounts I got a bit lost, didn’t quite understand what was the problem on the subpanel.

" Regarding the xxx_yyy_accounts_2_Accounts I got a bit lost, didn’t quite understand what was the problem on the subpanel."

My point is that for the Accounts panel by making a change and adding a relationship many to one (many to Accounts and one to New module “XXX”). The correction you show from ‘type’ => ‘link’, to ‘type’ => ‘id’, in the file

$ dictionary [“Account”] [“fields”] [“xxx_yyy_accounts_2xxx_yyy_ida”] = array (
‘Name’ => ‘xxx_yyy_accounts_2xxx_yyy_ida’,
’Type’ => ‘id’,
‘Relationship’ => ‘xxx_yyy_accounts_2’,
´ source ’=> ´ non-db’,
‘Reportable’ => false,
‘Side’ => ‘right’,

not design is still “udefined”. Unless I did something wrong.

Clemente, do you know when you can expect a fix for this functionality? At the end of January, I should start CRM and I don’t know if there is a chance to do it on version 8.0 or to prepare for 7.12.

Hi @Jurij0123,

Sorry for the delay. This fix is going to be prioritized, there is no planned released date yet.
SuiteCRM 8 will be going through lots of changes in the next few months, we are trying to have a short iteration release plan.

Seems still not fixed in 8.1.
I have exactly same issue on clean install.

True, it has not been repaired
I gave up and installed the version 7.12