How to find back to the parent of a child table element

I’ve created a child table doctype for serial numbers and added a table to the serialnumbers doctype named subserial
This solves our request to have a ‘master serial numer’ and attach multible other serialnumbers to this master serial number.

Now i want to select a serial number and find where it is attached to a master serial number, by “Show linked documents”

This opens a dialog listing a hash value from where it is used as sub serial. Clicking on the item fails with page not found as it wants to open the child table.

How can i track back to the master serial number to see where the serial is used as a sub serial number?

@moroslantia if you have written custom codes for this then return parent field value of child table and not the name field from child table.

Lets say you have an apartment, owned by someone X. And now some random person comes and lives in there. Just because you know the name of the person who lives there automatically doesnt mean you know the landlords name. Unless you know the name, then you dont have to ask, who is the landlord.

Something wrong with the design you are using.

However, you can search the db and assume there is no duplicate serial number and see what the foreign key is, if there is such a design. Else no chance.

How can this be done?

@moroslantia can you please share your code here ?

I do not have a code yet.
On which place do i need to override the return for the standard “link to” command in the form of a doc entry?

It should be in the child table the information you have blurred out.