Namespace: exitRegistry

documents.sdk. exitRegistry

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

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

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

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

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

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

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 name

event String

the exit event name, i.e. one of the valid event identifiers listed below


File.afterSetModelData (e.g. for modifications of the FileFormModel)

File.beforeFileRender

File.afterFileRender

File.afterFileOpen

File.beforeFileEditStart (optionally aborts the file edit start action if fn returns false)

File.afterFileEditStart

File.beforeFileEditCancel (optionally aborts the file edit cancel action if fn returns false)

File.afterFileEditCancel

File.beforeFileEditCommit (optionally aborts the file edit commit action if fn returns false)

File.afterFileEditCommit

File.beforeFileCustomAction (optionally aborts the file custom action if fn returns false)

File.afterFileCustomAction

File.beforeFileWorkflowAction (optionally aborts the file workflow action if fn returns false)

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 occurs
fn will be called according to the function signature listed below

fileExitCallback(documentsContext, options)

Name Type Description
documentsContext DocumentsContext

the DocumentsContext passed to fn

options Object

the options passed to fn

Name Type Description
fileTypeName String

the technical name of the file type

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 name

fieldName String

the technical name(s) of the file field(s), each separated by , or * for any file field name

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 below

fileFieldExitCallback(documentsContext, options)

Name Type Description
documentsContext DocumentsContext

the DocumentsContext passed to fn

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

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 name

event String

the exit event name, i.e. one of the valid identifiers listed below


ScriptParameter.afterSetModelData (e.g. for modifications of the ScriptParameterFormModel)

ScriptParameter.beforeRender

ScriptParameter.afterRender

ScriptParameter.beforeExecuteScript (optionally aborts the script action if fn returns false)

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 below

scriptParameterExitCallback(documentsContext, options)

Name Type Description
documentsContext DocumentsContext

the DocumentsContext passed to fn

options Object

the options passed to fn

Name Type Description
scriptName String

the technical name of the script

scriptForm ScriptParameterFormModel

the script form model

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 name

fieldName 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 below

scriptParameterFieldExitCallback(documentsContext, options)

Name Type Description
documentsContext DocumentsContext

the DocumentsContext passed to fn

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

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 the ExtendedSearchFormModel)

ExtendedSearch.beforeRenderSearchForm

ExtendedSearch.afterRenderSearchForm

ExtendedSearch.beforeRenderSearchSourceTree

ExtendedSearch.afterRenderSearchSourceTree

ExtendedSearch.beforeExecuteSearch (optionally aborts the search action if fn returns false)

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 if fn returns false)

DefaultSearch.afterExecuteSearch

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 below

searchExitCallback(documentsContext, options)

Name Type Description
documentsContext DocumentsContext

the DocumentsContext passed to fn

options Object

the options passed to fn

Name Type Description
searchForm ExtendedSearchFormModel optional

the search form model

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 name

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 below

searchFieldExitCallback(documentsContext, options)

Name Type Description
documentsContext DocumentsContext

the DocumentsContext passed to fn

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

Example
documents.sdk.exitRegistry.registerSearchFieldExitCallback("crmName", function(documentsContext, options) {
	var extSearchContext = documentsContext.getExtendedSearchContext();
	console.log(options);
});