How to sort fields of different accounts type

Hey there,

Background story :
I have Client Account and Supplier/provider Account.

Example : My Client Account will order thing on my Provider Account, my provider send me a csv/xls file every month with who ordered and how much. I will have to import this every month.

For now I have Renamed Account’s module to Client, and created a module named “Provider” (with a relationship “orders” between those 2). But I dont think this is the best way…

The main question of my problem is :

My provider and client dont have the same fields.

Solution 1 : Do I have to make 2 separate modules ?
Solution 2 : Do I have to use only Account module with a “type” field to separate ? How can I hide/show fields depending on the type of account it is ?

Maybe there is more solution, I’m using Suitecrm for just a month now, so Im just building the database for now.

I’ve saw this topic :
https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/9657-dealing-with-different-types-of-accounts

The guy have almost the same problem, but its a 2 year’s age topic so I’ve created a new one.

Thanks in advance !

No one is in this situation too ?

Found this :

http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_8.0/Architecture/Sugar_Logic/Dependency_Actions/SetPanelVisibility/

To hide a specific pannel after choosing a type of Account

As I understood your query you want to display the relevant fields data for different users to whom you want to assign different roles. You can use a plugin “SuiteCRM Field Level Access Control”. By using this plugin you can keep your data discreet by hiding certain fields for specific users and also enables you to manage the access rights for groups that contain multiple users under specific roles. The end users can be more focused and productive by avoiding the access to the fields that are irrelevant to them.

Hey,

Thanks for your answer.

I want to display field / pannel by Account type.

My customer and my provider dont have the same field, so I only want to display the field of the account type. For all user, there no need to hide field for a certain type of user.

Hope someone can help !

If you don’t want to use the plugin recommended above, you will have to code this solution in PHP. It involves injecting some Javascript into the view.

Hey @pgr, thanks for your reply.

I think I dont explained myself well.

I dont want to restrict things to my SuiteCRM user’s (with roles etc.)

I want to display fields depending on Account (company) type. My customer (account type) and provider (account type) dont have the same required fields

I want to know wich is the best in term of performance and workflow between 2 solutions :

Solution 1 : Do I have to make 2 separate modules -> 1 module “Customer” and 1 module “Provider”
Solution 2 : Do I have to use only Account module with a “type” field to separate ? How can I hide/show fields depending on the type of account it is ?

If I choose Solution 2, the only plugin I found on the store was this one :
https://store.suitecrm.com/addons/dynamic-panels

It is exacttly what I want but its too expensive, so I will do it myself.

Using the Security settings for this purpose is a possibility, since it is the standard mechanism for hiding / showing based on some difference. So, even if you’re not coming here asking for a security solution, you can consider if it could work for you.

About your alternative, both things are possible. I normally try to use standard modules, and adapt them as needed, instead of creating new custom modules. This makes a ton of functionality available to me, which is tied to existing modules. So I would probably try to keep it down to one module, and just show/hide the specific fields.

My advice about Javascript injection was already directed at the thought that you could be programming this yourself.

Hey @pgr,

Thanks again for your support.

I will so, go for 1 module and show/hide some fields depending on what type it is.

Thanks again,

Have a good monday