Methods
-
getFileExitCallbacks(fileTypeName, event){Array.<function()>}
-
Returns all callback functions that are registered to a file related exit event.
Name Type Description fileTypeName
String the technical name of the file type
event
String the exit event name
- Since:
- 5.0a
Returns:
Type Description Array.<function()> the exit functions (or callbacks) -
getFileFieldExitCallbacks(fileTypeName, fieldName){Array.<function()>}
-
Returns all callback functions that are registered to a file field related exit event.
Name Type Description fileTypeName
String the technical name of the file type
fieldName
String the technical name of the file field
- Since:
- 5.0a
Returns:
Type Description Array.<function()> the exit functions (or callbacks) -
getScriptParameterExitCallbacks(scriptName, event){Array.<function()>}
-
Returns all callback functions that are registered to a script parameter related exit event.
Name Type Description scriptName
String the name(s) of the script configered in the manager
event
String the exit event name, i.e. one of the valid event identifiers listed in registerScriptParameterExitCallback
- Since:
- 5.0d
Returns:
Type Description Array.<function()> the exit functions (or callbacks) -
getScriptParameterFieldExitCallbacks(scriptName, fieldName){Array.<function()>}
-
Returns all callback functions that are registered to a ScriptParameterField related exit event.
Name Type Description scriptName
String the name(s) of the script configered in the manager
fieldName
String the exit field name, i.e. the name of a parameter of the script
- Since:
- 5.0d
Returns:
Type Description Array.<function()> the exit functions (or callbacks) -
getSearchExitCallbacks(event){Array.<function()>}
-
Returns all callback functions that are registered to a search related exit event.
Name Type Description event
String the exit event name
- Since:
- 5.0b
Returns:
Type Description Array.<function()> the exit functions (or callbacks) -
getSearchFieldExitCallbacks(fieldName){Array.<function()>}
-
Returns all callback functions that are registered to a search field related exit event.
Name Type Description fieldName
String the fields name
- Since:
- 5.0d
Returns:
Type Description Array.<function()> the exit functions (or callbacks) -
registerFileExitCallback(fileTypeName, event, fn)
-
Registers a callback function that can be attached to a file related exit event.
Name Type Description fileTypeName
String the technical name(s) of the file type(s), each separated by
,
or*
for any file type nameevent
String the exit event name, i.e. one of the valid event identifiers listed below
File.afterSetModelData
(e.g. for modifications of theFileFormModel
)File.beforeFileRender
File.afterFileRender
File.afterFileOpen
File.beforeFileEditStart
(optionally aborts the file edit start action iffn
returnsfalse
)File.afterFileEditStart
File.beforeFileEditCancel
(optionally aborts the file edit cancel action iffn
returnsfalse
)File.afterFileEditCancel
File.beforeFileEditCommit
(optionally aborts the file edit commit action iffn
returnsfalse
)File.afterFileEditCommit
File.beforeFileCustomAction
(optionally aborts the file custom action iffn
returnsfalse
)File.afterFileCustomAction
File.beforeFileWorkflowAction
(optionally aborts the file workflow action iffn
returnsfalse
)File.afterFileWorkflowAction
File.beforeFileAction
File.afterFileAction
FileEmail.recipients
(file action dialog "send file as email")fn
function the function (or callback) that will be executed if the exit
event
occursfn
will be called according to the function signature listed belowfileExitCallback(documentsContext, options)
Name Type Description documentsContext
DocumentsContext the
DocumentsContext
passed tofn
options
Object the options passed to
fn
Name Type Description fileTypeName
String the technical name of the file type
- Since:
- 5.0a
Example
documents.sdk.exitRegistry.registerFileExitCallback("crmAccount", "File.afterFileRender", function(documentsContext, options) { var fileContext = documentsContext.getFileContext(); console.log(options); });
-
registerFileFieldExitCallback(fileTypeName, fieldName, fn)
-
Registers a callback function that can be attached to a file field related exit event.
Name Type Description fileTypeName
String the technical name(s) of the file type(s), each separated by
,
or*
for any file type namefieldName
String the technical name(s) of the file field(s), each separated by
,
or*
for any file field namefn
function the function (or callback) that will be executed if the exit event occurs
fn
will be called according to the function signature listed belowfileFieldExitCallback(documentsContext, options)
Name Type Description documentsContext
DocumentsContext the
DocumentsContext
passed tofn
options
Object the options passed to
fn
Name Type Description fileTypeName
String the technical name of the file type
fileFieldId
String the id of the file field
fileFieldName
String the technical name of the file field
fileForm
FileFormModel the file form model
fileField
FileFieldModel the file field model
- Since:
- 5.0a
Example
documents.sdk.exitRegistry.registerFileFieldExitCallback("crmContact", "crmName", function(documentsContext, options) { var fileContext = documentsContext.getFileContext(); console.log(options); });
-
registerScriptParameterExitCallback(scriptName, event, fn)
-
Registers a callback function that can be attached to a script parameter related exit event.
Name Type Description scriptName
String the technical name(s) of the script(s), each separated by
,
or*
for any script nameevent
String the exit event name, i.e. one of the valid identifiers listed below
ScriptParameter.afterSetModelData
(e.g. for modifications of theScriptParameterFormModel
)ScriptParameter.beforeRender
ScriptParameter.afterRender
ScriptParameter.beforeExecuteScript
(optionally aborts the script action iffn
returnsfalse
)fn
function the function (or callback) that will be executed if the exit
event
occursfn
will be called according to the function signature listed belowscriptParameterExitCallback(documentsContext, options)
Name Type Description documentsContext
DocumentsContext the
DocumentsContext
passed tofn
options
Object the options passed to
fn
Name Type Description scriptName
String the technical name of the script
scriptForm
ScriptParameterFormModel the script form model
- Since:
- 5.0d
- See:
Example
documents.sdk.exitRegistry.registerScriptParameterExitCallback("customScript", "ScriptParameter.afterSetModelData", function(documentsContext, options) { console.log(options); });
-
registerScriptParameterFieldExitCallback(scriptName, fieldName, fn)
-
Registers a callback function that can be attached to a script parameter field related exit event.
Name Type Description scriptName
String the technical name(s) of the script(s), each separated by
,
or*
for any script namefieldName
String the technical name of the script parameter field
fn
function the function (or callback) that will be executed if the exit event occurs
fn
will be called according to the function signature listed belowscriptParameterFieldExitCallback(documentsContext, options)
Name Type Description documentsContext
DocumentsContext the
DocumentsContext
passed tofn
options
Object the options passed to
fn
Name Type Description scriptName
String the technical name of the script
scriptFieldId
String the id of the script field
scriptFieldName
String the technical name of the script field
scriptFieldValue
String the value of the script field
scriptForm
ScriptParameterFormModel the script form model
scriptField
ScriptFieldModel the script field model
- Since:
- 5.0d
- See:
Example
documents.sdk.exitRegistry.registerScriptParameterFieldExitCallback("customScript", "customScriptField", function(documentsContext, options) { console.log(options); });
-
registerSearchExitCallback(event, fn)
-
Registers a callback function that can be attached to a search related exit event.
Name Type Description event
String the exit event name, i.e. one of the valid identifiers listed below
ExtendedSearch.afterSetModelData
(e.g. for modifications of theExtendedSearchFormModel
)ExtendedSearch.beforeRenderSearchForm
ExtendedSearch.afterRenderSearchForm
ExtendedSearch.beforeRenderSearchSourceTree
ExtendedSearch.afterRenderSearchSourceTree
ExtendedSearch.beforeExecuteSearch
(optionally aborts the search action iffn
returnsfalse
)ExtendedSearch.afterExecuteSearch
ExtendedSearch.beforeClearSearchForm
ExtendedSearch.afterClearSearchForm
ExtendedSearch.beforeToggleSearchSource
ExtendedSearch.afterToggleSearchSource
ExtendedSearch.beforeToggleMainSearchSource
ExtendedSearch.afterToggleMainSearchSource
ExtendedSearch.beforeToggleSearchMask
ExtendedSearch.afterToggleSearchMask
ExtendedSearch.beforeToggleHitListMask
ExtendedSearch.afterToggleHitListMask
DefaultSearch.beforeExecuteSearch
(optionally aborts the search action iffn
returnsfalse
)DefaultSearch.afterExecuteSearch
fn
function the function (or callback) that will be executed if the exit
event
occursfn
will be called according to the function signature listed belowsearchExitCallback(documentsContext, options)
Name Type Description documentsContext
DocumentsContext the
DocumentsContext
passed tofn
options
Object the options passed to
fn
Name Type Description searchForm
ExtendedSearchFormModel optional the search form model
- Since:
- 5.0b
Example
documents.sdk.exitRegistry.registerSearchExitCallback("ExtendedSearch.afterRenderSearchForm", function(documentsContext, options) { var extSearchContext = documentsContext.getExtendedSearchContext(); console.log(options); });
-
registerSearchFieldExitCallback(fieldName, fn)
-
Registers a callback function that can be attached to a search field related exit event.
Name Type Description fieldName
String the technical name(s) of the search field(s), each separated by
,
or*
for any search field namefn
function the function (or callback) that will be executed if the exit event occurs
fn
will be called according to the function signature listed belowsearchFieldExitCallback(documentsContext, options)
Name Type Description documentsContext
DocumentsContext the
DocumentsContext
passed tofn
options
Object the options passed to
fn
Name Type Description searchFieldId
String the id of the search field
searchFieldName
String the technical name of the search field
searchFieldValue
String the value of the search field
searchForm
ExtendedSearchFormModel the search form model
searchField
SearchFieldModel the search field model
- Since:
- 5.0d
Example
documents.sdk.exitRegistry.registerSearchFieldExitCallback("crmName", function(documentsContext, options) { var extSearchContext = documentsContext.getExtendedSearchContext(); console.log(options); });