Skip to content

Integrations API ​

executeCondition() ​

executeCondition is the IIFE defined in the Integration's Advanced condition field.

Parameters ​

NameTypeDescription
integrationGlideRecordThe Integration.
currentGlideRecordThe record that triggered the Integration.
rejectFunctionCan be called to stop the Integration from running.
  • Type

    ts
    function executeCondition(
    	integration: GlideRecord,
    	current: GlideRecord,
    	reject: () => void
    ) => void
    function executeCondition(
    	integration: GlideRecord,
    	current: GlideRecord,
    	reject: () => void
    ) => void
  • Example

    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);