Independentsoft
Home
Purchase
Support
Company
Contact
JGraph
>
Tutorial
> Get Planner plan tasks
The following example shows you how to get all tasks in a Planner plan.
import com.independentsoft.graph.GraphClient; import com.independentsoft.graph.GraphException; import com.independentsoft.graph.planner.PlannerTask; import java.util.List; public class Sample { public static void main(String[] args) { try { GraphClient client = new GraphClient(); client.setClientId("63333333-209e-454e-b7bd-55a4d201270f"); client.setTenant("independentsoft.onmicrosoft.com"); client.setUsername("info@independentsoft.onmicrosoft.com"); client.setPassword("password"); List
tasks = client.getPlannerTasks("xqQg5FS2LkCp935s-FIFm2QAFkHM"); for (int i = 0; i < tasks.size(); i++) { System.out.println("Id = " + tasks.get(i).getId()); System.out.println("Title = " + tasks.get(i).getTitle()); System.out.println("PlanId = " + tasks.get(i).getPlanId()); System.out.println("BucketId = " + tasks.get(i).getBucketId()); System.out.println("PercentComplete = " + tasks.get(i).getPercentComplete()); System.out.println("Priority = " + tasks.get(i).getPriority()); System.out.println("StartDateTime = " + tasks.get(i).getStartDateTime()); System.out.println("DueDateTime = " + tasks.get(i).getDueDateTime()); System.out.println(""); } } catch (GraphException e) { System.out.println("Error: " + e.getCode()); System.out.println("Message: " + e.getMessage()); e.printStackTrace(); } } }
Need help? Ask our developers:
Name*
Email*
Message*