Show Drop Down list of Products on related module

Hi - I’m suing suiteCRM 7.11.15

I’ve created a ‘basic’ custom module called Applications. Everything else has been done using Studio.

The Applications module has a one to many relationship with Contacts (a single contact can have many applications).

I then added a one to many relationship between Products and Applications (one product can be associated with multiple Applications).

I then added the ‘products’ field into the Details and Edit layouts of Applications.

The idea being that when an Application is being created, the user can choose a Product from a dropdown list on the Application.

I’ve tried Dynamic Dropdowns and all of the ‘product’-related options, but none of them show the actual product names that I added when I created the products.

Is it possible to do this dynamically? So that when a new Product is added in a particular Product Category, that I can show the new product in a dropdown inside of Applications?


As an example you can look at how the field “assigned_user_id” work.

  • find the field “assigned_user_id” into the file modules/Accounts/metadata/searchdefs.php
  • find the function “get_user_array” into the file

@p.konetskiy Thanks for the reply and tip. So it looks like this needs to be done at the code-level then?

Yes. It’s not very difficult. But you should understand that the number of records in the module should be limited, otherwise it will be inconvenient for the user.

Thanks. I’m comfortable (enough) in the code, but just trying to make sure modifications are update-safe. In order to do so, would you recommend a creating a copy of the appropriate module files in the ‘custom’ folder?

No, it will not work.
You should

  • add to array “function” the value (example):
'include' => 'custom/modules/<module_name>/<file_name>.php'
  • change type filed to “enum”