Peter,<div><br></div><div>Make sure to fill in valid data for mandatory fields of the Potentials module. You can refer the Create/Edit form first before creating record. Also check any error after the operations.</div><div>

<br></div><div>Regards,</div><div>Prasad</div><div>vtiger Team<br><br><div class="gmail_quote">On Thu, Aug 2, 2012 at 2:33 AM, Peter Dimov <span dir="ltr">&lt;<a href="mailto:phdimov@gmail.com" target="_blank">phdimov@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Hello Vtiger Developers,</span><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">


<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">I do have an issue with vtwsclib and was wondering if anyone has been able to create a potential with it. </div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
The code I am trying does not work</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<div>$module = &#39;Potentials&#39;;</div><div>$record = $client-&gt;doCreate($module, Array(</div><div>             &#39;potentialname&#39;=&gt;&#39;test&#39;,</div><div><span style="white-space:pre-wrap">        </span>     &#39;closingdate&#39;=&gt;&#39;&#39;,</div>


<div>             &#39;related_to&#39;=&gt;&#39;&#39;,</div><div>             &#39;sales_stage&#39;=&gt;&#39;&#39;,</div><div>             &#39;assigned_user_id&#39;=&gt;&#39;1&#39;</div><div>         ));</div><div><span style="white-space:pre-wrap">                </span> </div>


<div>if($record) {</div><div>$recordid = $client-&gt;getRecordId($record[&#39;id&#39;]);</div><div>echo $recordid;</div><div>}</div><div><br></div><div>If anyone has a working example of what array should I send I would greatly appreciate it!</div>

<span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888"><br><div><br></div>-- <br>Best Regards,<br><br>Petar Dimov<br><br><br>
</font></span><br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br></div>