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