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

Max Clarke max at smarte.com.au
Thu Apr 10 00:07:25 GMT 2014


Thank you very much Stefan!

In my case I wasn't setting the "visibility" property since it's not listed
as mandatory when you run a "describe".

Setting this property has fixed the issue.

I guess the API should be updated to list this property as mandatory, or a
default value should be set on "create".

Max


On Wed, Apr 9, 2014 at 7:08 PM, Stefan- Setras LLC <stefan at setras.net>wrote:

> 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
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140410/589536ab/attachment.html>


More information about the vtigercrm-developers mailing list