Pass argument to doc_event in hook ? is it possible

hi ,
i write a method in hook.py
doc_events = {
“*”: {
“validate”:“frappe.workflow.doctype.workflow.workflow.update_custom_field”,
},

i want to pass the doctype and docname to the method .
could that be possible

you can see this

and the method takes two parms which is doc and method

1 Like

Any solutions for this?

Hi welcome to ERPNext Lee_Andrew

The docs and tutorials are a good place to start for example:

https://frappe.io/docs/user/en/guides/basics/hooks

https://frappe.io/docs/user/en/tutorial/controllers

Then a forum search will give you pointers when you are stuck…

Thanks, Mr. Clarkej, I have read the docs and I’ve used the controller for my function to pass arguments.

1 Like