Skip to main content

system.kanoa.event.addStateEvent(stateInfo, userId)

Adds a stateEvent record


Parameters

stateInfo Dictionary

- assetIdInteger
- assetStateIdIntegerCan set this to a sub asset if asset is down due to a downtime fault on a child cell otherwise null
- noteString
- stateCodeInteger
- tStampString

userId Integer: Id of user executing the function


Returns

stateEventId Dictionary


Example

stateInfo = {'assetId': 18, 'assetStateId': 18, 'stateCode': 1, 'tStamp': system.date.now()}
userId = 123
stateInfo = system.kanoa.event.addStateEvent(stateInfo, userId)