Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hi.
I need create com.ptc.projectmanagement.plan.PlanActivity and add into existing Project using java code. How i can do it?
Thanks.
first, need get the project,then coding like this:
Plan plan = (Plan)PlanHelper.service.getPlan(ObjectReference.newObjectReference(project));
PlanActivity activity = PlanActivity.newPlanActivity(WTContainerRef.newWTContainerRef(project));
activity.setName("name");
activity.setLineNumber(4); //this is important to display the PlanActivity
activity = (PlanActivity)PlanHelper.service.addToPlan(activity, plan);
Hi All,
Apart from the methods mentioned above there are many useful methods in " PlannableHelper.service " also.
PlannableHelper.service.getPlannableByLineNumber
PlannableHelper.service.addPlannable
PlannableHelper.service.getImmediateChildren
etc.
Thanks And Regads,
Kaushik