# Retrieving relationship modules from the same module

**URL:** <https://community.spicecrm.io/t/retrieving-relationship-modules-from-the-same-module/556>\
**Category:** KReporter\
**Created:** [November 2, 2020, 11:22am UTC](https://community.spicecrm.io/t/retrieving-relationship-modules-from-the-same-module/556 "2020-11-02T11:22:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![albertostic](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@albertostic](https://community.spicecrm.io/u/albertostic)\
**Post date:** [November 2, 2020, 11:22am UTC](https://community.spicecrm.io/t/retrieving-relationship-modules-from-the-same-module/556/1 "2020-11-02T11:22:59Z")

</div>

Hi,

When we have a relationship within the same module and try to create a report based on that module, we can’t list the modules related when it is the second level relationship of that module.

Here an screenshot (“Personas” module is the “Contacts”):

 ![Selection_219](https://canada1.discourse-cdn.com/flex030/uploads/spicecrm/original/1X/8b965f0f3930f8c5541cff8ba08c798b5f5f6490.png)

And it appears the error in the browser’s console:

```
ext-all.js:38 Uncaught TypeError: Cannot read property 'internalId' of undefined
at i.updateIndexes (ext-all.js:38)
at i.onAdd (ext-all.js:38)
at i.callParent (ext-all.js:38)
at i.onAdd (ext-all.js:38)
at h.fire (ext-all.js:38)
at i.continueFireEvent (ext-all.js:38)
at i.fireEvent (ext-all.js:38)
at insert (ext-all.js:38)
at i.onNodeExpand (ext-all.js:38)
at h.fire (ext-all.js:38)

```

We understand Kreporter 3.1 isn’t supported anymore but we leave it here in case the community got a solution.

Thanks,

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [November 2, 2020, 1:49pm UTC](https://community.spicecrm.io/t/retrieving-relationship-modules-from-the-same-module/556/2 "2020-11-02T13:49:37Z")

</div>

Could you post you link and relationship definitions ?

---

<div class="post-metadata">

**Author:** ![albertostic](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@albertostic](https://community.spicecrm.io/u/albertostic)\
**Post date:** [November 2, 2020, 2:44pm UTC](https://community.spicecrm.io/t/retrieving-relationship-modules-from-the-same-module/556/3 "2020-11-02T14:44:46Z")

</div>

I can’t understand what you mean about the link. But you can test this as well with the SugarCRM core relationship “reports to” or “Direct Reports”.

See the screenshot:

 ![Selection_221](https://canada1.discourse-cdn.com/flex030/uploads/spicecrm/original/1X/05e11d57e4adfb9cb7b63dfbbcde298014363878.png)

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [November 2, 2020, 3:22pm UTC](https://community.spicecrm.io/t/retrieving-relationship-modules-from-the-same-module/556/4 "2020-11-02T15:22:01Z")

</div>

I checked data retrieved in the backend. Looks well formed. It appears to be a rendering problem in frontend. Sorry, can’t help.
