Modify Global Search Result

Is that possible to modify fields in Global Search Result?

Below is the screenshot for my global search, but here I want to add toher data in the rights side of result panel.

 Any Idea or Academy link for this ?

 

Thank you.

 

Like 0

Like

8 comments

Dear Riddhi Jadeja,

There are no basic tools to modify the global search results in the application. However, you can edit a schema that is responsible for the displaying the found data taken from a particular object according to your needs. You can modify the diff part of the code in the inherited from the object schema located in a Custom package. For accounts it is AccountSearchRowSchema and for contacts - ContactSearchRowSchema.

Best regards,

Dean

Dean Parrett,

Thanks a lot Dean. I will try that.

I stumbled across this post because I also want to modify my search results.

 

How exactly do I do this?

I found the "AccountSearchRowSchema" in my "all packages" list and can display its contents. Modification is impossible.

Clicking to the "Custom" section and adding a module gives me a selection of a lot of possibilities .... which one do i have to select? And why? The explanation in the manual is not very helpful for me.

 

Thanks for your help.

 

Hello!

 

You should use "Replacing view model". 
Let me provide you with an example based on the Account section. 
 
Here is a screenshot of the base result that the Global Search returns when searching for an account: 


Let's say we want to add the "Also known as" column to the search result (the one from the screenshot below) and remove the "City" column: 
 
To achieve this: 
 
1) Create the "Replacing view model" in configurations with "AccountSearchRowSchema" code, "AccountSearchRowSchema" name and select "AccountSearchRowSchema (AccountSearchRowSchema)" as a parent: 
 
2) Specify the following code in this schema: 
 

 define("AccountSearchRowSchema", [], function() {
	return {
		diff: /**SCHEMA_DIFF*/[{
				"operation": "remove",
				"name": "City"
			},
			{
				"operation": "insert",
				"parentName": "DataContainer",
				"propertyName": "items",
				"name": "AlternativeName",
				"values": {
					"layout": {
						"column": 18,
						"row": 1,
						"colSpan": 6
					}
				}
			}
		]/**SCHEMA_DIFF*/
	};
});

and save the schema. 
 
4) Refresh the page and check the result. The "Also known as" column should appear and the "City" column disappear in the Global Search returns when searching an account: 

You can learn about replacing view model schema in this article on the Creatio Academy

Also, maybe this post can be useful for you:

https://community.creatio.com/questions/how-update-global-search-result…

 

Best regards,

Kate

Thank you very much for the detailed explanation. It's working!

Kate Karpik,

 

Thank you for this information. Unfortunately, it is not working for me. I am trying to add the BirthDate field from Contacts.

I created a replacing view model and set 'ContactSearchRowSchema' as the parent object.

 

 

Job is removed, but BirthDate is not displaying. Any ideas why this is not working?

Thank you.

Dear Arie Knoester,

 

It is absolutely expected behavior for the "GlobalSearchResult" page.
By default, ElasticSearch (the Global Search Service integrates ElasticSearch with Creatio) will index only sections regardless of their author, as well as string and lookup columns.
More information here:
https://academy.creatio.com/docs/user/on_site_deployment/containerized_…
The "BirthDate" column is a date type, so you don't see this column on the "GlobalSearchResult" page.

 

Best regards,

Kate

Kate Karpik,

 

Thank you very much for the information! I think we will work around this by using a custom text field for Contact birth dates. 

Show all comments