<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Try adding the assigned user id<br>
      all mandatory fields have to be there<br>
      <br>
      (you can have a look at some of the patches we have on coreBOS we
      have some enhancements and bug fixes on the import process)<br>
      <br>
      Joe<br>
      TSolucio<br>
      <br>
      <br>
      El 04/08/14 a las #4, Alan Lord escribió:<br>
    </div>
    <blockquote cite="mid:lro7h9$b0r$1@ger.gmane.org" type="cite">Hi all
      <br>
      <br>
      I'm trying to use the import tool so it is actually updating
      records rather than creating new ones (example file attached).
      <br>
      <br>
      As is explained here:
      <a class="moz-txt-link-freetext" href="https://wiki.vtiger.com/vtiger6/index.php/Duplicate_Merge_Importing">https://wiki.vtiger.com/vtiger6/index.php/Duplicate_Merge_Importing</a>
      <br>
      <br>
      If you choose the "Merge" option under Duplicate Handling it
      should perform an "update" type approach.
      <br>
      <br>
      This is a custom vtlib module and is on vtiger 5.4.0.
      <br>
      <br>
      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:
      <br>
      <br>
      <blockquote type="cite">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
        <br>
        uplift,totaleacaq,relvendorid,psdate,contractterm,lssaletype,salesagent,lscontractstatus,saledate,currsuppl)
        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
        <br>
        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,,,,,,,,]
        <br>
        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
        <br>
        uplift,totaleacaq,relvendorid,psdate,contractterm,lssaletype,salesagent,lscontractstatus,saledate,currsuppl)
        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
        <br>
        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,,,,,,,,]
        <br>
        Mon Aug  4 15:48:29 2014,099 [20224] DEBUG index - query being
        executed : SELECT 1 FROM vtiger_import_queue LIMIT 1
        <br>
      </blockquote>
      <br>
      But when it gets to actually update the record later on these
      fields are not populated:
      <br>
      <blockquote type="cite">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=?
        <br>
        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]
        <br>
      </blockquote>
      <br>
      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.
      <br>
      <br>
      Is this a bug or am I misunderstanding the procedure?
      <br>
      <br>
      Cheers
      <br>
      <br>
      Al
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
<a class="moz-txt-link-freetext" href="http://www.vtiger.com/">http://www.vtiger.com/</a></pre>
    </blockquote>
    <br>
  </body>
</html>