how to hide ‘Send SMS’ from Menu.
frm.page.menu.find(‘li:contains(“Send SMS”)’).hide();
i used this, but its not working.
frm.page.menu.find(‘li:contains(“Send SMS”)’).hide();
i used this, but its not working.
cur_frm.page.menu.find(`[data-label="${encodeURIComponent('Send SMS')}"]`).closest('li').remove();
its not getting hidden…
yes, i already added this into client script.
i used this in both refresh and onload
frappe.ui.form.on(‘Purchase Receipt’, {
refresh(frm) {
cur_frm.page.menu.find([data-label=“${encodeURIComponent(‘Send SMS’)}”]).closest(‘li’).remove();
},
onload(frm) {
cur_frm.page.menu.find([data-label=“${encodeURIComponent(‘Send SMS’)}”]).closest(‘li’).remove();
}
});
Please copy the given code, it’s working
cur_frm.page.menu.find(`[data-label="${encodeURIComponent('Send SMS')}"]`).closest('li').remove();
there is type on your code
jQuery
won’t work in Client Script
I think