Where to Use JavaScript Code in the Admin Application
The location to enter JavaScript code depends on what you are trying to do with it, but the main areas where you can add JavaScript code in the Admin application are:
- Generic module code. The most common area to enter JavaScript code is by using the generic module code. Generic module code is specific to an entire module and includes the ability to configure code to handle data validation, the automatic population of fields, to create custom actions, to inherit fields from other modules, to perform calculations on fields, and so on.
- Related item filtering. You can use JavaScript code to filter a list of related items. When creating a lead, for example, you might only want to display employees from a specific sales region.
- Quick selector configuration. You can use JavaScript code to determine which related items are available for selection when using the Quick Selector.
- Quick selector validation. You can use JavaScript code to validate certain parameters when using the Quick Selector to perform a soft stop.
- Table preload options. You can use JavaScript code to determine which records are preloaded to a table, if the preload option is being used.
- HTML pages. You can use JavaScript code within an HTML page displayed within the client application.
- When linking to external applications. You can use JavaScript code to configure which fields to export to an external application and where to insert the code in the application.
- Shared Code. You can use the JavaScript library manager in the Admin application (that is, the Administrator, Import JS option) to upload JavaScript code that can be included in Swift MEAP™ and which can be called from the different JavaScript configuration points (for modules, selectors, or buttons) in the Admin application.