if i select lead type as channel partner then show me those users whose role profile is ‘crm channel partner’
frappe.ui.form.on('Lead', {
type(frm) {
if(frm.doc.type==='Channel Partner'){
frm.set_query("custom_channel_partners", function (doc) {
return {
filters: {
role_profile_name :"CRM Channel Partner"
},
};
});}
},
})