Hi, I have defined a custom API in Server Script. And I want to call it from another custom Server Script. How can I call it?
I had the same issue, You can use this but cannot pass args.
frappe.call("another_api_method_name")
You can pass args like below
frappe.call("another_api_method_name", arg1 = value1, arg2 = value2)
and then you must get them in the api before you can use it
arg1 = frappe.form_dict.get('arg1')
arg1 = frappe.form_dict.get('arg2')
I have detailed out the solution here
1 Like