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 user executing the function


Returns

assetTypeId Integer


Example

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