Skip to main content

system.kanoa.asset.deleteStateCategory

Requires kanoaOPS license

Description

Deletes the stateCategory in KanoaOPS. Foreign key constraints will prevent deletion if the stateCategory has been used.

Syntax

deleteStateCategory(stateCategoryId, userId)

Parameters:
  • stateCategoryId (int): The ID of the stateCategory to be deleted.
  • userId (int): The ID of the user making the deletion.

  • Returns:
  • retVal (bool), msg (string): # of records modified or error message
  • Code Examples

    # Usage example
    success_flag, message = system.kanoa.asset.deleteStateCategory(stateCategoryId=123, userId=456)

    if not success_flag:
    print(f"Deletion failed: {message}")
    else:
    print(f"Successfully deleted stateCategory.")