locked
[E2007][E2010] [EWS] [PHP]: Get Tasks with filter RRS feed

  • Question

  • Hello,

    how can i get the tasks with Status 'NotStarted' and a specified 'DueDate'?

    Here is my first Script, but this code get all tasks entries.

    $Task->Traversal = "Shallow";
    $Task->ItemShape->BaseShape = "AllProperties";
    $Task->ParentFolderIds->DistinguishedFolderId->Id = "tasks";
    $resultTask = $client->FindItem($Task);
    $taskitems = $resultTask->ResponseMessages->FindItemResponseMessage->RootFolder->Items->Task;

    if(is_array($taskitems)){
    foreach ($taskitems as $item){
    echo $item->Subject." ".$item->Status."<br/>";
    }
    }else{
    echo $item->Subject." ".$item->Status."<br/>";
    }

    Greetz Creacher

    Wednesday, September 28, 2011 5:37 PM