We have a table of Customers which would map to the accounts table, there are almost 19000 records in the Customer table. We have a number of fields we would like to retain that don’t map to anything or would become additional fields. Examples include customer_number a 6 digit varchar, and PRC a 3 digit code.
One larger issue is how we handle Addresses, Suite expects/stores them as street, city, state, postal… etc. We’re storing them as Bill/Ship to, and then line_2, line_3, line_4, line_5 we’ve found this is the easiest method for supporting PO-boxes and international addresses. While Bill/Ship to seems to consistently map to the street column, the line_2-_5 columns don’t really map to anything consistently. Ideally adding the address lines as custom columns on the account table would be the preferred solution. Our only concern is that having to add all this from the studio is beginning to look extremely time-consuming given that this is only the first of a handful of other data we’re hoping to import.
I’ve looked over some of the sugar and suite docs and the Most desirable method here is to leverage the install_custom_fields() function but it looks like suite is the only one that can call it. This article;
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_8.3/Data_Framework/Vardefs/Manually_Creating_Custom_Fields/
Shows just about everything required except where to put the file that contains the column array and how to execute it.
I’m not opposed to creating a module that adds these custom columns but I have a number of concerns regarding that; If a module is used to create a custom column does that column get added to the actual table it is to be part of? or does it get added to some “custom_cols_table” similar to a vardef that gets joined to the table it is to be part of? We’re trying to be index and performance conscious, the vardef pattern doesn’t seem to be very appealing in this case.
Can custom modules be installed automatically form the custom folder? If we have to migrate an instance or if we have to recover from disaster or instead of doing inplace updates we decide to leverage our version control and pull suite updates then push them out. Does someone manually have to install and a module or is there away to programmatically install them, (like the custom folder)?
We’re turned off by vardef and they don’t seem to have much love or be very efficient solutions according to the documentation.
For Reference This is what i’ve turned up so far.
https://support.sugarcrm.com/Documentation/Unsupported_Versions/Sugar_6.7/index.html
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_8.3/Data_Framework/Vardefs/Manually_Creating_Custom_Fields/
https://community.sugarcrm.com/thread/22478
https://docs.suitecrm.com/developer/module-installer/
https://docs.suitecrm.com/developer/vardefs/