function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
HomeCareHomeCare 

Customer Portal - Data Model Design Doubt

In our org, we have enabled the customer portal. This portal is mainly for the distributors who will maintain their invoices and daily stocks. I initially created objects for distributor, invoice, daily stock and defined the relationships between them. Is it correct to create a distributor object or should a contact be  treated as a distributor by adding a record type. Pls help...

Daniel.ReidDaniel.Reid

Hello,

 

Either of those choices can work well.  Much depends on the complexity and size of what you are trying to model.  Generally I begin by asking as many questions about the model and possible implementations as I can think of.  In this case some good questions may be,

  • If you simply treat Distributors as a type of Contact, how many additional fields would you need to add to Contact?
  • Will other users need to be maintained as Contacts, or is that exclusive to Distributors?
  • If a Contact is a Distributor, is special handling required?
  • If a Contact can be something other than a Distributor, how do you identify the difference?
  • Contact objects store name, address, phone number, etc.  Would you ever expect a single Distributor to have multiple persons as Contacts? (i.e. A sales-director, shipping manager, accounts officer)

In general, I would advise against letting an object perform "double duty", as this leads to some difficulty in maintenance down the road.  So, I recommend sticking with having a separate Distributor object with one or more Lookup fields to Contacts.  Especially if the development team ever changes, or you need to add additiona features that were never planned for.

 

I hope this helps you alleviate doubts about your design choice.  Post back if you want to talk about it more, I'm more than happy to help you work it out.

 

Daniel Reid
Contact us - We can help!

Salesforce Superheroes
------------------------------
help@salesforcesuperheroes.com
www.salesforcesuperheroes.com
1-888-407-9578 x102