frappe_run_method
Call any whitelisted Frappe method remotely for custom operations like getting user info, computing stock, or triggering workflows. Use when standard CRUD tools are not enough.
Instructions
Call a whitelisted server-side Python method on the Frappe site remotely. Use this for operations not covered by the standard CRUD tools — such as getting the logged user, computing stock balances, running reports, triggering workflows, or invoking custom API methods. The target method must be decorated with @frappe.whitelist() on the server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kwargs | No | Optional dictionary of keyword arguments to pass to the remote method. The keys and expected values depend entirely on the specific method being called. Example for stock balance: {'item_code': 'ITEM-001', 'warehouse': 'Stores - W'}. Defaults to an empty dict when omitted. | |
| method | Yes | Dotted Python path to the whitelisted method to call. Examples: 'frappe.auth.get_logged_user', 'frappe.utils.get_stock_balance', 'erpnext.stock.utils.get_stock_balance', or any custom whitelisted method from your Frappe app. |