Menu
SuiteCRM dedicated support by SalesAgility
Welcome, Guest
Username: Password: Remember me

TOPIC: Auto-fill a relate field

Auto-fill a relate field 1 week 10 hours ago #75154

  • idale2141
  • idale2141's Avatar
  • Offline
  • Junior Member
  • Posts: 20
  • Thank you received: 1
  • Karma: 0
Hello guys. I have 2 related fields and I need to auto fill the second field after the 1st field have been changed. I am using v7.10.

Do you guys have any idea how to do this?
The administrator has disabled public write access.

Auto-fill a relate field 1 week 7 hours ago #75162

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 8555
  • Thank you received: 1307
  • Karma: 311
A couple of questions:

- exactly in which module, which view, which part of the view (subpanel?) do you need this?

- do you need the results refreshed on screen, immediately, or is it ok to just update the database? (in this second case, you could just use a Workflow or an after_save logic hook).

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

Auto-fill a relate field 6 days 15 hours ago #75214

  • idale2141
  • idale2141's Avatar
  • Offline
  • Junior Member
  • Posts: 20
  • Thank you received: 1
  • Karma: 0
Thank you for your reply.

exactly in which module - This is a custom module
which view - editView
which part of the view - form -> fields

This is the case, I have 2 relate fields in my form. In my 1st relate field (customer), after I select a customer, I need to auto fill up the 2nd relate field ( city ). The problem is that, in editviewdefs.php , I added displayParams array under the relate field customer but the only thing I can get from that array is the ID of the CITY, i needed the name so that I can fill it up in the city field.

Please let me know if you have any more questions. Thank you PGR.
Attachments:
Last Edit: 6 days 15 hours ago by idale2141.
The administrator has disabled public write access.

Auto-fill a relate field 6 days 4 hours ago #75237

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 8555
  • Thank you received: 1307
  • Karma: 311
You should be able to just use the correct field name in the editviewdefs.

Let's see how your relationship is set up. If you did it from Studio, you should have files defining it in

custom/metadata

custom/Extension/modules/<right-side-module>/Vardefs

custom/Extension/modules/<left-side-module>/Vardefs

Also, make sure this is a one-to-many relationship, otherwise it won't work.

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.
Time to create page: 0.073 seconds
Powered by Kunena Forum