Alter/Create Voucher request is not working properly in Tally portable exe

Discussion in 'Tally Integration' started by Researcher1, Nov 8, 2023.

    
  1. Researcher1

    Researcher1 Member


    I am attempting to use RemoteID to Alter/modify a voucher in Tally by sending the following request.

    Code:
    <ENVELOPE>
         <HEADER>
              <TALLYREQUEST>Import Data</TALLYREQUEST>
         </HEADER>
         <BODY>
              <IMPORTDATA>
                   <REQUESTDESC>
                        <REPORTNAME>Vouchers</REPORTNAME>
                        <STATICVARIABLES>
                             <SVCURRENTCOMPANY>CompanyName</SVCURRENTCOMPANY>
                        </STATICVARIABLES>
                   </REQUESTDESC>
                   <REQUESTDATA>
                        <TALLYMESSAGE xmlns:UDF="TallyUDF">
                                                      <VOUCHER REMOTEID="3333906e-eeee-aaaa-8829-4886b9dc4444-00003444" VCHTYPE="3"ACTION="Create">
                                  <BANKERSDATE.LIST>
                                       <BANKERSDATE>0</BANKERSDATE>
                                  </BANKERSDATE.LIST>
                                  <DATE>20210402</DATE>
                                  <NARRATION></NARRATION>
                                  <VOUCHERTYPENAME>Sales</VOUCHERTYPENAME>
                                  <VOUCHERNUMBER>0</VOUCHERNUMBER>
                                  <PARTYLEDGERNAME>Cash on Hand</PARTYLEDGERNAME>
                                  <EFFECTIVEDATE>20210402</EFFECTIVEDATE>
                                  <ALLLEDGERENTRIES.LIST>
                                       <LEDGERNAME>Cash on Hand</LEDGERNAME>
                                       <ISDEEMEDPOSITIVE>YES</ISDEEMEDPOSITIVE>
                                       <AMOUNT>-53377</AMOUNT>
                                  </ALLLEDGERENTRIES.LIST>
                                  <ALLLEDGERENTRIES.LIST>
                                       <LEDGERNAME>Sales - Liquor</LEDGERNAME>
                                       <ISDEEMEDPOSITIVE>NO</ISDEEMEDPOSITIVE>
                                       <AMOUNT>53377</AMOUNT>
                                  </ALLLEDGERENTRIES.LIST>
                             </VOUCHER>
                        </TALLYMESSAGE>
                   </REQUESTDATA>
              </IMPORTDATA>
         </BODY>
    </ENVELOPE>
    However, instead of altering the existing voucher, it is creating a new voucher with a new RemoteID value. I want to modify the existing voucher by specifying its RemoteID in the query.

    When I tried the same query in my locally installed Tally Prime, there were no issues, and the Alter/Create request worked properly. I want an alter/create voucher request that works even in portable Tally Prime software. Or Is there any other reason for this query to not work as expected?

    or is there any other parameter such as Master ID (instead of Remote id) based on which we can alter the voucher?

    Please note that Alter request is also tried instead of create.
     


  2. Sai Vineeth

    Sai Vineeth Active Member


    Change to
    Code:
    <VOUCHER
    REMOTEID="someuniqueid"
    >
    ....
    </VOUCHER>
    
    if you send this it will alter if already created with same RemoteId , else it will create
     
    Last edited: Nov 9, 2023


Share This Page