How to automatically always choose variant Communication of Activity section in Task

Hi!
I use 14 version now and here are different switched tabs:

I would like to custom Activity section always choose Communication variant when user opens Task (to work script hiding notifications).

I think, that for, you have to write a js for set default.

Can someone please send some links to materials with information where I can find names of this variables (maybe back-end code of this part of Tasks). I’m newbie in js and ERPNext, but the situation of use tasks is quite common, so I was trying to find decision using AI, and still continue to try :sweat_smile:

a basic example of js: Client Script

another reference: Client Side scripting - #2 by NCP

frappe.ui.form.on('Task', {
	onload: function (frm) {
		$('.nav.nav-pills a[data-only-communication="true"]').click();
	},
});

Try this

Edit

If this is not working then you can use setTimeout with this

1 Like