Creating different types of Opportunities

Hi !
I am currently customizing a Suite-CRM instance, and I have encountered an issue creating Opportunities.
I need to have 4 different types of Opportunities, that would have different fields, and be linked to different products.
I cannot decide whether to customize the existing Opportunities module to show only the fields I need, or to create 4 different Opportunities modules.

So far I have developped my first option, and changed the code so that only the fields I need are displayed. However, I find it kind of odd that there are a lot of blank spaces and empty panels. I am also affraid that in some of the views I will not be able to hide the fields.
Also, there is one issue I didn’t find how to solve : I created ‘products’ that I want to be able to add to an Opportunity depending on the type of Opportunity. I created custom modules for these, and linked them to the Opportunities module so they appear in subpanels. I would want to be able to show/hide these panels depending on the Opportunity type.

So I am wondering if I could solve these issues using my second option (creating 4 custom types of opportunities), or if there is another solution for that.

If anyone has some answers for me.

Thanks !

@roxa
It’s question for analytics. There are lack information. If you have some basic fields for all types of 4 Opportunities you should use 1 module other way to use 4 modules. May be combination.
I don’t like show/hide way. There are may be some problems with development.

I have about 10 fields that are shared by all 4 types, and 10 to 20 that are specific to each type of Opportunities.
So far I have placed them in subpanels, and I just hide the subpanels containing the fields that shouldn’t appear.
The only way I was able to access these panels was by their display number (they have no ‘name’ or ‘id’). So any modification in the layout of the panels via studio would make the whole thing inoperative, because it wouldn’t hide the right panel.

So I agree that it is not the best way to do so, that’s why I am looking for a better way.

Hi,

The panels don’t have a name or id but they have some contents that you can find by label:

In our customizations we do things like

	function hidePanel(panel){
		$('[data-id="'+panel+'"]').closest('.panel-default').hide()
	}

Then, for example:

hidePanel('LBL_PANEL_ASSIGNMENT');

@roxa
I think that @blqt write good way in your situation. I don’t see any problems with Studio. You should load javascript file only.

Thank you, it seems to work.

I still have an issue when I try to do the opposite action (show the panels).
For example if I select one type that makes panel1 disapear, I want it to re-apear when I select an other type.

I tried to do the same thing :
$(’[data-id="’+panel+’"]’).closest(’.panel-default’).show()
But it doesn’t work.

It should work. That’s what we are doing:

	function showPanel(panel){
		$('[data-id="'+panel+'"]').closest('.panel-default').show()
	}

Ok you were right, I was just not using the adequate data-id.

Well that works for me, thanks a lot :smile: