Hello everyone,
I'm working on an SBM implementation where I need to manage API URLs dynamically based on the environment (e.g., DEV, QA, UAT, PROD). I aim to avoid hardcoding URLs in JavaScript, so I’ve created an auxiliary table named API_CONFIG within the same application. This table contains records with fields for TS_ENVIRONMENT
and TS_API_URL
Each record represents an environment (e.g., DEV, QA) and its associated API base URL.
In my form, I’d like to dynamically fetch the appropriate API URL based on the application's environment. Is there a recommended way to access a specific record from an auxiliary table in SBM forms?
Here are some specific questions:
- Can I directly query the API_CONFIG auxiliary table from JavaScript in a form to retrieve a URL based on the environment?
- Are there any SBM APIs or best practices for referencing auxiliary table values within forms?
- Any examples or code snippets on accessing auxiliary table values in forms would be greatly appreciated.
The ultimate goal is to make the API URL dynamic, allowing changes to be managed in the auxiliary table rather than modifying JavaScript code directly.
Thank you in advance for your help!