Methods | ScriptContext.CreateField(String, FieldItemType) Method
Creates the given field name using the provided FieldItemType if it does not exist.
Syntax
C#
Copy
public FieldItem CreateField(
string fieldName,
FieldItemType fieldType
)
Parameters
fieldName String
The name of the field to create.
fieldType FieldItemType
The data type of the field.
Return Value
FieldItem
The created FieldItem instance.
Implements
IScriptContext.CreateField(String, FieldItemType)
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | Thrown if fieldName is null or empty. |
| ArgumentException | Thrown if the fieldName already exists. |
See Also
Reference
ScriptContext Class
CreateField Overload
Compiled.EDD.Scripting Namespace