Class EventDataDialogField
Utility class to generate a field for dialog to use in CRMScript triggers.
Syntax
Constructors
EventDataDialogField()
Initializes a new instance of the EventDataDialogField class.
Declaration
EventDataDialogField
Methods
addListItem(String)
Adds individual items to list.
Declaration
Void addListItem(String item)
Parameters
Type | Name | Description |
---|---|---|
String | id | Value for list item. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setId("myList");
field.setType("list");
field.addListItem("Value 1");
field.addListItem("Value 2");
dialog.addField(field);
getAdditionalInfo()
Returns additional info for the named list.
Declaration
String getAdditionalInfo()
Returns
Type | Description |
---|---|
String |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListListName("ejcategory");
field.setAddtionalInfo("hierarchy=true&shortNames=true&onlyOwnCategories=true&excludeHistory=true&shortTooltip=true");
print(field.getAdditionalInfo());
getAllowBlank()
Returns true if field is allowed to be empty instead of 0.
Declaration
Bool getAllowBlank()
Returns
Type | Description |
---|---|
Bool |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListListName("ejcategory");
field.setAllowBlank(false);
print(field.getAllowBlank().toString());
getAllowRootSelection()
Returns true if root selection is allowed.
Declaration
Bool getAllowRootSelection()
Returns
Type | Description |
---|---|
Bool |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListListName("ejcategory");
field.setAllowRootSelection(false);
print(field.getAllowRootSelection().toString());
getDays()
Returns true if days is enabled, used with timespan field type.
Declaration
Bool getDays()
Returns
Type | Description |
---|---|
Bool |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("timespan");
field.setDays(false);
print(field.getDays().toString());
getDefault()
Returns default value set.
Declaration
String getDefault()
Returns
Type | Description |
---|---|
String |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListListName("ejcategory");
field.setDefault("1");
print(field.getDefault());
getDefaultFloat()
Returns default float value set. Only use for float field type.
Declaration
Float getDefaultFloat()
Returns
Type | Description |
---|---|
Float |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListListName("ejcategory");
field.setDefaultFloat(3.14);
print(field.getDefaultFloat().toString(2));
getForceFlatList()
Force flat list if using list name.
Declaration
Bool getForceFlatList()
Returns
Type | Description |
---|---|
Bool |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
field.setForceFlatList(false);
print(field.getForceFlatList().toString());
getId()
Returns identifier for field.
Declaration
String getId()
Returns
Type | Description |
---|---|
String |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
field.setId("assoc");
print(field.getId());
getHideEmptyRootsInSearch()
If true, hide empty roots in search. Default is false. Only applies when showFullPath is true and field type is list.
Declaration
Bool getHideEmptyRootsInSearch()
Returns
Type | Description |
---|---|
Bool |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
field.setHideEmptyRootsInSearch(true);
print(field.getHideEmptyRootsInSearch().toString());
getHours()
Returns true if hours is enabled, used with timespan field type.
Declaration
Bool getHours()
Returns
Type | Description |
---|---|
Bool |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("timespan");
field.setHours(false);
print(field.getHours().toString());
getLabel()
Returns label for field.
Declaration
String getLabel()
Returns
Type | Description |
---|---|
String |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
field.setLabel("My label");
print(field.getLabel());
getListName()
Returns listname for field.
Declaration
String getListName()
Returns
Type | Description |
---|---|
String |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
print(field.getListName());
getMandatory()
If true, field has to have a valid value.
Declaration
Bool getMandatory()
Returns
Type | Description |
---|---|
Bool |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
field.setMandatory(true);
print(field.getMandatory().toString());
getMinutes()
Returns true if minutes is enabled, used with timespan field type.
Declaration
Bool getMinutes()
Returns
Type | Description |
---|---|
Bool |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("timespan");
field.setMinutes(false);
print(field.getMinutes().toString());
getPlaceholder()
Returns placeholder text for field.
Declaration
String getPlaceholder()
Returns
Type | Description |
---|---|
String |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
field.setPlaceholder("Select associate");
print(field.getPlaceholder());
getSeconds()
Returns true if seconds is enabled, used with timespan field type.
Declaration
Bool getSeconds()
Returns
Type | Description |
---|---|
Bool |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("timespan");
field.setSeconds(false);
print(field.getSeconds().toString());
getShowAllChildrenInSearch()
Show all children when searching. Default is false. Only applies if showFullPath is true and field type is list.
Declaration
Bool getShowAllChildrenInSearch()
Returns
Type | Description |
---|---|
Bool |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("ejcategory");
field.setShowAllChildrenInSearch(true);
print(field.getShowAllChildrenInSearch().toString());
getShowFullPath()
If true, list is preloaded so that the full path is shown.
Declaration
Bool getShowFullPath()
Returns
Type | Description |
---|---|
Bool |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("ejcategory");
field.setShowFullPath(true);
print(field.getShowFullPath().toString());
getType()
Returns what type of field.
Declaration
String getType()
Returns
Type | Description |
---|---|
String |
Remarks
Supports:
- label
- text
- integer
- decimal
- checkbox
- date
- datetime
- time
- timeSpan
- list
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
print(field.getType());
setAdditionalInfo(String)
Sets additional info for the named list.
Declaration
Void setAdditionalInfo(String info)
Parameters
Type | Name | Description |
---|---|---|
String | info | Additional info. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListListName("ejcategory");
field.setAddtionalInfo("hierarchy=true&shortNames=true&onlyOwnCategories=true&excludeHistory=true&shortTooltip=true");
print(field.getAdditionalInfo());
setAllowBlank(Bool)
Set to true if field is allowed to be empty instead of 0.
Declaration
Void setAllowBlank(Bool allowBlank)
Parameters
Type | Name | Description |
---|---|---|
Bool | allowBlank | Allowing field to be empty instead of 0 if true. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListListName("ejcategory");
field.setAllowBlank(false);
print(field.getAllowBlank().toString());
setAllowRootSelection(Bool)
Set to true if root selection is allowed.
Declaration
Void setAllowRootSelection(Bool allowRoot)
Parameters
Type | Name | Description |
---|---|---|
Bool | allowRoot | Allowing root selection if true. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListListName("ejcategory");
field.setAllowRootSelection(false);
print(field.getAllowRootSelection().toString());
setDays(Bool)
Set to true if days is enabled, used with timespan field type.
Declaration
Void setDays(Bool enable)
Parameters
Type | Name | Description |
---|---|---|
Bool | enable | Enabling days if true. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("timespan");
field.setDays(false);
print(field.getDays().toString());
setDefault(String)
Sets default value for field.
Declaration
Void setDefault(String default)
Parameters
Type | Name | Description |
---|---|---|
String | default | Default value for field. |
Returns
Type | Description |
---|---|
Void |
Remarks
Can be used to set Integer, Date, DateTime, Time and String default value formatted as a String. For Float please use setDefaultFloat(Float).
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListListName("ejcategory");
field.setDefault("1");
print(field.getDefault());
setDefaultFloat(Float)
Sets default float value. Only use for float field type.
Declaration
Void setDefaultFloat(Float default)
Parameters
Type | Name | Description |
---|---|---|
Float | default | Default value for field. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListListName("ejcategory");
field.setDefaultFloat(3.14);
print(field.getDefaultFloat().toString(2));
setForceFlatList(Bool)
Force flat list if using list name.
Declaration
Void setForceFlatList(Bool enable)
Parameters
Type | Name | Description |
---|---|---|
Bool | enable | Force flat list if true. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
field.setForceFlatList(false);
print(field.getForceFlatList().toString());
setHideEmptyRootsInSearch(Bool)
If true, hide empty roots in search. Default is false. Only applies when showFullPath is true and field type is list.
Declaration
Void setHideEmptyRootsInSearch(Bool enable)
Parameters
Type | Name | Description |
---|---|---|
Bool | enable | If true, hide empty roots in search. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
field.setHideEmptyRootsInSearch(true);
print(field.getHideEmptyRootsInSearch().toString());
setHours(Bool)
Returns true if hours is enabled, used with timespan field type.
Declaration
Void setHours(Bool enable)
Parameters
Type | Name | Description |
---|---|---|
Bool | enable | If true, hours are enabled. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("timespan");
field.setHours(false);
print(field.getHours().toString());
setId(String)
Set identifier for field.
Declaration
Void setId(String identifier)
Parameters
Type | Name | Description |
---|---|---|
String | identifier | Identifier for field. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
field.setId("assoc");
print(field.getId());
setLabel(String)
Sets label for field.
Declaration
Void setLabel(String label)
Parameters
Type | Name | Description |
---|---|---|
String | enable | Label for field. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
field.setLabel("My label");
print(field.getLabel());
setListName(String)
Set listname for field.
Declaration
Void setListName(String listName)
Parameters
Type | Name | Description |
---|---|---|
String | listName | Listname for field. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
print(field.getListName());
setMandatory(Bool)
If true, field has to have a valid value.
Declaration
Void setMandatory(Bool mandatory)
Parameters
Type | Name | Description |
---|---|---|
Bool | mandatory | If true, field is mandatory. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
field.setMandatory(true);
print(field.getMandatory().toString());
setMinutes(Bool)
Returns true if minutes is enabled, used with timespan field type.
Declaration
Void setMinutes(Bool enable)
Parameters
Type | Name | Description |
---|---|---|
Bool | enable | If true, minutes are enabled. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("timespan");
field.setMinutes(false);
print(field.getMinutes().toString());
setPlaceholder(String)
Sets placeholder text for field.
Declaration
Void setPlaceholder(String placeholder)
Parameters
Type | Name | Description |
---|---|---|
String | placeholder | Placeholder text for field. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
field.setPlaceholder("Select associate");
print(field.getPlaceholder());
setSeconds(Bool)
Returns true if seconds is enabled, used with timespan field type.
Declaration
Void setSeconds(Bool enable)
Parameters
Type | Name | Description |
---|---|---|
Bool | enable | If true, seconds are enabled. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("timespan");
field.setSeconds(false);
print(field.getSeconds().toString());
setShowAllChildrenInSearch(Bool)
Show all children when searching. Default is false. Only applies if showFullPath is true and field type is list.
Declaration
Void setShowAllChildrenInSearch(Bool enable)
Parameters
Type | Name | Description |
---|---|---|
Bool | enable | If true, shows all children when searching. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("ejcategory");
field.setShowAllChildrenInSearch(true);
print(field.getShowAllChildrenInSearch().toString());
setShowFullPath(Bool)
If true, list is preloaded so that the full path is shown.
Declaration
Void setShowFullPath(Bool enable)
Parameters
Type | Name | Description |
---|---|---|
Bool | enable | If true, list is preloaded and shows full path. |
Returns
Type | Description |
---|---|
Void |
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("ejcategory");
field.setShowFullPath(true);
print(field.getShowFullPath().toString());
setType(String)
Sets what type of field.
Declaration
Void setType(String type)
Parameters
Type | Name | Description |
---|---|---|
String | type | Type of field. |
Returns
Type | Description |
---|---|
Void |
Remarks
Supports:
- label
- text
- integer
- decimal
- checkbox
- date
- datetime
- time
- timeSpan
- list
Examples
EventDataDialogDefinition dialog;
EventDataDialogField field;
field.setType("list");
field.setListName("associate");
print(field.getType());