cancel
Showing results for 
Search instead for 
Did you mean: 

How to search for custom fields in custom model?

hussain
Champ on-the-rise
Champ on-the-rise

I've got community version 6.1.2 running on a CentOS7 server.

I created a custom model (named: correspondence) and added an aspect (outboundletter) with two fields (letterreference, lettersubject). Then I added a layout for the aspect.

Now I can select an upload PDF, assign it the aspect and clicking on "Edit Properties" allows me to view & edit the letter reference number and subject.

How do I search for items by reference number or subject?

2 REPLIES 2

hussain
Champ on-the-rise
Champ on-the-rise

Hi Jose

As per the link you shared, I copied /root/alfresco-content-services-community-distribution-6.1.2-ga/web-server/shared/classes/alfresco/web-extension/share-config-custom.xml to my Tomcat installation folder: /usr/share/tomcat/shared/classes/alfresco/web-extension/

This file didn't have a section for <config evaluator="string-compare" condition="Search" replace="true"> so I added it:

<config evaluator="string-compare" condition="Search" replace="true">
<search>
<min-search-term-length>1</min-search-term-length>
<max-search-results>250</max-search-results>
<max-users-search-results>20</max-users-search-results>
<repository-search>always-options</repository-search>
<display-facets>true</display-facets>
</search>
<sorting>
<sort labelId="search.sort.relevance" isSortable="false"></sort>
<sort labelId="label.name" isSortable="true">cm:name</sort>
<sort labelId="label.title" isSortable="true">cm:title</sort>
<sort labelId="label.description" isSortable="false">cm:description</sort>
<sort labelId="label.author" isSortable="false">cm:author</sort>
<sort labelId="label.modifier" isSortable="true">cm:modifier</sort>
<sort labelId="label.modified" isSortable="true">cm:modified|false</sort>
<sort labelId="label.creator" isSortable="true">cm:creator</sort>
<sort labelId="label.created" isSortable="true">cm:created|false</sort>
<sort labelId="search.sort.size" isSortable="true">.size|true</sort>
<sort labelId="search.sort.mimetype" isSortable="true">.mimetype</sort>
<sort labelId="search.sort.type" isSortable="true">TYPE</sort>
<sort label="Outbound Letter No." isSortable="true">correspondence:letternumber</sort>
</sorting>
</config>

The last is my custom field in the custom aspect.

After restarting Tomcat, there is no change in the "Advanced Search" screen; this field is not shown.