system.kanoa.asset.upsertAssetModeLinks(assetModeList, userId)
Updated function that does fast bulks inserts/updates for linking assets and modes
Parameters
assetModeList List of Dictionaries: list of dictionaries
| - assetId | Integer | |
| - autoSchedule | Boolean | |
| - modeCode | Integer | |
| - modeId | Integer |
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
msg String None if success
Example
assetModeList = [{'assetId': 901, 'modeId': 2, 'modeCode': 1, 'autoSchedule': True}]
userId = 5
retVal, msg = system.kanoa.asset.upsertAssetModeLinks(assetModeList, userId)