<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=6889170&amp;fmt=gif">
Skip to content
  • There are no suggestions because the search field is empty.

Methods | IScriptContext.CreateField(String, ChoiceFieldItemType) Method

Creates the given field name as choice or multi-choice if it does not exist.

Syntax

C# Copy
FieldItem CreateField(
	string fieldName
        ChoiceFieldItemType choiceFieldItemType
)

Parameters
fieldName    String
                The name of the field to create.
choiceFieldItemType    choiceFieldItemType
                The choice type to use for the field.

Return Value
FieldItem
The created FieldItem instance.

Exceptions

Exception Condition
ArgumentNullException Thrown if fieldName is null or empty.
ArgumentException Thrown if the fieldName already exists.

See Also

Reference
IScriptContext Interface
CreateField Overload
FieldItem Class
Compiled.EDD.Scripting Namespace