Solution For Separate Filtering Of Account Billing and Shipping Address Fields (e.g. State)

We need to allow separate filtering on the Account Shipping Address Fields (e.g. State) and the Billing Address fields. We also would like this for the Contact address fields. Has anyone developed a solution for this? 

Details...

This started with a question about what the "State" filter in the Contacts module was filtering on. Based on the Studio / Contacts / Layouts / Search (see screenshot in Note) list, the State filter uses the address_state field, but there is not a field in Studio / Contacts / Fields called that. What is the "address_state" (and "address_country", "address_postalcode", ...) field?

I did a test of "State" filtering a Contact with Primary Address State "CA" and an Alternate Address State "WA", the Contact came back in results regardless of whether I searched "State" for "WA" or "CA"! The only thing I can think of is that "address_XXXX" are special fields that search across Primary and Alternate Address fields, but I couldn't find documentation of this in Contact module or elsewhere.


Parents
  • Hello Vince,

     

    When searching for State in the contacts module Sugar will query for both primary_address_state and alt_address_state fields in the DB.

    This means that it will retrieve the record if the state is present in either the Primary Address OR the Alternate Address.

    In Accounts mode the behavior is very similar, Sugar will search for occurrences in the fields billing_address_state and shipping_address_state.

     

    If you need more granularity, the easiest solution would be to create a Report, on the Reports module you can specify which State field you want to filter from both In Contacts and in Accounts

    If you want to add these specific fields in the List View filters, that needs to be done via code customization.

    You can have a look at the file ‘custom/modules/Accounts/clients/base/filters/default/default.php’ to understand how it works. This file is created from Studio when you save a new filter layout. Adding the options that you desire on that file will have the following result:

    I hope this helps. 

Reply Children
No Data