 | ICommenceDatabaseAddItem Method |
Adds the indicated Item to the Category. Fields other than the Name field are set to their default values. (Default values for date fields must not specify date ranges, e.g., "every day"). By default, the new item is local (i.e., non-shared)
CAUTION: If the Category has mandatory fields, those fields must be filled in with subsequent EditItem commands. Use the GetFieldDefinition request to determine which fields are mandatory. Unpredictable results may follow if mandatory fields are left unfilled.
Note: If a clarify field is defined for the category (but is not a Sequence Number field), the clarify field value can be specified using the optional third parameter, Clarify Value. Alternatively, the Item parameter can be a clarified item name.
If the clarify field is a Sequence Number field, then the field value is determined automatically by Commence. An error results if the AddItem REQUEST tries to set a Sequence Number field. Use GetFieldDefinition to determine the Sequence Number field value so a clarified item name can be used with subsequent EditItems.
Namespace:
Vovin.CmcLibNet.Database
Assembly:
Vovin.CmcLibNet (in Vovin.CmcLibNet.dll) Version: 1.0.7729.42686
Syntaxbool AddItem(
string categoryName,
string itemName,
string clarifyValue
)
Function AddItem (
categoryName As String,
itemName As String,
clarifyValue As String
) As Boolean
Parameters
- categoryName
- Type: SystemString
Commence category name. - itemName
- Type: SystemString
Commence item name to add. - clarifyValue
- Type: SystemString
Commence clarify value.
Return Value
Type:
Booleantrue on success, inspect
GetLastError on failure.
See Also