Hello,
when i create the link, the source and target come with id task and i need to come with another value. I have 2 primary keys.
Is that possible to receive sourcetask and targettask on event “onBeforeLinkAdd”? Or receive another values on source and target.
Hello,
You can change link parameters in the onBeforeLinkAdd event handler:
But please note that the event is not asynchronous. The parameters should be ready before you start adding a link, otherwise, it won’t work. Here is the snippet: https://snippet.dhtmlx.com/da4af1440
If you want to obtain the values from the database or somewhere else, you need to wait until the link is added and modify the parameters in the onAfterLinkAdd event handler:
Thank you for you answer.
I need another parameter on event “onBeforeLinkAdd” for example all the object of the source task and the all the object of the target task and not only the id’s.