Custom Script to create the same project for multiple customers


I want to create the same project for multiple customers. From Project list I want to add a button to create the same project for selected customers.

Can anybody point me in the right direction?

Thank you very much.

You could do it in two ways:

  1. Adding a new table to Project Form for customer references. OR
  2. Add a new project field in customer if it doesn’t exits then link the project to customer profile.

JS Custom Script example.

frappe.ui.form.on("Project", {
 refresh: function(frm){
    frm.add_custom_button(__("Make Customer"), function(){
       frappe.new_doc("Customer", {"project": frm.doc.project}, ()=>{
             // your callback function goes here, if in case you need to modify 
             // anything on customer form.

Thank you for your reply

It is always better to create seperate app to make changes on ERPNext, then use hooks to deploy for multiple customers. Otherwise you will lose changes on ERPNext updates.