I know you can create and whitelist api methods for a doctype when developing custom app. But for my current scenario, there is no custom app, rather I’ve added a button, via Custom Scripts, which I need to download a processed CSV file when clicked.
How can I achieve this using Server Scripts? I’ve checked the documentation on this subject but it wasn’t very informative.