I’ve used the Tools->Import wizard successfully to import a large amount of Third Parties.
After a while I wanted to update these same entries with additional information.
When I select " Key (column) to use for updating existing data" → Third-party name or Customer Code, and run the import - i get the success message e.g. :
Number of lines successfully imported: 1.
Number of inserted lines: 0
Number of updated lines: 1
However, when i check the third party in the UI - nothing has changed. The entry wasn’t updated.
They I checked manually the SQL logs to see what is printed regarding the UPDATE query that runs internally, and i see the following:
2025-02-19 19:28:17.328885 | UPDATE llx_societe SET nom = ‘a13’, name_alias = ‘boze bre’, fk_user_creat = 2, import_key = ‘20250219192817’ WHERE fk_user_creat = 47 AND entity IN (1)
I’ve found out through manual query executions in the database that the issue is this “fk_user_creat = 47” user - this user doesn’t exist in my database, yet for some reason the query insists on using “47” instead of “2” - my existing user.
This is the reason the Update fails.
Is there any developer here that can tell me which file needs to be edited and where in order to overwrite this “fk_user_creat = 47” with current user id?
I’ve checked this link dolibarr/htdocs/imports/import.php at develop · Dolibarr/dolibarr · GitHub
I guess this is the place for editing it, but I’m not sure.
Any assistance here will be appreciated. I’ve seen other people struggle with updating values for their imports (not just third paties, but also products, etc) - perhaps it’s related and could be beneficial for more people if we figure it out.