@frappe.whitelist()
def add_comment(doc):
	doc = frappe.get_doc(json.loads(doc))

	if not (doc.doctype=="Communication" and doc.communication_type=='Comment'):
		frappe.throw(_("This method can only be used to create a Comment"), frappe.PermissionError)

	doc.insert(ignore_permissions=True)

	return doc.as_dict()
Execute a query directly
dataset/ETHPy150Open frappe/frappe/frappe/desk/form/utils.py/add_comment--crossover with--dataset/ETHPy150Open harryliu/edwin/edwinServer/site_packages/pypyodbc.py/Cursor.execdirect