Delete/Disable/Hide default button

I’m trying to hide the “Make Quotation” button in my Leads list, since I’d like my Sales staff to convert it to an Opportunity first.

To make sure they don’t make quotations from Leads by mistake, I’d like to remove the option to create a quotation from Lead. Could someone help me out with this?

I tried the following code, but it messed up my Leads page:

cur_frm.cscript.custom_refresh = function() {
    if(!cur_frm.doc.__islocal && cur_frm.doc.owner === wn.boot.profile.name) {
        cur_frm.frm_head.appframe.clear_buttons('Make Quotation');}
}

Any help would be greatly appreciated!

Could you just hide the button field under customise doc?

@System19
If you’re referring to Customize>DocType, the default forms are un-editable, moreover, there’s no option to remove/hide buttons.

Is that what you meant? Or is there another way to customise doc?

Opps Sorry, Yes thats what I meant. Late at night here and I didnt check that out.

Thanks for trying though! :smile:

I’m still trying to figure this out. Can someone please help?

Thanks!

Maybe you should

cur_frm.clear_custom_buttons()

and then return opportunity button.

@NMyshuk

Thanks for your response, but that script removed all the buttons. I just wanted to remove “Make Quotation”. I finally de-activated the button by commenting out the lines in the Server side script.

Now, Im trying to figure out how to hide the button completely. (CSS not viable. It hides all the buttons.)

You may try this:

cur_frm.page.get_inner_group_button(__(“Make Quotation”)).find(“button”).addClass(“hide”);

1 Like

cur_frm.page.get_inner_group_button(__(“Make Quotation”)).find(“button”).addClass(“hide”);
not worked.