Skip to main content

system.kanoa.event.deleteCounterEvents

Description

Delete counter event based on the passed in counterInfo. NOTE: This is an updated count function that support itemStates, items and workorders

Syntax

deleteCounterEvents(counterInfo, userId)
  • Parameters
      counterInfo (dict)
      - counterId (int)
      - startDate (datetime)
      - endDate (datetime)
      - itemStateId (int)
      - itemId (int)
      - workOrderId (int)
  • Returns
      # of records modified (int)
      msg (string): None if success
  • Code Example

    # Example Usage:
    counterId = 7
    userId = 5
    startDate = system.date.parse("2025-01-01 00:00:00")
    endDate = system.date.parse("2025-01-07 00:00:00")
    counterInfo = {'counterId': 7, 'startDate': startDate, 'endDate': endDate})
    retVal, msg = system.kanoa.event.deleteCounterEvents(counterInfo, userId)