creates a connection line between this task and predecessor with specified Id. Set it to empty string ”” to remove the connection.
var task121 = project2.getTaskById(121); task121.setPredecessor(120); // to remove the connection var task122 = project2.getTaskById(122); task122.setPredecessor("");