Ignore validate when saving

Continuing the discussion from Save a document without running post_save hook:

In above topic, @nabinhait mentioned about doc.save(ignore_validate=True) when saving doc. But when trying it I got error 500.
Is it deprecated?
I’m on version-12 both ERPNext and Frappe.


In the documentation I don’t see ignore_validate as an option. But if you wan’t to skip validation you can use frappe.db.set_value() you cand read about it here

Yes but set_value() requires user permissions.
While with save can use ignore_permissions=True

My bad…

I used frappe.set_value() so permission error.

Using frappe.db.set_value() is not.

im using like this
frappe.db.set_value(‘USA Lead’, ‘frm.doc.name’, ‘hided_opp’, ‘Hided Opps’);
i need to get the “name” field dynamically so i added frm.doc.name and doc.name eighter but didnt work