Doctype Event - Script to filter Employee and Contact


When I create Event, in Child Table “Event Participants” all doctype list is showing I want to fix or filter it only for doctype “Employee” and “Contact”.

I tried this :point_down: script, but it’s not working.

With “Doctype” , “title”

Child Table under Event doctype :point_down:

Can someone please guide on this?

Hi @umarless,

Please apply the client script for it.

frappe.ui.form.on("Event", {
	onload: function(frm) {
		frm.set_query('reference_doctype', "event_participants", function() {
			return {
				"filters": {
					"name": ["in", ["Employee", "Contact"]]

Then reload and check it.

Thank You!