Skip to main content

Apps Script 'Event' Explanation


1 comment

  • Tiffanie Staver
    TrackVia (Community Manager, TrackVia) commented  ·  
    Hi Kevin -

    Good question.

    Unlike calculated fields, AppScripts don't run on page load. They must be triggered by an event in TrackVia.

    The six types of events that can trigger AppScripts are:


    The Insert, Update, and Delete portions of these events correspond to an action in TrackVia. To choose the appropriate event, you'll need to determine whether you want your script to trigger on Record Creation, Record Edit, or Record Deletion, respectively.

    The Before and After portions refer to the order of operations and when the AppScript triggers. Meaning, should the AppScript trigger before the data is saved/deleted in TrackVia or after? In most cases, you'll want to use Before. A notable exception is with creating a new record and using AppScripts to add children. In that case, you'd use AFTER INSERT because the children need the parent to exist before they can link to it.


Please sign in to leave a comment.

Powered by Zendesk