system.kanoa.asset.linkAssetStates(assetIdList, stateIdList, stateCodeList, userId)
Links a list of assetIds with a list of stateIds. If a list of stateCodes is also provided, they will also be linked to the stateIds. If a link already exists, it will be enabled.
Parameters
assetIdList List of Integers: list of assetIds
stateIdList List of Integers: List of stateIds
stateCodeList List of Integers: A list of stateCodes to be used. Can be an empty list
userId Integer: Id of user executing the function
Returns
None
Example
assetIdList = [1,2,3]
stateIdList = [101]
stateCodeList = [3]
userId = 5
retVal = system.kanoa.asset.linkAssetStates(assetIdList, stateIdList, userId, stateCodeList)