我试图弄清楚如何使用其Web Services API在vTiger6.5中以编程方式创建一个“帐户” 。
我目前正在使用官方的vtwsclib v1.5 PHP Library。登录似乎成功了,我也可以doDescribe
在模块上成功执行 a ,但是无论我做什么doCreate
都会返回“ ”。false
示例如下。我错过了什么吗?
$url = 'http://vtiger.mydomain.com/';
$client = new Vtiger_WSClient($url);
$login = $client -> doLogin('systemuser', 'O8nFgnotrealkey');
if (!$login)
echo 'Login Failed';
else {
$module = "Accounts";
$record = $client -> doCreate($module, Array('accountname'=>'S1',
'account_type'=>'Prospect', 'phone'=>'75584'));
if ($record) {
$recordid = $client -> getRecordId($record['id']);
}
}
回报:
$record: bool(false)