[Vtigercrm-developers] vtiger 7.0 cannot create task with status
lucia digirolamo
l.digirolamo at websonica.net
Wed Jan 16 15:30:52 GMT 2019
Hi,
I'm trying to create a new task via workflow. The task is created but
the status is empty. The code I'm using is the following:
$activity = Vtiger_Record_Model::getCleanInstance("Events");
$activity->set('mode', 'create');
$activity->set('activitytype', 'Task');
$activity->set('date_start', "2019-01-01");
$activity->set('time_start', "09:00:00");
$activity->set('due_date', "2019-01-31");
$activity->set('taskstatus', 'Planned'); //$activity->set('status',
'Planned');
$activity->set('visibility', 'Private');
$activity->set('subject', "test");
//$activity->set('description', '');
//$activity->set('parent_id', $record['id']);
$activity->set('assigned_user_id', 1);
$activity->save();
With both status and taskstatus the task gets created with the status
field empty.
NOTE: the same doesn't happen when creating an event.
Any idea on how to solve it?
Thanks
More information about the vtigercrm-developers
mailing list