Can anyone explain or direct me to a link of the explanation of what the different 'Event' types indicate, and when you would use them?
Kevin Jones shared this idea · May 18, 2017
Can anyone explain or direct me to a link of the explanation of what the different 'Event' types indicate, and when you would use them?
Kevin Jones shared this idea · May 18, 2017
Comments
1 comment
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:
-BEFORE INSERT
-AFTER INSERT
-BEFORE UPDATE
-AFTER UPDATE
-BEFORE DELETE
-AFTER DELETE
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.