Duplicate predecessor Task

Hi,

How can we prevent the scenario of duplicate predecessor Tasks to the same successor task in the gantt (gantt 4.1.2).

See image below where “Resource Task” has both a F-S & F-F relationship with “New Task 2”


The same setup is not allowed in Ms Project with the error displayed as:

"You cannot link a predecessor task twice to the same successor task)

Thanks
Kevin

Hello,

You need to check source and target tasks’ links. And if these arrays already have common link id - forbid creation the link when “onBeforeLinkAdd” event fires.
Please, see example how to achieve it:
docs.dhtmlx.com/gantt/snippet/437d01cf

docs.dhtmlx.com/gantt/desktop__ … tions.html
docs.dhtmlx.com/gantt/api__gant … event.html