IT Technical Support for Developers

Tally Request XMLs


TallyPrime List of Companies XML Request

TallyPrime XML Request for List of Companies

<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Data</TYPE>
<ID>List of Companies</ID>
</HEADER>
<BODY>
<DESC>
<TDL>
<TDLMESSAGE>
<REPORT NAME="List of Companies" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
<FORMS>List of Companies</FORMS>
</REPORT>
<FORM NAME="List of Companies" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
<TOPPARTS>List of Companies</TOPPARTS>
<XMLTAG>"List of Companies"</XMLTAG>
</FORM>
<PART NAME="List of Companies" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
<TOPLINES>List of Companies</TOPLINES>
<REPEAT>List of Companies : Collection of Companies</REPEAT>
<SCROLLED>Vertical</SCROLLED>
</PART>
<LINE NAME="List of Companies" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
<LEFTFIELDS>Name</LEFTFIELDS>
</LINE>
<FIELD NAME="Name" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
<SET>$Name</SET>
<XMLTAG>"NAME"</XMLTAG>
</FIELD>
<COLLECTION NAME="Collection of Companies" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
<TYPE>Company</TYPE>
<FETCH>NAME</FETCH>
</COLLECTION>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>




Tally Integration, Tally ERP 9 Integration with Node.JS

Tally ERP Data Accessing via Node.js

Getting Tally ERP data using Server side javascript (node.js)
1. Create a NodeJS, express application
2. Install necessary plugins such as cors,xml,body-parser and request.

Server.js

var express = require('express');
var router = express.Router();
var bodyParser = require('body-parser');
var cors = require('cors');
var request = require('request');
require('body-parser-xml')(bodyParser);
var xml = require('xml');
var async = require('async');
/*Tally xml query*/
var xmlstring = '<ENVELOPE>
<HEADER>
<TALLYREQUEST>Export DATA</TALLYREQUEST>
</HEADER>
<BODY>
<EXPORTDATA>
<REQUESTDESC>
<REPORTNAME>LIST of Companies</REPORTNAME>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
</STATICVARIABLES>
</REQUESTDESC>
</EXPORTDATA> </BODY>
</ENVELOPE>';
let app = express();
app.use(bodyParser.json());
/* use CORS to avoid net::ERR_CONNECTION_RESET */
app.use(cors);
app.post("/",(req,res) =>{ /*
Dynamic Tally xml Query parameter
const dbrequest = req.body.datarequest;
const params = req.body.params;
*/
var options = {
uri: 'http://localhost:9000',

method: 'POST',

headers: { 'Content-Type': 'text/xml;
charset:UTF-8',
'Content-Length': Buffer.byteLength(xmlstring)},
body: req.body.xmlstr
};
var result="";
async.parallel([
function(callback) {
/* tally data fetch from local tally server*/
var url = "http://localhost:9000";
request(options, function(err, response, body) {
// JSON body
if(err) { console.log(err);
callback(true);
return;
}

result = body;
callback(false, body);
});

}

],function(err, results) {
if(err) { console.log(err);
res.send(500,"Server Error");
return;
}
res.send("result--->"+result);
}
);
}

app.listen(4000,'localhost');








Related Links...

How to filter tally xml response based on voucher number?


Party wise Sales in xml format


How to Insert Memorandum voucher in Tally


How to Get Trial Balance in xml/html format


How to Get Outstanding data


XML - How to get voucher list of a specific voucher type in tally via


Tally data to Power BI