Hi All,
i want to add Dynamic link table inside frappe.dialog.
eg:
this.dialog = new frappe.ui.Dialog({
'static': 1,
'title': __('Dialog'),
'minimizable': true,
'indicator': 'blue',
'fields': [
{
label: 'Links',
fieldname: 'links',
fieldtype: 'Table',
options: 'Dynamic Link'
},
],
primary_action: () => {
},
});
it is not worked as expected,
Any idea on this?
const table_fields = [
{
label: 'Link Document Type',
fieldname: 'link_doctype',
fieldtype: 'Link',
options: 'DocType',
in_list_view: 1
},
{
label: 'Link Name',
fieldname: 'link_name',
fieldtype: 'Dynamic Link',
options: 'link_doctype',
in_list_view: 1
},
{
label: 'Link Title',
fieldname: 'link_title',
fieldtype: 'Data',
in_list_view: 1
}
]
let d = new frappe.ui.Dialog({
title: 'Dialog',
fields: [
{
label: 'Link Document Type',
fieldname: 'link_doctype',
fieldtype: 'Link',
options: 'DocType',
in_list_view: 1
},
{
label: 'Link Name',
fieldname: 'link_name',
fieldtype: 'Dynamic Link',
options: 'link_doctype',
in_list_view: 1
},
{
label: 'Links',
fieldname: 'links',
fieldtype: 'Table',
cannot_add_rows: false,
in_place_edit: true,
reqd: 1,
data: [],
fields: table_fields
}
],
primary_action_label: 'Submit',
primary_action(values) {
console.log(values);
d.hide();
}
});
d.show();
Try this way. It may help you.
Thank for your reply, But it’s not worked as expected inside child table
Is it working at your end in child table