# 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<br />
<table class='dictionaryKeyTable'>
	<tbody>
 	<tr><td> - assetId</td><td>Integer</td><td></td></tr>	
 	<tr><td> - autoSchedule</td><td>Boolean</td><td></td></tr>	
 	<tr><td> - modeCode</td><td>Integer</td><td></td></tr>	
 	<tr><td> - modeId</td><td>Integer</td><td></td></tr>	
	</tbody>
</table>

**userId** `Integer`:Id of the user executing the function<br />

---
### Returns
**# of records modified** `Integer`<br />
**msg** `String` None if success<br />

---
### Example
```python
assetModeList = [{'assetId': 901, 'modeId': 2, 'modeCode': 1, 'autoSchedule': True}]
userId = 5
retVal, msg = system.kanoa.asset.upsertAssetModeLinks(assetModeList, userId)
```
