Saving object from another doctype

Hi guys! I have been trying to create a single doctype to edit only reorder level and reorder qty of a item. I am able to fetch data but how can I save the edited data of that item to database?

use x = frappe.get_doc(“doctype”, “name”) to fetch the item document.
then x.feild_name = value

you can also use frappe.db.set_value (not recommended as it does not check validations and directly updates database )

it’s on server side but I want on client side and I also can’t find where to write server side code since singledoc doesn’t store in folder in frappe

As far as I know, from client side you can not update another doctype object. And If you are implementing it using Custom Doctype feature, you can’t write server side code.

You have to create a normal doctype and server side code to update another doctype instance.

1 Like

Thanks guys! I manage to do it.

Can i know how?
Thank you