Skip to main content



4.8 (5)

Alert.js allows you to create custom lightbox popups in CRM, using custom buttons and messages.

Key Features:

  • Show confirmation messages to users
  • Capture input from users and process their responses
  • Display informative error messages
  • Fully customizable buttons and callback functions
  • Open custom HTML web resources inside a lightbox
  • Access web resource data from button callbacks
  • Show CRM dialog processes with custom callbacks
  • Display a loading spinner during async tasks


CRM 2013 introduced light-boxes for most popups to make the UI look cleaner with less browser alerts and popups. However, these internal functions were not included in the SDK, so as developers we couldn't access them for our custom code. Instead, we've been forced to use alertDialog and confirmDialog which under the hood just calls the browsers alert and confirm functions. The main problems with this is that we cannot customize the buttons, and the alerts look ugly.

Using this library we can now create our own seamless alerts and popups using custom buttons and custom callback functions for each button. We can also specify different types of icons to display in the alerts, instead of being forced to use the alert 'exclamation mark' or confirm 'question mark'.

We can also use this technology to achieve more complex requirements, using the showIFrame and showWebResource functions to create our own custom popups.