Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What does the entityfield directive in the autocomplete map do?
#1
If you had this in a FieldInfo map:
PHP Code:
<field>
            <
fieldname>contact_id</fieldname>
            <
features>
                <
feature>
                    <
name>searchmodule</name>
                    <
value>Contacts</value>
                </
feature>
                <
feature>
                    <
name>searchfields</name>
                    <
values>
                        <
value>
                            <
module>Contacts</module>
                            <
value>firstname,lastname</value>
                        </
value>
                    </
values>
                </
feature>
                <
feature>
                    <
name>searchcondition</name>
                    <
value>contains</value>
                </
feature>
                <
feature>
                    <
name>entityfield</name>
                    <
values>
                        <
value>
                            <
module>Contacts</module>
                            <
value>firstname</value>
                        </
value>
                    </
values>
                </
feature>
                <
feature>
                    <
name>showfields</name>
                    <
values>
                        <
value>
                            <
module>Contacts</module>
                            <
value>firstname,lastname</value>
                        </
value>
                    </
values>
                </
feature>
                <
feature>
                    <
name>fillfields</name>
                    <
values>
                        <
value>
                            <
module>Contacts</module>
                            <
value>leadsource=leadsource,assigned_user_id=assigned_user_id,closingdate=support_end_date</value>
                        </
value>
                    </
values>
                </
feature>
                <
feature>
                    <
name>mincharstosearch</name>
                    <
value>1</value>
                </
feature>
            </
features>
        </
field
What does the 'entityfield' directive do?
Reply
#2
This was an edge case we ran into with a client
He contacted us saying that he couldn't access the record detail view once he applied the map. After some typical ping-pong (I can't reproduce it) we discovered that he was hiding the "link" field, so there was no field to click on that would take him to the detail view. It seems odd, but these things happen when you create a highly configurable system. So we added this directive to the map so you could convert any of the fields that you want into the link field. That is what it should do
Joe
TSolucio
Reply
#3
So this does not pertain to autocomplete functionality?
Reply
#4
ah, sorry, that is for autocomplete. the idea is similar. As the documentation page indicates:

what information we should return: there will be one main entity identifier and possibly some additional fields to support the decision of what record to select

so you are indicating what is the main field we will show differentiated from the other secondary fields that support the decision.

https://corebos.com/documentation/doku.php?id=en:adminmanual:businessmappings:fieldinfo:autocomplete
Joe
TSolucio
Reply
#5
Yeah the docs page was actually what raised the question. So this is purely for the visual markup of the result?
Reply
#6
yes, correct: what to show on the first line (at least that is what I understand)
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)