Skip to main content
Utility class to generate a dialog to use in CRMScript triggers.

Constructors

EventDataDialogDefinition()

Initializes a new instance of the EventDataDialogDefinition class.

Methods

addCheckbox(String,String)

Adds a checkbox field with given label.
Returns: CRMScript.Global.Void Example:

addCheckbox(String,String,Bool)

Adds a checkbox field with given label. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

addDate(String,String)

Adds a Date field with given label.
Returns: CRMScript.Global.Void Example:

addDate(String,String,Date)

Adds a Date field with given label and a default value.
Returns: CRMScript.Global.Void Example:

addDate(String,String,Date,String,Bool)

Adds a Date field with given label, default value, placeholder text. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

addDateTime(String,String)

Adds a DateTime field with given label.
Returns: CRMScript.Global.Void Example:

addDateTime(String,String,DateTime)

Adds a DateTime field with given label and a default value.
Returns: CRMScript.Global.Void Example:

addDateTime(String,String,DateTime,String,Bool)

Adds a DateTime field with given label, default value, placeholder text. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

addField(EventDataDialogField)

Adds a field to dialog.
Returns: CRMScript.Global.Void Example:

addFloat(String,String)

Adds a Float field with given label.
Returns: CRMScript.Global.Void Example:

addFloat(String,String,Float)

Adds a Float field with given label and a default value.
Returns: CRMScript.Global.Void Example:

addFloat(String,String,Float,String,Bool)

Adds a Float field with given label, default value, placeholder text. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

addInteger(String,String)

Adds a Integer field with given label.
Returns: CRMScript.Global.Void Example:

addInteger(String,String,Integer)

Adds a Integer field with given label and a default value.
Returns: CRMScript.Global.Void Example:

addInteger(String,String,Integer,String,Bool)

Adds a Integer field with given label, default value, placeholder text. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

addLabel(String,String)

Adds a label field.
Returns: CRMScript.Global.Void Example:

addList(String,String,String)

Adds a list field from listName with the given label.
Returns: CRMScript.Global.Void Example:

addList(String,String,String,Integer)

Adds a list field from listname with given label and default value.
Returns: CRMScript.Global.Void Example:

addList(String,String,String,Integer,String,Bool)

Adds a list field from listname with given label, default value, placeholder text. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

addList(String,String,String[],String,String,Bool)

Adds a list field from manually created list with given label, default value, placeholder text. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

addList(String,String,Map,String,String,Bool)

Adds a list field from manually created list with key-value pair with given label, default value, placeholder text. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

addList(String,String,String,Integer,String,Bool,String,Bool)

Adds a list field from listname with given label, default value, placeholder text. Possible to set additionalInfo supported by list and force list to be flat. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

addText(String,String)

Adds a text field with given label.
Returns: CRMScript.Global.Void Example:

addText(String,String,String)

Adds a text field with given label and a default value.
Returns: CRMScript.Global.Void Example:

addText(String,String,String,String,Bool)

Adds a text field with given label, default value, placeholder text. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

addTextarea(String,String,String,String,Bool,Integer,Integer)

Adds a textarea field with given label, default value, placeholder text, rows and columns. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

addTime(String,String)

Adds a Time field with given label.
Returns: CRMScript.Global.Void Example:

addTime(String,String,Time)

Adds a Time field with given label and a default value.
Returns: CRMScript.Global.Void Example:

addTime(String,String,Time,String,Bool)

Adds a Time field with given label, default value, placeholder text. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

addTimeSpan(String,String)

Adds a TimeSpan field with given label.
Returns: CRMScript.Global.Void Example:

addTimeSpan(String,String,Integer)

Adds a TimeSpan field with given label and a default value.
Returns: CRMScript.Global.Void Example:

addTimeSpan(String,String,Integer,String,Bool)

Adds a TimeSpan field with given label, default value, placeholder text. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

addTimeSpan(String,String,Integer,String,Bool,Bool,Bool,Bool,Bool,Bool)

Adds a TimeSpan field with given label, default value, placeholder text and which units to display. Possible to set field as mandatory.
Returns: CRMScript.Global.Void Example:

removeField(String)

Remove field with given name.
Returns: CRMScript.Global.Void Example:

getBlockExecutionOnCancel()

Returns true if execution is blocked on cancel.
Returns: CRMScript.Global.Bool

setBlockExecutionOnCancel(Bool)

Set if execution should be blocked on cancel.
Returns: CRMScript.Global.Void

getHeight()

Get height set on dialog.
Returns: CRMScript.Global.Integer

setHeight(Integer)

Set height of dialog.
Returns: CRMScript.Global.Void Example:

getIcon()

Returns type of icon on dialog
Returns: CRMScript.Global.String
Supports:
  • info
  • warn
  • error
  • question

setIcon(String)

Sets icon type on dialog.
Returns: CRMScript.Global.Void
Supports:
  • info
  • warn
  • error
  • question
Example:

getMarkdown()

Returns body text with Markdown syntax.
Returns: CRMScript.Global.String

setMarkdown(String)

Sets body text using Markdown syntax on dialog. If specified this will take precedence over setText().
Returns: CRMScript.Global.Void
<b>NOTE:</b> This is not full Markdown but a “lite” version.
  • - Produces a <h1>

  • Newline in current paragraph - adds a <br>
  • Blank line - starts a new paragraph. Multiple blank lines in a row will create empty paragraphs.
  • Leading * - replaced with •
  • Whitelisted tags are preserved (b, i, a, span, p).
  • Whitelisted attributes are preserved (class). To get a section styled differently, you may use a span element with a custom class name.
Example:

getPrefix()

Returns prefix set for fields dialog
Returns: CRMScript.Global.String

setPrefix(String)

Sets prefix for fields in dialog.
Returns: CRMScript.Global.Void Example:

getText()

Returns body text on dialog
Returns: CRMScript.Global.String

setText(String)

Sets body text on dialog.
Returns: CRMScript.Global.Void Example:

getTitle()

Returns title on dialog
Returns: CRMScript.Global.String

setTitle(String)

Sets title on dialog.
Returns: CRMScript.Global.Void Example:

getType()

Returns what type of dialog
Returns: CRMScript.Global.String
Supports:
  • yesno
  • okcancel

setType(String)

Sets type of dialog.
Returns: CRMScript.Global.Void
Supports:
  • yesno
  • okcancel
Example:

getWidth()

Get width set on dialog.
Returns: CRMScript.Global.Integer

setWidth(Integer)

Set width of dialog.
Returns: CRMScript.Global.Void Example:

toJSONString()

Returns EventDataDialogDefinition as a JSON string.
Returns: CRMScript.Global.String - Returns object as a JSON string. Example: