How to Disable Add New Button from the connections of doctypes

Hi Frappe Developers ,
Can We Disable Add New Button from the connections

	$( ".transactions .document-link .icon-btn  " ).hide();

In the refresh event

1 Like

@Rohan_Kumbhar I think that you can achieve what you want by using the following code…

frappe.ui.form.on('Doctype Name', {
    refresh: function(frm) {
        frm.dashboard.links_area.body
            .find('.btn-new').each(function(i, el) {
                $(el).hide();
            });
    }
});

Best regards…

2 Likes

Thats great , its works for me

1 Like

This method is also working for me , thank you very much

Thank you Very much

@Rohan_Kumbhar I’m glad that I was able to help…

Please don’t forget to mark the post as the solution, for others to find what solved your issue…

Best regards…