ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

Create Connection to Child Document using Linked Documents

I have a Child Table with a field I would like to use to create connections on to another Doctype. However, I can’t figure out how to get it to work properly.

Here is the relevant part of my Child Table, which highlights the store field (the field I want to link on):
image
 

I have another Doctype called “Dividers Store”, and I want to add a “Connections” category to this field, like so:

However, I can’t get it to work (the above screenshot was taken before I placed the field in a Child Table).

When I edit the “Dividers Store” Doctype and scroll down to “Linked Documents”, I can add connections to Link fields here. However, I can’t get Child Tables to work, even though the interface appears to be designed to handle them. Here is my attempt:


 

The field in the “Dividers Store Waiting List” is called stores; it contains a Child Table called “Dividers Store Waiting List Stores”, with the field stores - the field I want to create connections on. When I attempt to save this, I get the following error:

AttributeError: ‘DocType’ object has no attribute ‘get_field’

If I switch the “Link Fieldname” and “Table Fieldname” field values, I get the following error:

Row #2: Could not find field stores in Dividers Store Waiting List Stores DocType

What am I doing wrong?

1 Like

This screen seems broken… couldn’t understand how to make it work either.

You are better off using a _dashboard.py file for your custom doctype. Look around the erpnext code base, you should find plenty of examples.

I have a similar issue ,
I tried doing a simple link to the pos profile user list as so

And got the same attribute error while saving ,
the documentation
Actions and links

doesn’t mention more details or the constraints as well ,
Is this function broken – using v13.13

I posted a but report here, and someone picked it up 15 days ago. If you want to speed this a long, it may help to post on the bug so that it isn’t forgotten.

I have the same issue, did you guys get any kind of soltuions ?!

Besides the bug getting picked up by someone, no. That’s why I suggested giving the bug more visibility.