system.kanoa.attribute.addAttribute(attrInfo, userId)
Adds a new attribute. If this attribute already exists it will return the existing attributeId
Parameters
attrInfo Dictionary
| - attributeDescription | String | |
| - attributeName | String | |
| - enabled | Boolean | |
| - parentId | Integer |
userId Integer
Returns
attributeId Integer
Example
attrInfo = {
'attributeName': 'some attribute name',
'attributeDescription': 'some description',
'parentId': 6,
'enabled': True
}
userId = 123
attributeId = system.kanoa.attribute.addAttribute(attrInfo, userId)