CreateExtendedAttribute

ExtendedAttributeDefinition.CreateExtendedAttribute method (1 of 7)

Creates a new extended attribute with the field ID which equals to this object’s field ID value.

public ExtendedAttribute CreateExtendedAttribute()

Return Value

returns created instance of the ExtendedAttribute class with the fieldID which equals to this object’s fieldID value.

See Also


ExtendedAttributeDefinition.CreateExtendedAttribute method (2 of 7)

Creates a new extended attribute with the field ID which equals to this object’s field ID value and the specified text value.

public ExtendedAttribute CreateExtendedAttribute(string textValue)
Parameter Type Description
textValue String The specified text value.

Return Value

returns created instance of the ExtendedAttribute class with the fieldID which equals to this object’s fieldID value.

Exceptions

exception condition
InvalidOperationException If current CfType is not ‘Text’

See Also


ExtendedAttributeDefinition.CreateExtendedAttribute method (3 of 7)

Creates a new extended attribute with the field ID which equals to this object’s field ID value and the specified numeric value.

public ExtendedAttribute CreateExtendedAttribute(decimal numericValue)
Parameter Type Description
numericValue Decimal The specified numeric value.

Return Value

returns created instance of the ExtendedAttribute class with the fieldID which equals to this object’s fieldID value.

Exceptions

exception condition
InvalidOperationException If current CfType is not ‘Number’ or ‘Cost’

See Also


ExtendedAttributeDefinition.CreateExtendedAttribute method (4 of 7)

Creates a new extended attribute with the field ID which equals to this object’s field ID value and the specified date value.

public ExtendedAttribute CreateExtendedAttribute(DateTime dateTimeValue)
Parameter Type Description
dateTimeValue DateTime The specified date time value.

Return Value

returns created instance of the ExtendedAttribute class with the fieldID which equals to this object’s fieldID value.

Exceptions

exception condition
InvalidOperationException If current CfType is not ‘Date’, ‘Start’ or ‘Finish’

See Also


ExtendedAttributeDefinition.CreateExtendedAttribute method (5 of 7)

Creates a new extended attribute with the field ID which equals to this object’s field ID value and the specified duration value.

public ExtendedAttribute CreateExtendedAttribute(Duration durationValue)
Parameter Type Description
durationValue Duration The specified duration value.

Return Value

returns created instance of the ExtendedAttribute class with the fieldID which equals to this object’s fieldID value.

Exceptions

exception condition
InvalidOperationException If current CfType is not ‘Duration’

See Also


ExtendedAttributeDefinition.CreateExtendedAttribute method (6 of 7)

Creates a new extended attribute with the field ID which equals to this object’s field ID value and the specified flag value.

public ExtendedAttribute CreateExtendedAttribute(bool flagValue)
Parameter Type Description
flagValue Boolean The specified flag value.

Return Value

returns created instance of the ExtendedAttribute class with the fieldID which equals to this object’s fieldID value.

Exceptions

exception condition
InvalidOperationException If current CfType is not ‘Flag’

See Also


ExtendedAttributeDefinition.CreateExtendedAttribute method (7 of 7)

Creates new extended attribute linked with specified Value item.

public ExtendedAttribute CreateExtendedAttribute(Value lookupValue)
Parameter Type Description
lookupValue Value The specified Value item.

Return Value

returns created instance of the ExtendedAttribute class linked with specified Value item.

Remarks

lookupValue should be previously added to the ExtendedAttributeDefinition using AddLookupValue method.

Examples

Use this code to create new ExtendedAttribute using specific value:

taskTextAttr.AddLookupValue(value1);
taskTextAttr.AddLookupValue(value2);
var extendedAttribute = taskTextAttr.CreateExtendedAttribute(value2);

See Also