From Bright Pattern Documentation
onSearchRecords
Communicator Widget sends this event when an interaction's scenario has a screen pop block with the "SHOW_QUERY_RESULTS" option.
Request
Syntax
| on('ON_SEARCH_RECORDS', handler: OnSearchRecords): void
|
Parameters
| Parameter | Parameter Values | Data Type | Optional/Required | Description |
| searchText | string | Required | Text to search across CRM records | |
| interactionId | string | Optional | ID of the interaction which is associated with the action | |
| inNewTab | boolean | Optional | Specifies the intention to display search result in a new tab |
Example Request
adApi.on("ON_SEARCH_RECORDS", function (searchText, interactionId, inNewTab) {
if (inNewTab) {
searchCrmRecordsInNewWindow(searchText);
} else {
searchCrmRecords(searchText);
}
});
Return Value
(None)