execute.query.form.search
ExecuteQueryFormSearchCommand : d2/sdk/commands/execute.query.form.search
SDK command that executes a query form based search. It extends the internal ExecuteQueryFormSearch implementation and exposes it as part of the public SDK so that consumers can trigger a query form search. Given a query form identifier and the corresponding form data, it prepares the search request, stores the form data in the next perspective session state and navigates to the search perspective where the matching results are rendered. This command is typically triggered when an end user submits a query form.
Extends: ExecuteQueryFormSearch
See: ExecuteQueryFormSearch
Example (to invoke the command programmatically)
define([
'csui/utils/commands'
], function(commands){
'use strict';
var command = commands.get('D2-ExecuteQueryFormSearch');
command.execute({
queryFormId: 'myQueryFormId',
formData: {'attr_name': 'value'},
parentId: 'optionalParentId'
});
});
Example (to create a new command instance and execute the query form search)
define([
'd2/sdk/commands/execute.query.form.search'
], function(ExecuteQueryFormSearchCommand){
'use strict';
var command = new ExecuteQueryFormSearchCommand();
command.execute({
queryFormId: 'myQueryFormId',
formData: {'attr_name': 'value'},
parentId: 'optionalParentId'
});
});
- ExecuteQueryFormSearchCommand :
d2/sdk/commands/execute.query.form.search- ~constructor(attr, options)
- ~execute(status) ⇒
jQuery.Promise
ExecuteQueryFormSearchCommand~constructor(attr, options)
Creates a new ExecuteQueryFormSearchCommand instance.
Kind: inner method of ExecuteQueryFormSearchCommand
| Param | Type | Description |
|---|---|---|
| attr | Object | Attributes used to initialize the command. |
| options | Object | Additional options passed to the base command. |
ExecuteQueryFormSearchCommand~execute(status) ⇒ jQuery.Promise
Executes the query form search by delegating to the base implementation. Prepares the supplied query form data, updates the perspective session state with the prepared data and navigates to the search perspective where the search results are rendered.
Kind: inner method of ExecuteQueryFormSearchCommand
Returns: jQuery.Promise - Returns a jQuery promise that resolves once navigation to the search perspective is triggered, or rejects when mandatory data is missing.
| Param | Type | Description |
|---|---|---|
| status | Object | Invocation data required to run the command. |
| status.queryFormId | String | Mandatory identifier of the query form to be executed. |
| status.formData | Object | Mandatory query form data used to build the search request. |
| [status.parentId] | String | Optional parent id which is identifier of parent category for query form configuration. |