Show both "name" and "customer_number_c" in the SQS for Accounts

I have changed our Accounts default filters to allow the users to enter a Name or Customer Number when linking an Account to other records in our SugarCRM via Relate Field (be it an actual relate field or one defined by a 1:M relationship).

When they search using the SQS they would like the SQS dropdown to display both Name AND Customer Number.

For example, when entering customer number 123 in the relate field's SQS it will pull up accounts with customer number 123 but also 1234 and the dropdown will display only the account names, and not the customer number.

Ideally they want to see both "Name CustomerNumber" or "Name (CustomerNumber)"... you get the idea.

Thanks,
Francesca

Parents
  • ,

    I tried to imitate the "full_name" field that we have in Contacts and Leads to build a non-db field that would allow me to use a concatenation of Account Name and Customer Number (custom field) in the rname for the Account relate fields.

    I looked at using db_concat_fields in the vardefs to combine the two fields, but the way the query is composed it looks like it does not allow for custom fields to be used in that variable, the resulting query is trying to add it as a field in the accounts table instead of the accounts_cstm table.

    Vardefs tend to be very flexible in sugar, so I find this rather unusual, do you know if this limitation is by design?

    Is there a better way to achieve what I need?

    Thanks,
    Francesca

Reply
  • ,

    I tried to imitate the "full_name" field that we have in Contacts and Leads to build a non-db field that would allow me to use a concatenation of Account Name and Customer Number (custom field) in the rname for the Account relate fields.

    I looked at using db_concat_fields in the vardefs to combine the two fields, but the way the query is composed it looks like it does not allow for custom fields to be used in that variable, the resulting query is trying to add it as a field in the accounts table instead of the accounts_cstm table.

    Vardefs tend to be very flexible in sugar, so I find this rather unusual, do you know if this limitation is by design?

    Is there a better way to achieve what I need?

    Thanks,
    Francesca

Children
No Data