system.kanoa.attribute.updateAttribute
Description
Updates an existing attribute.Syntax
updateAttribute(attrInfo, userId)Parameters:
Returns:
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
attributeId | int | e.g. 1 | |
attributeName | string | e.g. 'some attribute name' | |
attributeDescription | string | e.g. 'some description' | |
parentId | int | e.g. 6 | |
enabled | bool | e.g. True |
Code Examples
# Example usage
attrInfo = {
'attributeId': 1,
'attributeName': 'some attribute name',
'attributeDescription': 'some description',
'parentId': 6,
'enabled': True
}
userId = 123
modifiedRecords = system.kanoa.attribute.updateAttribute(attrInfo, userId)
print(modifiedRecords) # Print the number of modified records