Discussion Forums

Task DueDate Required

 
Avatar
Enthusiast
15 posts

I am using the php services script you provided as an example to create a task list and tasks. 

When I tried creating the tasks, I get an error response back saying that the duedate was not provided.  According to your API Ref. this is not required. 

If I include duedate with a value it creates the task, but I dont want the due date.  I have tried putting in 0 or -1 or null into the value for duedate but I get either a system error or a task still with a due date. 

How can I make a task without a due date?

Avatar
Lyncean
152 posts

Hi Jonathan,

Looks like we’re missing ‘nodate’ parameter for tasks. While we’re checking how that happened and updating the docs, you can try to use nodate = 1 for your tasks with no ‘duedate’. (look for the parameter’s description in the Tasklist section of the API reference - it’s the same for tasks).

Please let me know if you have any further problems and thanks for spotting this!

Regards,
Alex.

Avatar
Enthusiast
15 posts

I found the answer to my problem, you have to set nodate, which is not in the API refinance under task, to 1

Avatar
Enthusiast
15 posts

thanks Alex, thats what I did and it worked

Avatar
Administrator
4124 posts

Docs updated, thanks!

New Member
4 posts
Jonathan Flowers - Mar 02, 2011 01:23pm

I found the answer to my problem, you have to set nodate, which is not in the API refinance under task, to 1

hi,

i have been in the same problem of creating a task. can you help me out?

i am able to create the contacts and the tasklist (by way of adding a template to the newly created contact) from the php api reference. but when i try to add a task to that tasklist, it just won’t.

i have this line for the task:
<?php
...
  $activityData = array(
        ‘title’ => ‘New task’,
        ‘details’ => ‘New task to do.’,
        ‘assignedto’ => ‘15543767’,
        ‘duedate’ => date(‘F d, Y’, strtotime(‘3 days’))
      );
 
$solve360Service->addActivity($templateId, $activityData, Solve360Service::ACTIVITY_TASK);
...
?>

is this wrong?

Avatar
Lyncean
152 posts

Hello,

You seem to be using the Template’s id as the parent for a new task. You should be using ID of the newly created (at the moment when you inserted the Template) Tasklist.

Regards,
Alex.

New Member
4 posts
Alex - Sep 20, 2011 03:22am

Hello,

You seem to be using the Template’s id as the parent for a new task. You should be using ID of the newly created (at the moment when you inserted the Template) Tasklist.

Regards,
Alex.

Thanks Alex!

yeah, i was actually using the template’s id..

so i followed on with getting the value of the newly created tasklist.. by using the simpleXML response, i the result when echoed out to php is:

response
idxxxxxxxx:
status:success

is the id that we speak of is that second line?

Avatar
Lyncean
152 posts

Hi there,

SOP#47 - Sep 20, 2011 08:43pm

so i followed on with getting the value of the newly created tasklist.. by using the simpleXML response, i the result when echoed out to php is:

is the id that we speak of is that second line?

To what action’s response you’re referring to? You will get Tasklist ID in case you’re creating a tasklist.

My guess is that this is the response for the contact creation. So, that’s a contact id. May be you should try loading the new contact to obtain all the data inside, including the tasklist id (that you’re interested in).