Action for fieldtype Button

My point is, why are you keeping it as a method? Why not a function? I don’t see any advantage.

frappe.call() can be used to call only whitelisted functions.

Hey @rahy
Can you elaborate a bit on how can I connect a button field type to its method in .py file
Thank you

You can use the frappe.call() to send values to the related python file.
In frappe.call() specify the method parameter with the dotted path to the function in the py file.

Okay are the talking about the doctype fieldtype button availabe in v-14?

if yes can you show a small example of how can I write the code in the custom_doctype.py file
under
class custom_doctype(Document):
def butto(self):
frappe.msgprint(“Success”)

This thread might help

1 Like