ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

Change Action Button on Lead doctype

Hello,

I’m trying to find a way to edit the default Action button functionality available under Lead doctype.

By default, there is a Create button available once a Lead is saved. It allows converting the Lead to a Customer (Account in my screenshot below), Opportunity, and Quotation.
image

Once a Customer is created, it changes the Lead Status to Converted and the Action button disppears.

I would like to only allow for Opportunities to be created from this screen, and not Quotations.

I would also like to change the default Lead Status and assign new statuses based on chosen actions.

How do I go about doing this? Any help is appreciated.

Hello,

There’s a form api method (JavaScript) calledremove_custom_button that will do what you want:

You can call that method on refresh from either a custom app or (more easily) a client script.