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. It is used when a tag value changes for mode, work order, or product.


Parameters

assetId Integer: Id of asset
workOrderName String: Name of the work order
itemName String: Name of the item
userId Integer: Id of user executing the function


Returns

workOrderId Integer
itemId Integer


Example

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