[Vtigercrm-developers] I must be missing something ...
arodes at onweald.com
Sat Dec 22 10:19:44 PST 2007
Ok, so I don't remember this being broken, and I have scoured the forums to
I am having a problem importing custom fields into accounts.
I found the function where the problem is occurring, but its so blatent, I
cant imagine I am correct.
Basically, in CustomFieldUtil.php there is a function which is called during
the import. The function is as follows:
$log->debug("Entering getCustomFieldArray(".$module.") method
$custquery = "select * from vtiger_field where
$custresult = $adb->query($custquery);
$custFldArray = Array();
$noofrows = $adb->num_rows($custresult);
for($i=0; $i<$noofrows; $i++)
$custFldArray[$colName] = $i;
$log->debug("Exiting getCustomFieldArray method ...");
However, on the line:
$custquery = "select * from vtiger_field where tablename='".$module."'";
the variable $module, always comes in as the expected "Accounts"
However, in the vtiger_field table the values stored in the tablename column
are all as expected such as: vtiger_account etc
So this query returns NO custom fields for the module, and the import
fails.(actually it returns success, but the record doesn't show up in the ui
since no custom field entries were made for it)
ANY IDEAS? If not .. I will try to look for an elegant fix and share it (not
sure where to get the table name for the given module .. sure its somewhere)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtigercrm-developers