Hi,
i have added a new doctype, now i want to add a new table with options “Customer”, but he always say “Option Customer for field partners is not a child table”, i want to link the erpnext default customer doctype as a table.
regards and thanks
Hi,
i have added a new doctype, now i want to add a new table with options “Customer”, but he always say “Option Customer for field partners is not a child table”, i want to link the erpnext default customer doctype as a table.
regards and thanks
If you want to just make a connection from 'Your DocType'
to 'Customer'
, then you would create a DocField with type “Link”:
However, if you want to create a Table/Grid within 'Your DocType`. Such as what you see on Purchase Orders:
That can only be achieved when the DocType you are displaying is a “Child Table”.
Customer is not a child DocType/table.
Here’s the official documentation about this:
https://frappeframework.com/docs/v13/user/en/basics/doctypes/child-doctype
Do you know, does it make any affect when i change them to child table?
My use case is something like this, i want to manage my Events & Contracts with Partners.
regards
use table multiselect
Definitely do not edit an existing DocType like 'Customer'
, and mark it as a Child. That will break the DocType rather completely.
Here’s a link to what Tufan hinted at: The concept of “Table Multiselect”
https://docs.erpnext.com/docs/v13/user/manual/en/customize-erpnext/articles/table-multiselect-field
Basically, it works like this:
'Customer'
So now you have 3 DocTypes, related like this:
The visual result is like the screenshot below. Little checkmarks, that indicate they “belong” to the parent.
Not nearly as nice as a Grid display. But it’s the best the framework can do (unless you’re very skilled with JavaScript, HTML, and the DOM, in which case you build your own grid solution)