Skip to main content

system.kanoa.event.checkItemInfo(assetId, workOrderName, itemName, userId)

This function checks to see if this work order or item exists, and if not will create the workorder and item and add an item-asset link.


Parameters

assetId Integer: Id of asset
workOrderName String: name of the work order
itemName String: Name of the item
userId Integer


Returns

workOrderId Integer
itemId Integer


Example

assetId = 123
workOrderName = "WO123"
itemName = "ItemXYZ"
userId = 5
workOrderId, itemId = system.kanoa.event.checkItemInfo(assetId, workOrderName, itemName, userId)