I was able to successfully create the SalesOrder base information record with the following:<br><br><span style="font-family: courier new,monospace;">---- START ----</span><br><span style="font-family: courier new,monospace;"><?php</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">require_once('vtwsclib/Vtiger/WSClient.php');</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$vtwsclib = new Vtiger_WSClient('<a href="http://vtiger.server.url">http://vtiger.server.url</a>');</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$login= $vtwsclib->doLogin('admin', 'accessKey');</span><br style="font-family: courier new,monospace;"><br><span style="font-family: courier new,monospace;">$data = array(</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> 'subject' => 'Test SalesOrder',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> 'sostatus' => 'Created',</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> 'invoicestatus'=>'AutoCreated',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> 'account_id'=> '3x2', // Existing account id</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> 'bill_street' => 'Bill Street',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> 'ship_street' => 'Ship Street',</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$result = $vtwsclib->doCreate('SalesOrder', $data);</span><span><br>
<br><span style="font-family: courier new,monospace;">var_dump($</span></span><span style="font-family: courier new,monospace;">vtwsclib-></span><span><span style="font-family: courier new,monospace;">lastError());</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">var_dump($result);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">---- END ----</span><br><br>Hope this helps.<br>
<br>Regards,<br>Prasad<br>vtiger Team<br></span><span style="font-family: courier new,monospace;"></span><br><div><span class="gmail_quote">On 11/2/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;">
This is the script.<br> I don't find the info about the product and service add syntax. 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>>> wrote:<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 to perform<br> > the operation is denied<br> ><br> > The vtwslib user have all write permission on the crm. Do 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 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> <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> > > 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, where she<br>
> is use ?<br> > > I search on the HTTP_Client.php and I return my 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>> <mailto:<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>><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 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 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 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> > > > 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>