how to display contacts in drop down list on cases after selecting an account in sugarcrm

I want to display a dropdown list of contacts on cases after selecting an accounts. Where I can do this in costome code and how.

Hi Qazi,

You have to do following steps for coding.

  1. Bind on change event of account name text box. On that event you can display contact dropdown.
    you can code into view.edit.php file of Case module. Location should be - custom/modules/Cases/views/view.edit.php

  2. You have to modify javascript which fill account name value when you select account name from popup.
    Have a look at -

  3. You have to create a custom action under any module ( preferably case or contact or account module) which will return contacts. You might
    want contacts of selected account.

you can just put a file into the custom directory of module and call it directly.

For example: I have the file test.php in custom/modules/Accounts

I can call the file directly at


Thanks and Regards,
Alpesh Savaliya

1 Like

Hi Alpesh,

What type of chenges we will implement in view.edit.php and popup_helper.js file of case module.

Thanks and Regards