Migration tasks for alerts

Look for alerts that were either initiated or altered by client side script but end up being consumed by server side script.

When initiated from the client side but never altered by another client script:

  • See if it can be consumed from the client side instead of the server side
  • Or see if it can be initiated from the server side
  • Or register the alert using the RegisterClientAlertsFor API in the OnScriptInitializing() section of the consuming server-side script. This will allow the server side OnAlert event to fire for the alert.
    Example:
    context.RegisterClientAlertsFor(New List(Of String) From {
    "UpdateOrderClicked","ShipToDifferentAddresses"})

When initiated from the client side and altered by another client script:

  • See if it is accidentally altered, then change the logic to not alter it
  • Or see if it can be altered on the server side instead
  • Or register the alert from the consuming server side script
Note: To identify a list of layouts with initiate or pass along an alert search all layouts that have one of these references: AlertSelf(, AlertParent(, AlertComponent(, or AlertPeers(.

Also note that when you enable a RegisterClientAlertsFor…, you must include this line at the top of the server script: Imports System.Collections.Generic.