Skip to main content

system.kanoa.asset.deleteAssets

Requires kanoaOPS license

Description

Deletes the asset and all children underneath using SQL cascade function.

Syntax

deleteAssets(assetId, userId)

Parameters:
  • assetId (int): ID of the asset to be deleted.
  • userId (int): User ID.

  • Returns:
  • successFlag (bool): Boolean indicating the success of the operation.
  • msg (str): Status message ('Deleted' or error message).
  • Code Examples

    # Example Usage:
    asset_id = 123
    user_id = 456
    success, message = system.kanoa.asset.deleteAssets(asset_id, user_id)