Hi,<br><br>(13) and (45) refers to the length of the string from the output of var_dump.<br><br>You will need to use to doListTypes operation to find the information about the Module.<br><br>Please refer vtwsclib documentation on the API.<br>
<br>Regards,<br>Prasad<br>vtiger Team<br><br><div><span class="gmail_quote">On 11/6/09, <b class="gmail_sendername">Fusioncore</b> <<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I use your method to create SalesOrder<br> The return : array(2) { ["code"]=> string(13) "ACCESS_DENIED"<br> ["message"]=> string(45) "Permission to perform the operation is denied"<br>
} bool(false)<br> <br> what are the string(13) and string(45) ? and where can I found the list<br> of modules id ?<br> My user have all rights on Account, Contact, salesorder, Invoice modules<br> I test with admin and the error is the same<br>
<br> <br> My code :<br> <?php<br> require_once('/var/www/regie/www/vtwsclib/Vtiger/WSClient.php');<br> <br> $vtwsclib = new Vtiger_WSClient('<a href="http://crm.url.fr">http://crm.url.fr</a>');<br> $login= $vtwsclib->doLogin('admin', 'key');<br>
<br><br> $data = array(<br> 'subject' => 'Test SalesOrder',<br> 'sostatus' => 'Created',<br> 'invoicestatus'=>'AutoCreated',<br> <br> 'account_id'=> '3x1357', // Existing account id<br>
<br><br> 'bill_street' => 'Bill Street',<br> 'ship_street' => 'Ship Street',<br> );<br> $result = $vtwsclib->doCreate('SalesOrder', $data);<br> <br> var_dump($vtwsclib->lastError());<br>
var_dump($result);<br> <br>?><br> <br><br> Thanks for your help,<br> <br> Bruno<br> <br>French-vtiger manager<br> <br> Prasad a écrit :<br> <br>> I was able to successfully create the SalesOrder base information<br>
> record with the following:<br> ><br> > ---- START ----<br> > <?php<br> > require_once('vtwsclib/Vtiger/WSClient.php');<br> ><br> > $vtwsclib = new Vtiger_WSClient('<a href="http://vtiger.server.url">http://vtiger.server.url</a>');<br>
> $login= $vtwsclib->doLogin('admin', 'accessKey');<br> ><br> > $data = array(<br> > 'subject' => 'Test SalesOrder',<br> > 'sostatus' => 'Created',<br>
> 'invoicestatus'=>'AutoCreated',<br> > 'account_id'=> '3x2', // Existing account id<br> ><br> > 'bill_street' => 'Bill Street',<br> > 'ship_street' => 'Ship Street',<br>
> );<br> > $result = $vtwsclib->doCreate('SalesOrder', $data);<br> ><br> > var_dump($vtwsclib->lastError());<br> > var_dump($result);<br> > ---- END ----<br> ><br> > Hope this helps.<br>
><br> > Regards,<br> > Prasad<br> > vtiger Team<br> ><br> <br>> On 11/2/09, *Fusioncore* <<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>>> wrote:<br>
><br> > This is the script.<br> > I don't find the info about the product and service add syntax.<br> > but it's<br> > plan on a second time<br> ><br> > $client = new Vtiger_WSClient($crm_url);<br>
><br> > $login = $client->doLogin($crm_username, $crm_accesskey);<br> > if(!$login)<br> > echo 'Login Failed';<br> > else<br> > {<br> > echo "Login Successful<br />";<br>
> $module = 'SalesOrder';<br> ><br> > $record = $client->doCreate($module,<br> > array(<br> > 'subject'=>"$pack_number",<br>
> 'duedate'=>"$_t",<br> > 'description'=>"$comment_t",<br> > 'recurring_frequency'=>"$bill_reccuring_t",<br>
> 'cf_548'=>"$pay_method",<br> > 'cf_547'=>"$ip",<br> > 'cf_546'=>"$date",<br> > 'cf_540'=>"$pack_number",<br>
> 'accountid'=>"$account_number",<br> > 'sostatus'=>"$sostatus",<br> > 'total'=>"$total",<br>
> 'subtotal'=>"$subtotal",<br> > 'taxtype'=>"$taxtype",<br> > 'contactid'=>"$fact_contactid",<br>
> )<br> > );<br> > $error = $client->lasterror();<br> > if($error) {echo $error['code'] . ' : ' . $error['message'];<br> > }<br>
><br> > if($record) {<br> > $salesorderid = $client->getRecordId($record['id']);<br> > }<br> > echo "<br />new SaleOrder id : $salesorderid <br />";<br>
> }<br> ><br> > When my website will be open, I think I clean my code and enhance the<br> > css and translation to publish it on the extension vtiger site. It's a<br> > complete commerce solution totaly integrate with vtiger.<br>
><br> > Thanks for your help,<br> ><br> ><br> > Bruno<br> > French-vtiger Manager<br> ><br> ><br> > Prasad a écrit :<br> > > Hi Bruno,<br> > ><br> ><br> > > Can you share the script?<br>
> ><br> ><br> > > On 11/2/09, *Fusioncore* <<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>><br> <br>> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>>>> wrote:<br>
> ><br> <br>> > Hi Prasad,<br> > ><br> > > The encode problem was solve by the update with the last release<br> > > of the<br> > > vtwsclib.<br>
> > But I have a new problem. When I use DoCreate action to create a<br> > > salesorder, I have this error : ACCESS_DENIED : Permission<br> > to perform<br> > > the operation is denied<br>
> ><br> > > The vtwslib user have all write permission on the crm. Do<br> > you have<br> > > an idea ?<br> > ><br> > ><br> > > Thanks,<br> > ><br>
> > Bruno<br> > > French-vtiger manager<br> > ><br> > ><br> > ><br> > > Prasad a écrit :<br> > > > Hi Bruno,<br> > > ><br>
> ><br> > > > php curl is required by vtwsclib and recommended to be<br> > present for<br> > > > vtiger CRM as well.<br> > > ><br> > > > I was pointing to<br>
> > > <a href="http://in2.php.net/manual/en/function.urlencode.php#92424">http://in2.php.net/manual/en/function.urlencode.php#92424</a>, for<br> > > > urlencode API<br> > > ><br>
> > > Its used in:<br> > > ><br> > > > * function doGet (Vtiger_HTTP_Client) and<br> > > > * function send_post_data (Curl_HTTP_Client, file:<br>
> > > vtwsclib/third-party/curl_http_client.php)<br> > > ><br> > > > Regards,<br> > > > Prasad<br> > > > vtiger Team<br> > > ><br>
> ><br> > > > On 10/7/09, *Fusioncore* <<a href="mailto:ml@arceva.fr">ml@arceva.fr</a><br> > <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>>><br>
><br> <br>> > <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>><br> > <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>>>>> wrote:<br>
> > ><br> > > > php curl must be install on both server ?<br> > > > My class was on the website server and vtiger was on an<br> > > other server.<br>
> > > Actually curl was present only on the website server<br> > > > I don't understand your other hint urlencode API,<br> > where she<br> > > is use ?<br>
> > > I search on the HTTP_Client.php and I return my<br> > feedback soon<br> > > ><br> > > ><br> > > > Thanks,<br> > > ><br>
> > > Bruno<br> > > > French-vtiger manager<br> > > ><br> > > ><br> > > > Prasad a écrit :<br> > > ><br> > > > > Hi Bruno,<br>
> > > ><br> > > > > PHP CURL API's are used to handle the communication.<br> > > > > You might need to tune the UTF-8 support in function<br> > > __construct of<br>
> > > > class Vtiger_HTTP_Client (file:<br> > > vtwsclib/Vtiger/Net/HTTP_Client.php)<br> > > > ><br> > > > > I found the following article to be related:<br>
> > > > <a href="http://markmail.org/message/m27ctd3qzzg7ts3i">http://markmail.org/message/m27ctd3qzzg7ts3i</a><br> > > > > Please update if you find any information.<br> > > > ><br>
> > > > Another hint: urlencode API is being used which could be<br> > > causing<br> > > > issue<br> > > > > with UTF-8, please watch out during your analysis.<br>
> > > ><br> > > > > Regards,<br> > > > > Prasad<br> > > > > vtiger Team<br> > > > ><br> > > ><br>
> > > > On 10/7/09, *Fusioncore* <<a href="mailto:ml@arceva.fr">ml@arceva.fr</a><br> > <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>><br> > > <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>>><br>
> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a><br> > <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>>>><br>
> ><br> > > > <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>><br> > <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>>><br>
> > <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>><br> > <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>>>>>> wrote:<br>
> > > ><br> > > > > Hi,<br> > > > > I have create a bridge who sent my website user<br> > on the<br> > > account<br> > > > > table on<br>
> > > > vtiger.<br> > > > > This bridge extract data from the website database<br> > > (utf8_general<br> > > > > encode)<br>
> > > > and send it to vtiger with vtwsclib. (vtiger<br> > database was<br> > > > full utf8)<br> > > > > I have a problem with the accent on some string. For<br>
> > example, I<br> > > > > have an<br> > > > > address "Avenue Jean Sébastien BACH" on my<br> > website and<br> > > when<br>
> > > I sync<br> > > > > with<br> > > > > crm, the address save on the crm was "Avenue Jean S"<br> > > > > Does vtwsclib support accent ?<br>
> > > ><br> > > > > Thanks,<br> > > > ><br> > > > > Bruno<br> > > > > French-vtiger manager<br>
> > > > _______________________________________________<br> > > > > Reach hundreds of potential candidates -<br> > > <a href="http://jobs.vtiger.com">http://jobs.vtiger.com</a><br>
> > > ><br> > > > ><br> > > ><br> > > > ><br> > > ><br> > ><br> > ------------------------------------------------------------------------<br>
> > ><br> > > > ><br> > > > > _______________________________________________<br> > > > > Reach hundreds of potential candidates -<br>
> > <a href="http://jobs.vtiger.com">http://jobs.vtiger.com</a><br> > > > _______________________________________________<br> > > > Reach hundreds of potential candidates -<br>
> <a href="http://jobs.vtiger.com">http://jobs.vtiger.com</a><br> > > ><br> > > ><br> > ><br> > > ><br> > ><br> > ------------------------------------------------------------------------<br>
> ><br> > > ><br> > > > _______________________________________________<br> > > > Reach hundreds of potential candidates -<br> > <a href="http://jobs.vtiger.com">http://jobs.vtiger.com</a><br>
> > _______________________________________________<br> > > Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com">http://jobs.vtiger.com</a><br> > ><br> > ><br>
><br> > ><br> > ------------------------------------------------------------------------<br> ><br> > ><br> > > _______________________________________________<br> > > Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com">http://jobs.vtiger.com</a><br>
> _______________________________________________<br> > Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com">http://jobs.vtiger.com</a><br> ><br> ><br> <br>> ------------------------------------------------------------------------<br>
<br>><br> > _______________________________________________<br> > Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com">http://jobs.vtiger.com</a><br> _______________________________________________<br>
Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com">http://jobs.vtiger.com</a><br> </blockquote></div><br>