[Vtigercrm-developers] RE : Webservices create Calendar record fails

Stefan- Setras LLC stefan at setras.net
Wed Apr 9 09:08:27 GMT 2014


Hi Max,

had the same problem. Here is the code that worked for me

		$vEvent = array(
			'subject'		=> 'Call back - ' .
$contact_form->posted_data['companyname'] . ' | ' .
$contact_form->posted_data['title'] . 
									' '
. $contact_form->posted_data['firstname'] . ' ' .
$contact_form->posted_data['firstname'],
			'date_start'		=> date("d-m-Y"),
			'time_start'		=> date("H:i:s",(time() +
300)),
			'due_date'		=> date("d-m-Y"),
			'time_end'		=> date("H:i:s",(time() +
500)),
			'eventstatus'		=> 'Planned',
			'activitytype'		=> 'Call',
			"visibility"		=> "Public",
			'assigned_user_id'	=> '20x17',
			'parent_id'		=> $vid,
			'duration_hours'	=> '0',
			'duration_minutes'	=> '5',
			'description'		=>
$contact_form->posted_data['Message'] ,
		);
	$objectJson = json_encode($vEvent);

	$params = array("sessionName"=>$vtiger_sessionId,
"operation"=>'create', 
		"element"=>$objectJson, "elementType"=>' Events');
	$vtiger_httpc->post("$vtiger_endpointUrl", $params, true);
	$response = $vtiger_httpc->currentResponse();

Good luck,
Stefan

============================================================================
====

Message: 3
Date: Wed, 9 Apr 2014 17:40:07 +1000
From: Max Clarke <max at smarte.com.au>
To: vtigercrm-developers at lists.vtigercrm.com
Subject: [Vtigercrm-developers] Webservices create Calendar record
	fails
Message-ID:
	<CABee08fWYMHJx+meT5xEHJXfXVDoCCvCSF1577ppPQjjVoZBAQ at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi guys,

Is anyone else having trouble creating Calendar items in 6.0 using
Webservices API? I'm using code that was working on 5.4, but now it's
throwing:

WebServiceException: LBL_DATABASE_QUERY_ERROR

This happens on a blank 6.0 installation.

Thanks

Max




More information about the vtigercrm-developers mailing list