Skip to main content

system.kanoa.asset.updateAssetField(assetId, field, value, userId)

Updates the asset configuration field with the passed value for the assetId


Parameters

assetId Integer: Id of asset to update
field String: Valid options are assetName, parentId, assetTypeId, assetGroupId, oeeType, oee, a, p, q, targetThreshold, sortOrder, enabled, timezone
value String: Value to update to
userId Integer: Id of user executing the function


Returns

# of records modified Integer
message String None if success


Example

assetId = 12
field = "enabled"
value = False
userId = 5
recordsModified, message = system.kanoa.asset.updateAsset(assetId, field, value, userId)