Dangling reference

Hi, i have tried to add links on allocated functions generated. At first, i have created the bookmark and then i called bookmarkRef. Here is the code :
in 1

I got this error message :

Thanks for helping.

When you use asBookmark() and asBookmarkRef() services, M2Doc makes sure when a reference is made using asBookmarkRef() the corresponding bookmark was made using asBookmark().

This error message means you didn’t create the bookmark with the corresponding ID. You can also use the asLink() service if the bookmark exists in the document and is not created with asBookmark():

'Some reference text'.asLink('#' + someID)

Thanks for your help. I have tried asLink fucntion here is my code :

But i got an error message during the document generation :

erroe message

You should use something like:

function.name.asLink('#' + function.name)

But I’m not sure the error is related to this call.

I used the same query but i got the same error message.

proof

I tried another another way, it worked but when i click on the link it doesn’t show up the paragraph where this function is detailed:

here is what i get as a result :

prefox

Because you didn’t create a bookmark for this reference. That why M2Doc gave you an error before.
If you don’t start the link with a # it will be considered as an external link. This try to open an external file.

But i don’t know how to create a Bookmark.

You can use:

'Some Text'.asBookmark(someId)

or in your case:

function.name.asBookmark(function.id)

Thank you so much for helping.