Set trigger type properties

Trigger properties vary by the trigger type selected. Before you can set trigger type properties, add a trigger, and select the trigger type that you need.

Use the merge fields tool for formulas

When you work with triggers, you'll often use formulas. When working with formulas, you can use the Available Merge Fields section to find merge field tokens to include in your formula.

To look up merge fields:

  1. In the Available Merge Fields section, use Select field type and Select field to find the field you need.
  2.  Copy and paste the merge field token into your formula.
    1. If the field includes a numeric value, you can use the SUM token instead. The token is a shortcut for using the sum of selected fields.
    2. If the field is a picklist, radio button list, or group of checkboxes, select Select field value, then select an available value integration code.

Validation properties

A validation trigger runs before a value is created, updated, or deleted to ensure data integrity. Enter a data validation formula in the formula editor in trigger properties. When a condition isn't valid, the formula returns a string error message. If null is returned, data processing continues as normal.

To set properties for the Validation trigger type:

  1. Under Trigger type properties, enter a formula in the formula editor with your conditions for data validation. Let's say that you want to change the workflow status of a project when the estimated cost of the project exceeds $10,000. Your formula might read:

    Copy
    {!project.estimated_post!} >= 10000
  2. After you have entered a formula, select Check it for errors to check for syntax errors.
  3. Select the magnifying glass icon next to Debug, and choose a record to test your formula.
  4. Select Save.

Update field values properties

Use this trigger to update fields in the current object or in a related object.

To set Update field value trigger properties:

  1. Choose a record to update when the Trigger is activated. This can be a record in the current object or a record in a related object.
  2. In Field to change, choose a field to update.
  3. Under Change Value Formula, enter a formula in the formula editor to calculate the value to be entered in the selected field. The formula can be a simple value, or it can add conditions to set the returned value. For instance, to set the payment "terms" when a Dun & Bradstreet number is entered, your formula might read:
  4. Copy
    if ({!prospect.dunn_bradstreet!} == ""){
    return "cash";
    else{
    return "terms";
    }

  5. After you entered a formula, select Check it for errors to check for syntax errors.
  6. Select the magnifying glass icon next to Debug your formula, then choose a record to test your formula.
  7. Select Save.

Create new record properties

The Create new record trigger uses a preset conversion map. The conversion map takes a record from the current object and converts it to a record in another object within the application. For example, in a Product Development application, you might have records in an Ideas object that you want to convert to Product records. The Create new record trigger type needs a conversion map that you set up before creating the trigger.

To set properties for a Create new record trigger:

  1. Choose a Conversion map. When a record in one object gets created from the values of a record in another object, use a conversion map. A conversion map defines what fields and values correlate to each other.

    For example, maybe you want to create a Deleted Contacts record to hold contact information after the active record is deleted. A conversion map would show how the field values in the Contacts object would be transferred into the Deleted Contacts object.

  2. Under Trigger Condition Formula, enter a formula to specify conditions for the trigger to activate.
  3. After you have entered a formula, select Check it for errors to check for syntax errors.
  4. Select the magnifying glass icon next to Debug your formula, then choose a record to test your formula.
  5. Select Save.

Attach related record properties

Attaching a related record trigger sets a condition to identify which related record to attach. Have your formula return the ID for the related record. This trigger type needs a relationship to be set up before creating the trigger.

To set properties for an Attach related record trigger:

  1. In Relationship, choose a related object. First create a relationship between objects before you create a trigger to attach a related record.
  2. Enter a formula to return the value of the target field in the Create relationship formula text box. The value is the name of the record in the related object that you want the current record related to. For instance, to create a relationship with a ship from location based on a sales quote price, your formula might look like this:
    Copy
    if ({!quote.price!} >= 10,000) {
    return "Distribution Center"; 
    } else {
    return "Local Warehouse";
    }
  3. After you have entered a formula, select check it for errors to check for syntax errors.
  4. Select the magnifying glass icon next to Debug your formula, then choose a record to test your formula.
  5. Select Save.

Run triggers on related records properties

When you run triggers on related objects, you essentially call other triggers that were deployed on that related object. This behavior means that you also run these other triggers on the records in the related object.

To set properties for Run triggers on related records:

  1. In Relationship, select the related object on which you want to activate triggers.
  2. Select the triggers that you want to activate by moving the triggers from the Available triggers list to the Selected triggers list.
  3. Enter a formula to specify conditions for the trigger to be activated in the Trigger Condition Formula text box. For instance, if you want to create a new record only for projects that are over $1,000, your formula might look like this:

    Copy
    {!project.cost!} >= 1000

  4. After you have entered a formula, select Check it for errors to check for syntax errors.
  5. Select the magnifying glass icon next to Debug your formula, then choose a record to test your formula.
  6. Select Save.

Send email properties

The Send email trigger uses a mail template and the records in scope to send an email to someone. With this trigger type, you set up an email template before creating the trigger. The record in scope also needs to contain a valid email address in an email type field.

To set properties for a Send email trigger:

  1. Optionally, select Use field, then select the email field you want this trigger to use if the object contains an email field that you want as a source for the trigger. The merge field token is automatically entered into the Send to box.
  2. In Send to, enter the static email addresses that you want to use in all instances of this trigger. To enter multiple addresses, separate addresses with a comma. For example:
    Copy
    emailA@example.com, emailB@example.com 
  3. You also can use static addresses in combination with the merge field address from Use field by separating each address with a comma:

    Copy
    {!R128126.e-mail!}, emailA@example.com, emailB@example.com

  4. Enter a Reply to address. You can add multiple if you wish.
  5. Choose the Email template that you want this trigger to use.
  6. Enter a formula to specify conditions for the trigger to be activated in the Trigger Condition Formula text box. For instance, if you want to create a new record only for projects that are over $1,000, your formula might look like this:
    Copy
    {!project.cost!} >= 1000
  7. After you have entered a formula, select Check it for errors to check for syntax errors.
  8. Select the magnifying glass icon next to Debug your formula, then choose a record to test your formula.
  9. Select Save.

Create template document properties

A Create template document trigger uses an document template to create an instance of the template. The template is where merge fields become actual values and stored in a file field in the record. You can create a document template and a file field before creating the trigger or create the document template while creating the trigger.

To set properties for a Create template document trigger:

  1. When setting up a Create template document trigger, you have two options:
    1. Set the document template to use with this trigger: select Document template, then select a template.
    2. Let the end user pick which document template to use: select Document template picklist, then select the list the user sees when this trigger is activated.
  2. In File field, choose a field where the new document is to be saved. The field needs to be a File type. See field types for more information.
  3. Optionally, choose an Email template, and fill in the Send To box to send this document by email. See Send email properties for more information about available email options.
  4. Enter a formula to specify conditions for trigger to be activated in the Trigger condition formula text box. For instance, if you want to create a new record only for projects that are over $1,000, your formula might look like this:
    Copy
    {!project.cost!} >= 1000
  5. After you have entered a formula, select Check it for errors to check for syntax errors.
  6. Select the magnifying glass icon next to Debug your formula, then choose a record to test your formula.
  7. Select Save.

HTTP Post properties

The HTTP post trigger is a one way communication to an external URL. Unless you target the Intacct API, ensure that the page of the target URL can process your HTTP post.

For example, you might run an Inventory Interface in Platform that interacts with an external service. If so, you can send notices to that service when items change locations. You could set up a trigger that activates when a user updates an item location field. The external application would need to be set to receive the name and value pair or XML specified in the template of your post.

To set properties for an HTTP post trigger:

  1. Select your Encoding specification.
  2. The encoding is added to the HTTP header. The payload should match this header; add an appropriate document template.
    • Name-value pairs: application/x-www-form-urlencoded
    • SOAP: application/x-www-form-urlencoded (default) or application/soap+xml
    • Intacct API: x-intacct-xml-request
    • JSON: application/json
  3. In Target URL, enter the address for the script or application receiving the post.
  4. To use the Intacct XML API for this post, select Use API endpoint. Then, be sure to start your template with "xmlrequest ="  followed by your XML.
  5. Select a Document template to use for this post. The template needs to be formatted in name-value pairs separated by an ampersand.
  6. If the document has straight XML format, the XML is passed as the name of the first post element.
  7. Enter a formula to specify conditions for trigger to be activated in the Trigger Condition Formula text box. For instance, if you want to create a new record only for projects that are over $1,000, your formula might look like this:
    Copy
    {!project.cost!} >= 1000
  8. After you have entered a formula, select Check it for errors to check for syntax errors.
  9. Select the magnifying glass icon next to Debug your formula, then choose a record to test your formula.
  10. Select Save.

Intacct API properties

Sage Intacct uses a document template to send a request from a document template to the Intacct API. Because it stays within Intacct, this trigger type does not need an HTTP request. An Intacct API Trigger does need a document template that defines a function for the API to perform.

The API call relies on the credentials of the user who performs the action that initiates the trigger. If that person doesn't have permissions for the objects affected by the trigger, the API call fails.

To set the properties for an Intacct API trigger:

  1. Select a Document template.
  2. Enter a formula to specify conditions for the trigger to be activated in the Trigger condition formula text box. For instance, if you want to create a new record only for projects that are over $1,000, your formula might look like this:
    Copy
    {!project.cost!} >= 1000
  3. After you have entered a formula, select Check it for errors to check for syntax errors.
  4. Select the magnifying glass icon next to Debug your formula, then choose a record to test your formula.
  5. Select Save.