On drag drop link get key/id of from and to object

Consider a diagram as shown in picture


What i need is that when a link is drawn from entity1 to any other entity it drops the primary key node from entity 1 to the desired entity that the link ends on. PS i just started working on go.js

You could use a “LinkDrawn” DiagramEvent handler. The link will be e.subject, so you could get the from/toN using e.subject.fromNode and e.subject.toNode. Then you can find the primary key node within the group and copy it into the to group.

Read more about DiagramEvents here.