How to search for custom fields in custom model?

Showing results for 
Search instead for 
Did you mean: 
Active Member

How to search for custom fields in custom model?

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
Senior Member
Active Member

Re: How to search for custom fields in custom model?

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">
<sort labelId="search.sort.relevance" isSortable="false"></sort>
<sort labelId="" 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="" 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>

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.