Inconsistency between searching in Popup and autocomplete in-field for Reference fields
Take any standard reference field, e.g. account_id in Contacts.
Open a Popup and perform a search and the "src_fieldname", e.g. account_id is sent in the POST request.
Close the popup and clear the Reference field and then use the type-ahead feature of the in-field search. The src_fieldname is not sent via the GET request.
With customised systems it is often useful to be able to have custom filters on searches based on the src_field, especially when you have more than one UIType 10 reference to the same target module in your source module (Example we have two links to Vendors in one module. Each field should only link to vendors of a certain type). This is easily manageable from the Popup, but as it stands now this cannot be done using the in-field search. There are two main issues:
- In layouts/v7/modules/Vtiger/resources/Vtiger.js in the function getReferenceSearchParams() the fieldname is not captured and added to the params object.
- In modules/Vtiger/actions/BasicAjax.php and in the subsequent Module Model searchRecord() the src_field is not captured and passed to the various query search generator functions in Module and/or Record Models.
I can see why this is the case but it is inconsistent for the user when changing between the two search actions.