Lead upload and submission


i have an excel file for Leads
and i successfully upload it to Leads
and also i check on (submit when upload)

i found that all the uploaded leads are not submitteted and i have to click on save and submit or any uploaded leads

so how we can force all the uploaded leads to be automatically sumitteted

thanks a lot

You could’ve done that just checking the checkbox flag that corresponds to Submitting documents after importing.

I guess it’s too late for that, try this in your server console:

$ cd ~/frappe-bench/

$ bench --site sitename console

By this time you should be in the Python console, if so, then run:

for lead in frappe.get_list("Lead", filters={ "docstatus": 0 }):
    doc = frappe.get_doc("Lead", lead.name)

frappe.db.commit() # commit your changes to the DB
1 Like

Dear yefritavarez

thanks a lot your command solved the problem