To configure an autocomplete field, there are three options that can be customized:
All these options can be defined using the Extended Field Information mapping.
Here is an example of a configuration map that activates the functionality for the "Potentials Name" and "RelatedTo" fields:
Potentials_FieldInfo
<map>
<originmodule>
<originname>Potentials</originname>
</originmodule>
<fields>
<field>
<fieldname>related_to</fieldname>
<features>
<feature>
<name>searchmodule</name>
<value>Contacts</value>
</feature>
<feature>
<name>searchfields</name>
<values>
<value>
<module>Accounts</module>
<value>accountname</value>
</value>
<value>
<module>Contacts</module>
<value>firstname,lastname</value>
</value>
</values>
</feature>
<feature>
<name>searchcondition</name>
<value>startswith</value>
</feature>
<feature>
<name>entityfield</name>
<values>
<value>
<module>Accounts</module>
<value>accountname</value>
</value>
<value>
<module>Contacts</module>
<value>firstname</value>
</value>
</values>
</feature>
<feature>
<name>showfields</name>
<values>
<value>
<module>Accounts</module>
<value>accountname,phone,email1</value>
</value>
<value>
<module>Contacts</module>
<value>firstname,email,mailingstreet</value>
</value>
</values>
</feature>
<feature>
<name>fillfields</name>
<values>
<value>
<module>Accounts</module>
<value>forecast_amount=annual_revenue</value>
</value>
<value>
<module>Contacts</module>
<value>leadsource=leadsource,assigned_user_id=assigned_user_id,closingdate=support_end_date</value>
</value>
</values>
</feature>
</features>
</field>
<field>
<fieldname>potentialname</fieldname>
<features>
<feature>
<name>searchmodule</name>
<value>Contacts</value>
</feature>
<feature>
<name>searchfields</name>
<value>firstname,lastname</value>
</feature>
<feature>
<name>searchcondition</name>
<value>startswith</value>
</feature>
<feature>
<name>entityfield</name>
<value>firstname</value>
</feature>
<feature>
<name>showfields</name>
<value>firstname,email,mailingstreet</value>
</feature>
<feature>
<name>fillfields</name>
<value>leadsource=leadsource,assigned_user_id=assigned_user_id,closingdate=support_end_date</value>
</feature>
</features>
</field>
</fields>
</map>
There are three types of fields that support autocomplete: relation or capture fields (uitype 10), uitype 1 text fields, and uitype 2 text fields. Please note that uitype 2 text fields can only be created through programming.
Each of these field types has a different extended information structure, as shown in the example above. The "potentialname" field uses a flat value directive since it only searches within one module. On the other hand, the "related_to" field has a more complex syntax because it allows searching across multiple related modules.
To ensure the correct functionality, please apply the appropriate XML structure based on your field type.
Luke from MajorLabel has made remarkable progress in implementing the autocomplete search functionality for product/service capture in the inventory modules. Not only did he add the functionality, but he also extended it to meet specific requirements for those lines and introduced additional features.
If you're interested, Luke has provided extensive documentation on this topic, which you can find here (PDF).
A big thanks to Luke for his contributions!
For MultiSelect Autocomplete Fields, the uitype is 1025, and the extended field information follows the same structure as a normal select autocomplete field.
This feature allows support for multiple selectable modules, but it's important to note that you can only choose records from one specific module at a time.
Here's an example of a test field definition for a uitype 1025 in the potentials module:
<field>
<fieldname>ui1025</fieldname>
<features>
<feature>
<name>searchmodule</name>
<value>Contacts</value>
</feature>
<feature>
<name>searchfields</name>
<values>
<value>
<module>Accounts</module>
<value>accountname</value>
</value>
<value>
<module>Contacts</module>
<value>firstname,lastname</value>
</value>
</values>
</feature>
<feature>
<name>searchcondition</name>
<value>startswith</value>
</feature>
<feature>
<name>entityfield</name>
<values>
<value>
<module>Accounts</module>
<value>accountname</value>
</value>
<value>
<module>Contacts</module>
<value>firstname</value>
</value>
</values>
</feature>
<feature>
<name>showfields</name>
<values>
<value>
<module>Accounts</module>
<value>accountname,phone,email1</value>
</value>
<value>
<module>Contacts</module>
<value>firstname,email,mailingstreet</value>
</value>
</values>
</feature>
<feature>
<name>fillfields</name>
<values>
<value>
<module>Accounts</module>
<value>forecast_amount=annual_revenue</value>
</value>
<value>
<module>Contacts</module>
<value>leadsource=leadsource,assigned_user_id=assigned_user_id,closingdate=support_end_date</value>
</value>
</values>
</feature>
<feature>
<name>multiselect</name>
<value>true</value>
</feature>
</features>
</field>
Please make sure to use the correct XML structure for your specific field type to ensure the proper functionality.