system.kanoa.event.updateProductionEvent(productionEventInfo, userId)
Updates a new modeEvent record. Similar to updateModeEvent, but updates all fields.
Parameters
productionEventInfo Dictionary: All keys are required, unless otherwise stated
| - assetId | Integer | Id of asset |
| - comment: | Not | required |
| - itemId | Integer | Not required. Id of item |
| - modeCode | Integer | |
| - modeEventId | Integer | Id of the modeEvent record to update |
| - modeSourceId | Integer | Whether this is coming from the schedule, operator or plc (tag change) |
| - standardRate | Float | Not required |
| - tStamp | DateTime | Time stamp of mode event |
| - workOrderId | Integer | Not required. Id of workorder |
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
message String None if success
Example
userId = 5
productionEventInfo = {'modeEventId': 55467, 'assetId': 901, 'modeCode': 1, 'modeSourceId': 1, 'tStamp': system.date.now()}
recordsModified, msg = system.kanoa.event.updateProductionEvent(productionEventInfo, userId)