Menu
Welcome, Guest
Username: Password: Remember me

TOPIC: Display subpanel based on field

Display subpanel based on field 3 years 2 weeks ago #37553

  • 1reason
  • 1reason's Avatar
  • Offline
  • Senior Member
  • Posts: 40
  • Thank you received: 6
  • Karma: 0
My insurance agency sells commercial and personal lines insurance (along with life and health), and some questions that are applicable to businesses, or not relevant to home/auto and vise/versa.

I tried making a "commercial Account" to mimic the "account" module, but then email and other things (like renewal calls) don't properly connect. So, I'm wondering if maybe all types of accounts should be under the "account" module and have the fields and sub panels based on what type of account it is.

Thanks in advance
Last Edit: 3 years 2 weeks ago by 1reason.
The administrator has disabled public write access.

Display subpanel based on field 3 years 2 weeks ago #37565

  • mikebeck
  • mikebeck's Avatar
  • Offline
  • SuiteCRM Is My Life
  • Posts: 1078
  • Thank you received: 207
  • Karma: 40
technically subpanels are relationships between modules, if you created a new module it wont have any subpanels because there are no relationships by default, you need to create them

best regards
Check your logs and permissions
The administrator has disabled public write access.
The following user(s) said Thank You: 1reason

Display subpanel based on field 3 years 1 week ago #37689

  • 1reason
  • 1reason's Avatar
  • Offline
  • Senior Member
  • Posts: 40
  • Thank you received: 6
  • Karma: 0
Thanks,

I guess what I'm looking for is to be able to set an account as either a household or a business. For example, a drop-down, or checkbox, and based on the result have or not have sub panels available.

ie If the drop down selected is "Business" instead of "home/auto", then maybe a worker's comp subpanel to enter in employee information. But if a "home/auto" selection is made, the workers comp sub panel doesn't show up and/or one for a "boat" is displayed to enter in information for that
Last Edit: 3 years 1 week ago by 1reason.
The administrator has disabled public write access.

Display subpanel based on field 3 years 1 week ago #37723

  • mikebeck
  • mikebeck's Avatar
  • Offline
  • SuiteCRM Is My Life
  • Posts: 1078
  • Thank you received: 207
  • Karma: 40
oh, ok I see, you can achieve this with javascript, to add a custom javascript in editview you need to modify the file suitecrm/custom/modules/{you_module}/metadata/editviewdefs.php and add the next code
'includes' =>
    array (
        0 =>
            array (
                'file' => 'custom/include/your_file.js',
            ),
        ),

in that file you can show, hide things with javascript, you just need to inspect the elements with your browser to know the ids, I haven't done it with subpanels but yes with panels in the detailview, let me know if you get stuck in something

best regards
Check your logs and permissions
The administrator has disabled public write access.

Display subpanel based on field 2 years 10 months ago #40414

  • maks4604590
  • maks4604590's Avatar
  • Offline
  • New Member
  • Posts: 5
  • Thank you received: 1
  • Karma: 0
Hello!
Plz help me!
I need to add javascript file for all pages?
The administrator has disabled public write access.

Display subpanel based on field 2 years 10 months ago #40415

  • maks4604590
  • maks4604590's Avatar
  • Offline
  • New Member
  • Posts: 5
  • Thank you received: 1
  • Karma: 0
maks4604590 wrote:
Hello!
Plz help me!
I need to add javascript file for all pages?

for all modules
The administrator has disabled public write access.

Display subpanel based on field 2 years 10 months ago #40416

  • maks4604590
  • maks4604590's Avatar
  • Offline
  • New Member
  • Posts: 5
  • Thank you received: 1
  • Karma: 0
maks4604590 wrote:
maks4604590 wrote:
Hello!
Plz help me!
I need to add javascript file for all pages?

for all modules

I found answer in suitecrm.com/community/suitecrm-7-0-disc...js-in-suitecrm#19438
The administrator has disabled public write access.
The following user(s) said Thank You: mikebeck
Time to create page: 0.051 seconds
Powered by Kunena Forum