How to have "Create new ..." menu in child table column dropdown

I hope I make the question clear. The red box in the attached image.
Thank you.

Hi,

How about you create a button type field in your child table dt which routes to a create page and add it in list view of the child table, will it work in your case?
But the row has to be highlighted to make the button clickable if the doc is submitted, let me know if you find a better way too which can help me as well.

Thanks.

It turn out that we have to make a ‘bridge’ doctype to connect the doctypes (I don’t know if this is the standard case of Frappe or not, but I see it in ERPNext). This bridge doctype will be the child table of the main doctype and having a field of type Link pointing to the target doctype.

The issue:

  • if directly using the target doctype as child table than we lost the independency of the doctype.
  • as child doctype, we can’t directly open form for that doctype to add/edit.

Solution:

  • By using bridge doctype, the field act as link to the target doctype so we can add/edit/open the form independently.
  • This bridge doctype may or may not have the same fields as the target doctype. It can even have only 1 field and with type of Link.

Continuing this arrangement is how to pass a value from parent to target doctype. But this is in other topic (How to pass parent field value to other doctype when add from child?)