Methods
-
getFileExitCallbacks(fileTypeName, event){Array.<function()>}
-
Returns all callback functions that are registered to a file related exit event.
Name Type Description fileTypeNameString the technical name of the file type
eventString 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 fileTypeNameString the technical name of the file type
fieldNameString 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 scriptNameString the name(s) of the script configered in the manager
eventString 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 scriptNameString the name(s) of the script configered in the manager
fieldNameString 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 eventString 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 fieldNameString 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 fileTypeNameString the technical name(s) of the file type(s), each separated by
,or*for any file type nameeventString the exit event name, i.e. one of the valid event identifiers listed below
File.afterSetModelData(e.g. for modifications of theFileFormModel)File.beforeFileRenderFile.afterFileRenderFile.afterFileOpenFile.beforeFileEditStart(optionally aborts the file edit start action iffnreturnsfalse)File.afterFileEditStartFile.beforeFileEditCancel(optionally aborts the file edit cancel action iffnreturnsfalse)File.afterFileEditCancelFile.beforeFileEditCommit(optionally aborts the file edit commit action iffnreturnsfalse)File.afterFileEditCommitFile.beforeFileCustomAction(optionally aborts the file custom action iffnreturnsfalse)File.afterFileCustomActionFile.beforeFileWorkflowAction(optionally aborts the file workflow action iffnreturnsfalse)File.afterFileWorkflowActionFile.beforeFileActionFile.afterFileActionFileEmail.recipients(file action dialog "send file as email")fnfunction the function (or callback) that will be executed if the exit
eventoccursfnwill be called according to the function signature listed belowfileExitCallback(documentsContext, options)
Name Type Description documentsContextDocumentsContext the
DocumentsContextpassed tofnoptionsObject the options passed to
fnName Type Description fileTypeNameString 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 fileTypeNameString the technical name(s) of the file type(s), each separated by
,or*for any file type namefieldNameString the technical name(s) of the file field(s), each separated by
,or*for any file field namefnfunction the function (or callback) that will be executed if the exit event occurs
fnwill be called according to the function signature listed belowfileFieldExitCallback(documentsContext, options)
Name Type Description documentsContextDocumentsContext the
DocumentsContextpassed tofnoptionsObject the options passed to
fnName Type Description fileTypeNameString the technical name of the file type
fileFieldIdString the id of the file field
fileFieldNameString the technical name of the file field
fileFormFileFormModel the file form model
fileFieldFileFieldModel 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 scriptNameString the technical name(s) of the script(s), each separated by
,or*for any script nameeventString the exit event name, i.e. one of the valid identifiers listed below
ScriptParameter.afterSetModelData(e.g. for modifications of theScriptParameterFormModel)ScriptParameter.beforeRenderScriptParameter.afterRenderScriptParameter.beforeExecuteScript(optionally aborts the script action iffnreturnsfalse)fnfunction the function (or callback) that will be executed if the exit
eventoccursfnwill be called according to the function signature listed belowscriptParameterExitCallback(documentsContext, options)
Name Type Description documentsContextDocumentsContext the
DocumentsContextpassed tofnoptionsObject the options passed to
fnName Type Description scriptNameString the technical name of the script
scriptFormScriptParameterFormModel 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 scriptNameString the technical name(s) of the script(s), each separated by
,or*for any script namefieldNameString the technical name of the script parameter field
fnfunction the function (or callback) that will be executed if the exit event occurs
fnwill be called according to the function signature listed belowscriptParameterFieldExitCallback(documentsContext, options)
Name Type Description documentsContextDocumentsContext the
DocumentsContextpassed tofnoptionsObject the options passed to
fnName Type Description scriptNameString the technical name of the script
scriptFieldIdString the id of the script field
scriptFieldNameString the technical name of the script field
scriptFieldValueString the value of the script field
scriptFormScriptParameterFormModel the script form model
scriptFieldScriptFieldModel 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 eventString the exit event name, i.e. one of the valid identifiers listed below
ExtendedSearch.afterSetModelData(e.g. for modifications of theExtendedSearchFormModel)ExtendedSearch.beforeRenderSearchFormExtendedSearch.afterRenderSearchFormExtendedSearch.beforeRenderSearchSourceTreeExtendedSearch.afterRenderSearchSourceTreeExtendedSearch.beforeExecuteSearch(optionally aborts the search action iffnreturnsfalse)ExtendedSearch.afterExecuteSearchExtendedSearch.beforeClearSearchFormExtendedSearch.afterClearSearchFormExtendedSearch.beforeToggleSearchSourceExtendedSearch.afterToggleSearchSourceExtendedSearch.beforeToggleMainSearchSourceExtendedSearch.afterToggleMainSearchSourceExtendedSearch.beforeToggleSearchMaskExtendedSearch.afterToggleSearchMaskExtendedSearch.beforeToggleHitListMaskExtendedSearch.afterToggleHitListMaskDefaultSearch.beforeExecuteSearch(optionally aborts the search action iffnreturnsfalse)DefaultSearch.afterExecuteSearchfnfunction the function (or callback) that will be executed if the exit
eventoccursfnwill be called according to the function signature listed belowsearchExitCallback(documentsContext, options)
Name Type Description documentsContextDocumentsContext the
DocumentsContextpassed tofnoptionsObject the options passed to
fnName Type Description searchFormExtendedSearchFormModel 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 fieldNameString the technical name(s) of the search field(s), each separated by
,or*for any search field namefnfunction the function (or callback) that will be executed if the exit event occurs
fnwill be called according to the function signature listed belowsearchFieldExitCallback(documentsContext, options)
Name Type Description documentsContextDocumentsContext the
DocumentsContextpassed tofnoptionsObject the options passed to
fnName Type Description searchFieldIdString the id of the search field
searchFieldNameString the technical name of the search field
searchFieldValueString the value of the search field
searchFormExtendedSearchFormModel the search form model
searchFieldSearchFieldModel the search field model
- Since:
- 5.0d
Example
documents.sdk.exitRegistry.registerSearchFieldExitCallback("crmName", function(documentsContext, options) { var extSearchContext = documentsContext.getExtendedSearchContext(); console.log(options); });