Is there a way to see if a note is being linked to by another note?

Thanks @Kourosh for these macros. Besides the new snag (but with possible positive developments coming :wink: @cgrunenberg) in the system with respect to using the ā€œFind incoming item linksā€ script that @pete31 had generously provided to all (see Search for x-devonthink-item link not working), I have the curious problem on my end that when I run your macro for incoming wikilinks the script trips up at setting the record and sends me a notification ā€œPlease select a recordā€ but when I run the same script manually from the menu it works perfectly. Any ideas…?