简体   繁体   中英

Is there any option in tally that should be changed for altering stock item names using xml request?

This is my xml request

<ENVELOPE>
<HEADER>
<TALLYREQUEST>Import Data</TALLYREQUEST>
</HEADER>
<BODY>
<IMPORTDATA>
<REQUESTDESC>
<REPORTNAME>All Masters</REPORTNAME>
</REQUESTDESC>
<REQUESTDATA>
<TALLYMESSAGE xmlns:UDF="TallyUDF">
<STOCKITEM NAME="0000" ACTION="alter">
<NAME.LIST>
<NAME>newname</NAME>
</NAME.LIST>
<ADDITIONALNAME.LIST>
<ADDITIONALNAME>0000</ADDITIONALNAME>
</ADDITIONALNAME.LIST>
</STOCKITEM>
</TALLYMESSAGE>
</REQUESTDATA>
</IMPORTDATA>
</BODY>
</ENVELOPE>

Response from tally

<RESPONSE>
    <CREATED>0</CREATED>
    <ALTERED>0</ALTERED>
    <DELETED>0</DELETED>
    <LASTVCHID>0</LASTVCHID>
    <LASTMID>0</LASTMID>
    <COMBINED>0</COMBINED>
    <IGNORED>1</IGNORED>
    <ERRORS>0</ERRORS>
    <CANCELLED>0</CANCELLED>
</RESPONSE>

First it's working, could create, alter any stock items, but then alter is not working.

Would like to know how to edit (alter) stock item name in tally using a XML request

If you send same XML twice it won't work

as when you send First time, stock item name "0000" is altered to "newname"

If you want to alter same stock item again then you need use "newname" in attribute

<STOCKITEM NAME="newname" ACTION="alter">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM