AnsweredAssumed Answered

Custom module questions - probably basic

Question asked by Bob Bundy on Jun 19, 2020
Latest reply on Jun 26, 2020 by Bob Bundy

Hello -

I'm creating (trying to) a custom module in Sugar (v10...almost empty system - we're configuring it before importing data).

I've created custom modules before but this one is causing me issues. There is also one issue in this one that I have run up against before and ignored but would like to know if it's something I can address.


Target: We're a software company and want to know which of our products our customers have and when they bought them.  Our products are in the Product Catalog and our customers are in Accounts.


Attempt #1:  Built a relationship (M-to-M) between Accounts and the Product Catalog. That allowed me to assign products to an account. In the Account's Product Catalog subpanel, I could see which products the customer had.  In the Product Catalog's Account subpanel, I could see which customers had the products.  A NEARLY perfect fit.  But there is no way to identify a date field of when they bought the product (or a status or anything else related to the relationship).  Removed the relationship and tried something else.


Attempt #2: Created a custom module - Customer Products (CP). It has standard Sugar fields and added a Relate field to the product catalog, a status field, a date-purchased field.  Created a Many-to-Many relationship from Accounts to CP. 

Problem A - The custom module has a "Name" field by default. I don't care about the Name field so I have Sugar insert a default value. When I insert the second product for an account, Sugar throws up a "Possible Duplicate" warning on the Name field. It lets me go by and add the record anyway - but the warning will be ANNOYING to any real user.  And it's on a field (Name) I don't care about.  This is the issue I've run into with other custom modules - where the Name field means nothing to the data that's being captured but it's a default and I don't see any way to get around it.

Problem B - The other issue is that when I go into the CP module, since there is no relationship between Accounts/Product Catalog, I can't select a product and see all the related customers.


I figure there are lots of people who have tried to build similar modules - or relate existing modules and need to include additional information with the relationship.  I appreciate any assistance, thoughts, or ideas.