Automations are attached to a Record Type and contain an ActionScript that is evaluated against a record. an Automation is triggered against a record in the following circumstances, depending on the settings on the Automation:
There is also a special case for overnight automations. If no record type is specified, the Automation is evaluated once against the whole account. In this case, the assumption is that the Automation’s ActionScript is designed to select the records it acts against, or updates account-wide configuration settings or similar.
Automations are often used to set values such as Status flags that may require more complex logic than can be sensibly included as a DefaultValueCalc in a Field.
Automations effectively provide the mechanism for a ‘calculate and store’ approach to a Field, compared with a straightforward calculated field. Calculated fields are not stored, so their values cannot be used in Filter conditions, and they can affect performance if large numbers of records are being read e.g. to generate a report. Instead, consider writing an Automation and using it to save the value to a Field. In this case, you would normally expect to set the Field flag isUserEditable to false, which will ensure that the field value cannot be edited manually in the user interface.
an Automation is created by adding an Automation record, which contains the following fields:
The following Fields can be Read and Written To.
These Fields can be used to load data from Blueprints etc.
They can also be included referred to in Calculations or in Templates.
Field *required | Title | Type | Details |
---|---|---|---|
Name * | Name | text | Maximum length – 60 characters |
RecordTypeName | Record Type | recordtype | The Record Type of records on which this Automation will act. |
Description | Description | text | |
Script * | Action Script | actionscript | This script is applied to the record when it is triggered, or to each record in turn for overnight scripts, always provided that the record matches the Filter condition. |
Filter | Filter | filter | Optional Filter expression – leave blank to have the Automation evaluated against any record (which also means against every record in the case of an Overnight Automation). This Automation will be applied only to records that match the Filter condition. This includes newly added records – the Filter will be applied against the record after it is initially created but before the Automation is applied. |
Events | Triggering Events | text | An optional comma-separated list of event names that trigger this Automation. As standard, these include add and edit, triggered when
a record is added or edited; but events can be given custom-names and triggered using the triggerEvent() function or
by API call to provide any level of script behaviour as part of integration with other applications. Maximum length – 30 characters |
isRunOvernight | Run Overnight? | logical | Apply this Automation to all records that match the Filter, overnight. Typically you would use this for Automations that consider states that change over time e.g. changing a status field to Overdue, or generating a new record after the passage of time for recurring events such as a review process. |
isRunOncePerRecord | Run Once Only per Record? | logical | If set, then this Automation will only ever run a maximum of once on each record. In any case, if the Automation has already been run against a particular record, then it will not be run again for that record. |
ViewGroup | View Group | Group | |
EditGroup | Edit Group | Group |
The following Fields can be Read only. They can be referred to in Calculations or in Templates.
Field | Title | Type |
---|---|---|
Created | Created | datetime |
CreatedBy | Created By | Person |
Updated | Updated | datetime |
UpdatedBy | Updated By | Person |