[Vtigercrm-developers] Duplicate Merge Importing (vtiger 5.4.0)?

Alan Lord alanslists at gmail.com
Mon Aug 4 15:06:16 GMT 2014


Hi all

I'm trying to use the import tool so it is actually updating records 
rather than creating new ones (example file attached).

As is explained here: 
https://wiki.vtiger.com/vtiger6/index.php/Duplicate_Merge_Importing

If you choose the "Merge" option under Duplicate Handling it should 
perform an "update" type approach.

This is a custom vtlib module and is on vtiger 5.4.0.

I have a unique field to match the record on (Customer ID) and looking 
through the logs there are no errors. When the import tool runs, it 
writes the correct data into the import map tables:

> Mon Aug  4 15:48:29 2014,002 [20224] DEBUG index - Prepared sql query being executed : INSERT INTO vtiger_import_1 (contractid,livedate,enddate,totalreceived,unit
> uplift,totaleacaq,relvendorid,psdate,contractterm,lssaletype,salesagent,lscontractstatus,saledate,currsuppl) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
> Mon Aug  4 15:48:29 2014,002 [20224] DEBUG index - Prepared sql query parameters : [239751,25-06-2014,24-06-2017,268.89,0.6,56019,,,,,,,,]
> Mon Aug  4 15:48:29 2014,049 [20224] DEBUG index - Prepared sql query being executed : INSERT INTO vtiger_import_1 (contractid,livedate,enddate,totalreceived,unit
> uplift,totaleacaq,relvendorid,psdate,contractterm,lssaletype,salesagent,lscontractstatus,saledate,currsuppl) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
> Mon Aug  4 15:48:29 2014,050 [20224] DEBUG index - Prepared sql query parameters : [239769,23-06-2014,22-06-2017,143.06,0.5,13000,,,,,,,,]
> Mon Aug  4 15:48:29 2014,099 [20224] DEBUG index - query being executed : SELECT 1 FROM vtiger_import_queue LIMIT 1

But when it gets to actually update the record later on these fields are 
not populated:
> Mon Aug  4 15:48:29 2014,753 [20224] DEBUG index - Prepared sql query being executed : update libertus_lscontracts set agentpercent=?,cancelsent=?,contractid=?,contractsent=?,contractterm=?,cotdate=?,cotonacq=?,currsuppl=?,customerid=?,dataxsell=?,enddate=?,ewrate=?,facilitator=?,facilpercent=?,fixedfee=?,livedate=?,loaonfile=?,lscancelreason=?,lscomfortcalloutcome=?,lscontractstatus=?,lsrenewalstatus=?,lssaletype=?,lsstndchgtype=?,meterid=?,mpanmprn=?,nextaction=?,nightrate=?,noticeperiod=?,psdate=?,ratefive=?,ratefour=?,rateseven=?,ratesix=?,relaccountid=?,relcontactid=?,rellsmeterid=?,relvendorid=?,renewallocto=?,renewalonfile=?,renewalrecd=?,renewalsent=?,saledate=?,salesagent=?,scuplift=?,standingcharge=?,totalconvalue=?,totaleacaq=?,totalreceived=?,unitrate=?,unituplift=? where lscontractsid=?
> Mon Aug  4 15:48:29 2014,754 [20224] DEBUG index - Prepared sql query parameters : [0.80,,239751,,36,,0,E.On,,0,,0.0000,BGB,0.00,0,,0,,,Contract Processed,,Acquisition,p/day,,84086207,,0.0000,131,2014-06-25,0.0000,0.0000,0.0000,0.0000,255970,340518,292505,3467,,0,0,,2014-02-14,Jas Sodhi,0.0000,83.1900,1010.32,56129,0,3.6890,0.6000,313781]

I have all the columns in the csv that are mandatory but they do not 
have any data in them. As described in the link above, the import tool 
should use existing data.

Is this a bug or am I misunderstanding the procedure?

Cheers

Al

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Payments received.csv
Type: text/csv
Size: 367 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140804/c439248a/attachment-0001.csv>


More information about the vtigercrm-developers mailing list