IScriptContextCreateField Method (String, ChoiceFieldItemType) | |
Creates the given field name as choice or multi-choice if it does not exist.
Namespace:
Compiled.EDD.Scripting
Assembly:
Compiled.EDD.Scripting (in Compiled.EDD.Scripting.dll) Version: 7.6.1.3-5cb5c356
Syntax FieldItem CreateField(
string fieldName,
ChoiceFieldItemType choiceFieldItemType
)
Parameters
- fieldName
- Type: SystemString
The name of the field to create. - choiceFieldItemType
- Type: Compiled.EDD.ScriptingChoiceFieldItemType
The choice type to use for the field.
Return Value
Type:
FieldItemThe created
FieldItem instance.
Exceptions Exception | Condition |
---|
ArgumentNullException | Thrown if fieldName is null or empty. |
ArgumentException | Thrown if the fieldName already exists. |
See Also