Hi all,
Is there any trigger we can use to filter the link field on sidebar modal. For my case, i have added some filter on ‘assign to’ field in Lead doctype and i would like to add filter on the same field as well in the modal but could not find how to trigger the field.
Is there a ‘refresh’ event?
me.refresh_like();
});
})
},
refresh: function() {
if(this.frm.doc.__islocal) {
this.sidebar.toggle(false);
} else {
this.sidebar.toggle(true);
this.frm.assign_to.refresh();
this.frm.attachments.refresh();
this.frm.shared.refresh();
this.frm.viewers.refresh();
this.frm.tags && this.frm.tags.refresh(this.frm.doc._user_tags);
this.sidebar.find(".modified-by").html(__("{0} edited this {1}",
["<strong>" + frappe.user.full_name(this.frm.doc.modified_by) + "</strong>",
"<br>" + comment_when(this.frm.doc.modified)]));
this.sidebar.find(".created-by").html(__("{0} created this {1}",
["<strong>" + frappe.user.full_name(this.frm.doc.owner) + "</strong>",
"<br>" + comment_when(this.frm.doc.creation)]));
I found the above with this search
frappe@ubuntu:~$ find . -name ‘*.js’ | xargs grep ‘assign_to’
FWIW this is the dialog box box
assign_to: owner
},
callback:function(r,rt) {
me.render(r.message);
}
});
}
});
frappe.ui.form.AssignToDialog = Class.extend({
init: function(opts){
var me = this
$.extend(me, new frappe.ui.Dialog({
title: __('Add to To Do'),
fields: [
{fieldtype: 'Link', fieldname:'assign_to', options:'User',
label:__("Assign To"), reqd:true, filters: {'user_type': 'System User'}},
{fieldtype:'Check', fieldname:'myself', label:__("Assign to me"), "default":0},
{fieldtype:'Small Text', fieldname:'description', label:__("Comment")},
{fieldtype: 'Section Break'},