Question

Get the value being searched in lookup object

Hi Community,

Any idea how can i get the value being searched in lookup object (please see image below). What I want to achieve is when the user will search the specific contact then if not found in crm, i will search that value on third party database using webservice. But my problem is how can i retrieve in, lets say CasePage this value being searched by user.

 

 

Like 0

Like

1 comments

Hi Fulgen, 



Theoretically, this is possible. However, such development case is kind of ambitious.



This modal window is a separate schema called "LookupPage". Logic that is responsible for searching is located in "LookupPageViewModelGenerator" schema. 



Text of the search query is stored in "searchData" attribute. Search button`s click is bind to "onSearchButtonClick" method. 



You may face with difficulties while overriding Ext classes. Here is an example:

 

It is not required to copy the entire code. You should specify only those methods that you want to be replaced, and the remaining methods will remain from the base class. Thus, we avoid cases when the module breaks down after updating.

 

Example override class SummaryModule

define("UsrSummaryModuleV2", ["SummaryModuleV2"],

function() {

Ext.define("Terrasoft.SummaryModuleOverrided", {

override: "Terrasoft.SummaryModule",

/*

* @override

*/

getESQ: function() {

var esq = this.callParent(arguments);

esq.queryKind = Terrasoft.QueryKind.LIMITED;

return esq;

}});});





When you need to override, simply load the module (for example in BaseSectionV2)

define("BaseSectionV2", ["UsrSummaryModuleV2"], function() {

return {

methods: {},

details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,

diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/

};});

Show all comments