Changes an already existing property definition in the current plan (identified by its guid).
GSErrCode ACAPI_Property_ChangePropertyDefinition ( const API_PropertyDefinition& definition );
Parameters
- definition
- [in] The property definition to change.
Return Values
NoError
- The function has completed with success.
APIERR_BADID
- The guid of the parameter did not refer to a valid property definition or the groupGuid of the parameter did not refer to a valid property group or one of the availabilities’ guid did not refer to a valid structural type category value.
APIERR_NOACCESSRIGHT
- Do not have the right to modify a property definition on a teamwork server.
APIERR_NAMEALREADYUSED
- The new name of the definition is already used in the target property group.
APIERR_BADPARS
- Either the new value of the definition is inconsistent, for example the default value has a different value type than the definition itself, or the definitionType of the definition is not supported by the function.
APIERR_BADVALUE
- One of enumerations did not have their value out of the allowed ones. This includes c++ enums (i.e. they were uninitialized or memsetted), and enumeration property values (the possibleEnumValues doesn’t contain the default value)
For other common API errors see the API Errors document.
Example
For more detailed examples, please see the Property_Test add-on.GSErrCode RenameFirstPropertyDefinition () { GS::Array<API_PropertyDefinition> definitions; GSErrCode error = ACAPI_Element_GetPropertyDefinitions (APINULLGuid, API_PropertyDefinitionFilter_UserDefined, definitions); if (error == NoError && definitions.GetSize () > 0) { definitions[0].name = "Renamed Property Definition"; error = ACAPI_Property_ChangePropertyDefinition (definitions[0]); } return error; }
Requirements
- Version: API 20 or later
- Header: ACAPinc.h