Cur_frm.add_fetch from another doc dashboard

The below script is working fine when creating new doc by normal way,
but when creating the doc from another doc dashboard with the + sign , it didn’t fetch the value .

I have tried ‘item_name’ instead of onload and I have tried frm instead on cur_frm

but still the same

any idea?

frappe.ui.form.on(‘Support Ticket’, {
onload: function(frm) {
cur_frm.add_fetch(‘item_name’, ‘site_name’, ‘site_name’);
}
});

any idea?

cur_frm.add_fetch(‘item_name’, ‘site_name’, ‘site_name’);

frappe.ui.form.on(‘Support Ticket’, {
onload: function(frm) {

}
});

yes, it is working,
thanks for your support

1 Like