<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">roleid - is a virtual reference type (handled on the server), unlikely supported through client webservice.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">--</div><div dir="ltr"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><a href="http://www.facebook.com/vtiger" style="color:rgb(0,0,204)" target="_blank">FB</a> I </span><a href="http://twitter.com/vtigercrm" style="color:rgb(0,0,204)" target="_blank">Twit</a> I <a href="https://www.linkedin.com/company/1270573?trk=tyah" style="color:rgb(0,0,204)" target="_blank">LIn</a> I <a href="https://blogs.vtiger.com" style="color:rgb(0,0,204)" target="_blank">Blog</a> I <a href="https://www.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Website</a></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Sat, Feb 3, 2018 at 2:10 PM, iko <span dir="ltr"><<a href="mailto:irina_k6@hotmail.com" target="_blank">irina_k6@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, here is the script I am using<br>
<br>
<?php<br>
//create User using library<br>
$moduleName = 'Users';<br>
//fill in the details of the User. Creating userId is obtained from<br>
loginResult.<br>
$userData  = array(<br>
        'user_name'=>'drwho',<br>
        'user_password'=>'drwho',<br>
        'confirm_password'=>'drwho',<br>
        'first_name'=>'Clara',<br>
        'last_name'=>'Oswald',<br>
        'phone_work'=>'123456789',<br>
        'roleid'=>'H1',<br>
        'email1' => 'norep@drwho.tld',<br>
        // you should define almost all the fields<br>
        'assigned_user_id'=>$cbUserID,<br>
);<br>
$create = $cbconn->doCreate($moduleName, $userData);<br>
<br>
//check whether the requested operation was successful or not.<br>
if($create) {<br>
        //operation was successful get the response.<br>
        var_dump($create);<br>
} else {<br>
        echo "Create failed<br>";<br>
        $err = $cbconn->lastError();<br>
        echo $err['code'].': '.$err['message'];<br>
}<br>
<br>
?><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
--<br>
Sent from: <a href="http://vtiger-crm.2324883.n4.nabble.com/vtigercrm-developers-f4.html" rel="noreferrer" target="_blank">http://vtiger-crm.2324883.n4.<wbr>nabble.com/vtigercrm-<wbr>developers-f4.html</a><br>
______________________________<wbr>_________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
</div></div></blockquote></div><br></div>