Skip to main content

system.kanoa.asset.addAssetType(assetTypeInfo, userId)

Adds a new asset type. All assetTypeInfo keys are required.


Parameters

assetTypeInfo Dictionary

- assetTypeNameString
- enabledBoolean
- iconPathStringCan be None
- parentIdIntegerCan be None for root type

userId Integer:Id of the user executing the function


Returns

assetTypeId Integer
message String None if success


Example

assetTypeInfo = {
'assetTypeName': 'Region',
'parentId': 1,
'enabled': True,
'iconPath': None
}
userId = 5
assetTypeId, msg = system.kanoa.asset.addAssetType(assetTypeInfo, userId)