Integrations API
executeCondition()
executeCondition is the IIFE defined in the Integration's Advanced condition field.
Parameters
| Name | Type | Description |
|---|---|---|
| integration | GlideRecord | The Integration. |
| current | GlideRecord | The record that triggered the Integration. |
| reject | Function | Can be called to stop the Integration from running. |
Type
tsfunction executeCondition( integration: GlideRecord, current: GlideRecord, reject: () => void ) => voidfunction executeCondition( integration: GlideRecord, current: GlideRecord, reject: () => void ) => voidExample
js(function executeCondition(integration, current, reject) { /** * {GlideRecord} integration - the integration * {GlideRecord} current - the record that triggered the integration * {Function} reject - call reject to fail the condition and prevent trigger */ var someConditionIsNotMet = true; if (someConditionIsNotMet) { reject(); } })(integration, current, reject);(function executeCondition(integration, current, reject) { /** * {GlideRecord} integration - the integration * {GlideRecord} current - the record that triggered the integration * {Function} reject - call reject to fail the condition and prevent trigger */ var someConditionIsNotMet = true; if (someConditionIsNotMet) { reject(); } })(integration, current, reject);