hello,
i want to get data from Assigned To, how to get the user in assigned to (in variable).
Hi @rafaelrnzo
When you assign any document to user then a record created in the ToDo list
You can get list from the ToDo List
For Single value
frappe.db.get_value("ToDo", {"reference_type": doc.doctype, "reference_name": doc.name}, "allocated_to")
For getting LIst of Assigned Users
frappe.db.get_list("ToDo", filters={"reference_type": doc.doctype, "reference_name": doc.name}, fields=['allocated_to'])
2 Likes
thanks, it worked