How can disable autoScheduling when we add link on gantt timeline


We have our own parameters like start_date and end_date so before and after auto scheduling we have to map these fields with our parameters so that we are overriding the ‘onAfterLinkAdd’ event but after this also again auto scheduling is triggering if we add link on tiimeline which we don’t want it, how can we stop this??

Hello Govardhan,
You can disable auto-scheduling in the onBeforeLinkAdd and enable it in the onAfterLinkAdd events:
In the following snippet, you can try adding a link from Task #332 to Task #333, and the latter task won’t be moved:

However, if you want to add your custom code before and after auto-scheduling, you can do that in the onAfterAutoSchedule, onAfterTaskAutoSchedule, onBeforeAutoSchedule and onBeforeTaskAutoSchedule events: