CoreBOSBB

Full Version: What does the entityfield directive in the autocomplete map do?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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
So this does not pertain to autocomplete functionality?
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
Yeah the docs page was actually what raised the question. So this is purely for the visual markup of the result?
yes, correct: what to show on the first line (at least that is what I understand)