@servicenow/sdk - v4.7.0
    Preparing search index...
    • Creates a table check that scans records in a specific table (scan_table_check).

      Supports three modes:

      • Condition-only: use conditions to filter records (default)
      • Script-only: set advanced: true and provide a script
      • Combined: set advanced: true with both conditions and script

      Type Parameters

      Parameters

      Returns TableCheck<T>

      // Condition-based check
      TableCheck({
      $id: Now.ID['check-inactive-users'],
      name: 'Inactive Users with Roles',
      active: true,
      category: 'security',
      priority: '2',
      shortDescription: 'Finds inactive users that still have active roles',
      table: 'sys_user',
      conditions: 'active=false^roles!=',
      })

      // Advanced script-based check
      TableCheck({
      $id: Now.ID['check-large-attachments'],
      name: 'Large Attachment Detector',
      active: true,
      category: 'performance',
      priority: '3',
      shortDescription: 'Identifies records with oversized attachments',
      table: 'sys_attachment',
      advanced: true,
      script: Now.include('./check-large-attachments.js'),
      })

      // Combined conditions and script check
      TableCheck({
      $id: Now.ID['check-stale-incidents'],
      name: 'Stale Incident Detector',
      active: true,
      category: 'manageability',
      priority: '2',
      shortDescription: 'Finds incidents that are open and stale',
      table: 'incident',
      advanced: true,
      conditions: 'state!=6^state!=7',
      script: Now.include('./check-stale-incidents.js'),
      })