Skip to main content

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

Adds a new asset type. All assetTypeInfo keys are required unless otherwise stated


Parameters

assetTypeInfo Dictionary

- assetTypeNameString
- enabledBooleanNot required. Will be set to True if not provided
- iconPathStringNot required. Will be set to True if not provided
- mobileBooleanNot required. Will be set to False if not provided
- parentIdIntegerSet to 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)