I have one doctype with a table field linked to a child doctype that have a link to a doctype that have a link to another doctype:
Product ( documents: table[Product_Documents])
*Product_Documents(document:link[Document], doctype_virtual:data) *child
Document(dty_doc:link[Document type], name_doc:data)
Document type (name_dty:data)
I need a script that gets the value from name_dty field and set the value to doctype_virtual field.
How can I achieve it?
I tried this but it’s not working:
frappe.ui.form.on(‘Product_Documents’, {
refresh(frm) {
cur_frm.add_fetch(“dty_doc”, “name_dty”, “doc_type_virtual”);
}
})