Independentsoft
Professional software libraries for developers
Home
Purchase
Support
Company
Contact
JGraph
>
Tutorial
> Create Planner Plan
The following example creates a new planner plan in the specified group.
import com.independentsoft.graph.GraphClient; import com.independentsoft.graph.GraphException; import com.independentsoft.graph.planner.PlannerPlan; import com.independentsoft.graph.planner.PlannerPlanContainer; import com.independentsoft.graph.planner.PlannerPlanContainerType; public class Console { 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"); String groupId = "11111111-2222-3333-4444-555555555555"; PlannerPlanContainer container = new PlannerPlanContainer(); container.setContainerId(groupId); container.setType(PlannerPlanContainerType.GROUP); PlannerPlan newPlan = new PlannerPlan(); newPlan.setTitle("New Project Plan"); newPlan.setContainer(container); PlannerPlan createdPlan = client.createPlannerPlan(newPlan); System.out.println("Id: " + createdPlan.getId()); System.out.println("Title: " + createdPlan.getTitle()); } catch (GraphException e) { System.out.println(e.getCode()); System.out.println(e.getMessage()); e.printStackTrace(); } } }
Need help? Ask our developers:
Name*
Email*
Message*