Need Help for Custom raise material request Workflow

Dear Sir,

Recently me and my team are trying to change the workflow of Material request by creating a workaround on material request flow.

would like to change the “Create Material Request” trigger inside the
“Production Planning Tool” doctype in the “Manufacturing” section.

tried our “custom script” so that when the “create material request”
are being triggered, the function doesnt go to "raise_material_request
function in the “” however that the function
would go somewhere else lets say at our custom created “”

We have tried our custom script as bellow: on the production planning tool doctype - custom script. ::

frappe.ui.form.on(“Production Planning Tool”, {
create_material_requests: function(frm) {{
doc: frm.doc,
method: “erpnext.manufacturing.doctype.extra.raise_material_requests”

tried this script however the trigger of the “raise_material_request”
function will always go to the original “”

do you have any better idea to implement this?

Thanks and best regards

@tara_antonius take a special look in the Hooks documentation, they are able of cover your requirements