Overview of JavaScript Support for Swift MEAP

This guide is for users with some coding experience who are familiar with the data source that you are connecting to, the Swift MEAP™ Admin and client applications, their data structures, and operations. 
The purpose of this guide is to provide an introduction to using JavaScript code by describing the JavaScript commands and formatting that are supported within the Swift MEAP™ application. This guide shows the level of customization that is possible for Swift MEAP™. 

Swift MEAP™ allows you to extend and customize functionality using JavaScript. You enter the JavaScript using the Swift MEAP™ Admin application and distribute the JavaScript to users with the application configuration. 
The Swift MEAP™ client application supports an event model that allows registration of JavaScript event handlers in several different contexts. JavaScript event handlers can be registered for the following: 

  • Module events. For example, creating, updating and deleting records.
  • Selector events. For example, constraining or validating a record set that can be inserted into a field.
  • Button events. For example, running a custom command.


Event handlers are registered automatically when they are added inline to JavaScript code in the Admin application. You enter the inline JavaScript code for each JavaScript context (for modules, selectors, or buttons) at different locations in the Admin application.
Libraries may be uploaded to the Swift MEAP™ admin application by selecting Administrator, then clicking on 'Import JS'. Use the Upload selections to browse and import your JavaScript Library files. 

The JavaScript event model, libraries, and default event handlers are part of the Swift MEAP product. Any code included in the product is covered as part of the standard support agreement, including operation of the framework supporting execution of JavaScript code additions. Any changes to the core code, any customer developed code, or any code developed by a third-party that is not provided in the core product is not covered as part of the standard support agreement. The Swift MEAP extensible framework is a powerful tool and must be used with care. iEnterprises cannot directly support customer extensions, nor is iEnterprises responsible for results from execution of custom functionality. 

You can typically use JavaScript code in a variety of different situations, including the following: 

  • Data validation. You can use data validation to ensure, for example, that an activity End Date is greater than the Start Date.
  • Automated data entry. If activities are saved when Status is equal to Complete, then a time stamp is automatically inserted for the closed date.
  • Inheriting fields from a parent. If you create a new contact for an Account, then the address and telephone number fields are automatically populated.
  • Workflow enhancements. You can use workflow enhancements to ensure that certain tasks are completed. When creating a new lead, for example, users are automatically directed to enter in a follow up call.
  • Custom application tasks. You can use custom application tasks to, for example, allow users to create custom actions that perform a sequence of actions together.
  • Linking to external applications. You can link to an external application to, for example, allow users to pass data from Swift MEAP™ to an external application.
  • Filtering related records. You can include filters so that when you select a product type, only product records of that type are displayed for selection. For example, if you are entering a lead and you have to associate a product to the lead, then you can set up a filter to filter products by product type.

You can use JavaScript when configuring the following in the Admin application: 

  • Module settings
  • Quick selectors
  • Table configurations
  • Field conditions (for filtering related records)