How to execute a SQL query from Client Script?

Hi @YogiYang,

Query does not work on the client/custom side.
It’s only worked on below of erpnext version 5.

For reference:



But you can use it via the custom method.
https://frappeframework.com/docs/v14/user/en/guides/app-development/overriding-link-query-by-custom-script#custom-method

Maybe it helps you.

Thank You!