executing a query
In order to execute a SQL query from within a server side JS action, the following snippet can be used:
NOTE: The second parameter can be number representing the additional datastore ID or null to execute the query on the main DB.
Remember to use camelCase to access fields data, so the field called COMPANY_ID in the database can be accessed as rows.companyID after the query execution.
Last updated