Ram,<div><br></div><div>You cannot run direct sql queries on the vtiger webservices. To access Account records you will need to send like</div><div>"select * from Accounts;" <br><br><div class="gmail_quote">On 20 July 2012 15:51, ram prasad <span dir="ltr"><<a href="mailto:ramtrg@gmail.com" target="_blank">ramtrg@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<div> I am using WSClient library for webservice access in my Javascript client.I Logged in properly. When i try to do doQuery(query,callback) method, error returns as <font color="#cc0000">"<span style="background-color:rgb(225,235,242);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18px">ACCESS_DENIED, Permission to perform the operation is denied for query</span>".</font></div>
<div><font color="#cc0000"><br></font></div><div><br></div><div><b>My Javascript code:</b></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
var query="SELECT id FROM vtiger_ws_entity WHERE name = 'Accounts' ";<br>client.doQuery(query,postExecAccQuery);<br>function postExecAccQuery(result, args) {<br><span style="white-space:pre-wrap">        </span>console.log("query result-->"+result);<br>
<span style="white-space:pre-wrap">        </span>if(result) {<br><span style="white-space:pre-wrap">                </span>var columns = client.getResultColumns(result);<br><span style="white-space:pre-wrap">                </span>alert('COLUMNS: ' + client.toJSONString(columns));<br>
<span style="white-space:pre-wrap">                </span>alert(client.toJSONString(result));<br><span style="white-space:pre-wrap">        </span>}<br>}</blockquote><div><div><br></div><div>Result : <span style="color:rgb(204,0,0)">"</span><span style="color:rgb(204,0,0);font-size:13px;background-color:rgb(225,235,242);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;line-height:18px">ACCESS_DENIED, Permission to perform the operation is denied for query</span><span style="color:rgb(204,0,0)">".</span></div>
<div><span style="color:rgb(204,0,0)"><br></span></div><div><div>Also I tried this query for getting "Account" module id from database.I want to do ModuleID+"x"+AccountID. Is it any simple method to this from javascript?</div>
<span class="HOEnZb"><font color="#888888">
<br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><font face="comic sans ms,sans-serif"><span style="color:rgb(153,0,0)">BY</span><br><br><span style="color:rgb(0,102,0)">R.RAMPRASAD</span></font><br>
<br>
</font></span></div>
<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards<br>Vikas<br>Vtiger Team<br>
</div>