We are able to update the global search result for a few of the OOTB object schemas by replacing the corresponding module such as AccountSearchRowSchema and for contacts - ContactSearchRowSchema.
b)I couldn't find any schema as BankCardSearchRowSchema for the OOTB object
BankCard. How to get this XSearchrowSchema generated?
No details on BankCardSchema
Please note the indexing for the object BankCard is enabled and the results are retrieved but wanted to update the result for this object. Unable to find
You can track if the global search results for the section uses its own SearchRowSchema or the BaseSearchRowSchema using the query below (MS SQL):
SELECT
sme.Id, sme.ActionKindName, ss.[Name], ss.[UId]
FROM
SysModuleEdit sme
JOIN
SysSchema ss
ON
sme.SearchRowSchemaUId= ss.UId
WHERE
sme.SearchRowSchemaUId IS NOT NULL
But you can create a custom SearchRowSchema module for some section that doesn't have its own SearchRowSchema. The example below is for Documents section that also doesn't have its own SearchRowSchema module.
Here is the screenshot of the base result that the Global Search returns when searching a document:
Let's say we want to add the "Status" column to the search result (the one from the screenshot below):
To achieve this:
1) Create the "Page view model" in configurations with "UsrDocumentSearchRowSchema" code, "Document search row" name and select BaseSearchRowSchema as a parent:
3) Find the SysModuleEdit record related to the Documents section (for example using the query below):
SELECT
*
FROM
SysModuleEdit
WHERE
ActionKindName ='Document'
and then update the value for the "SearchRowSchemaUId" column in this record:
UPDATE
SysModuleEdit
SET
SearchRowSchemaUId ='63388eba-74f2-4bc4-85f2-e6c326adb3e5'
WHERE
Id
IN
(
SELECT
Id
FROM
SysModuleEdit
WHERE
ActionKindName ='Document')
4) Refresh the page and check the result. The "Status" column should appear in the SearchRowSchema for documents:
Same operation can be performed to any section needed.
You can track if the global search results for the section uses its own SearchRowSchema or the BaseSearchRowSchema using the query below (MS SQL):
SELECT
sme.Id, sme.ActionKindName, ss.[Name], ss.[UId]
FROM
SysModuleEdit sme
JOIN
SysSchema ss
ON
sme.SearchRowSchemaUId= ss.UId
WHERE
sme.SearchRowSchemaUId IS NOT NULL
But you can create a custom SearchRowSchema module for some section that doesn't have its own SearchRowSchema. The example below is for Documents section that also doesn't have its own SearchRowSchema module.
Here is the screenshot of the base result that the Global Search returns when searching a document:
Let's say we want to add the "Status" column to the search result (the one from the screenshot below):
To achieve this:
1) Create the "Page view model" in configurations with "UsrDocumentSearchRowSchema" code, "Document search row" name and select BaseSearchRowSchema as a parent:
3) Find the SysModuleEdit record related to the Documents section (for example using the query below):
SELECT
*
FROM
SysModuleEdit
WHERE
ActionKindName ='Document'
and then update the value for the "SearchRowSchemaUId" column in this record:
UPDATE
SysModuleEdit
SET
SearchRowSchemaUId ='63388eba-74f2-4bc4-85f2-e6c326adb3e5'
WHERE
Id
IN
(
SELECT
Id
FROM
SysModuleEdit
WHERE
ActionKindName ='Document')
4) Refresh the page and check the result. The "Status" column should appear in the SearchRowSchema for documents:
Same operation can be performed to any section needed.
I am sorry, but I don't need the BaseSearchRowSchema from your app (I do also have access to the BaseSearchRowSchema module from the bank bundle app), I need your custom SearchRowSchema code for the BankCard schema.
Please read my post with the instruction carefully. I've asked to create a replacing view module using the BaseSearchRowSchema as a parent and then connect it to the SysModuleEdit record of your section using the SearchRowSchemaUId column (and provided an example with the Documents section that also don't have its own SearchRowSchema).
I have followed the same steps as suggested and there needs a little update.
Step 1: Find the target object for GS result update (Here, it is BankCard)
Step 2: Create the "Page view model" in configurations with "CTZBanCardSearchRowSchema" code, "BankCard search row" name and select BaseSearchRowSchema as a parent
Step 3: Update the design of the schema and save.
Step 4: Find the SysModuleEdit record related to the BankCard section (for example using the query below):
SELECT
*
FROM
SysModuleEdit
WHERE
ActionKindName ='BankCard'
Step 5: update the value for the "SearchRowSchemaUId" column in the target objects record.
UPDATE
SysModuleEdit
SET
SearchRowSchemaUId ='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
WHERE
Id
IN
(
SELECT
Id
FROM
SysModuleEdit
WHERE
ActionKindName ='BankCard')
**Note: This Column's "SearchRowSchemaUId" value should be the UID of the newly created Page view model performed in Step 2.
UID can be obtained by using the below query,
select Id, UId, Name from SysSchema
where
Name like ('%CTZBanCardSearchRowSchema%')
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.
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.
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:
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.
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.