vtiger Forum Index vtiger
The Honest Open Source CRM
 

Import Accounts Error
Click here to go to the original topic

 
       vtiger Forum Index -> Help - 5.0.2
Previous topic :: Next topic  
Author Message
mcloide



Joined: 02 Jan 2008
Posts: 37

Posted: Fri Jan 04, 2008 5:28 pm    Post subject: Import Accounts Error  

I was trying to import accounts and I have always got the same error: Duplicate entry '65' (or the next entry) for key 1 when trying to insert into vtiger_users_last_import table. After some digging I have found out that the UsersLastImport class does not have a [b]$new_with_id[/b] on it and the SugarBean class always tryed to get a unique id from the [b]vtiger_users[/b] table even knowing that the type being imported is Accounts.
For a test I have just created a new var $new_with_id on the UsersLastImport Class and set it to true. After that all the import was 100% successful.
I'm not considering this a bug because this may be the way the class was prepared to work, but, this are some things that I would take a look:

- Why SuggarBean class always look into the last available id for the UsersLastImport in vtiger_users table knowing that vtiger_users_last_import has the id set to primary key and auto increment.
- escape the strings from the import process so it would not give so many errors when finding an ',' or any special chars.
- include at first step string delimiters to choose, being the default ','
- If the file has a big number of rows (over 30000) consider using a temp table instead of array (it may go faster).
Back to top  
 
       vtiger Forum Index -> Help - 5.0.2
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.15 © 2001, 2002 phpBB Group