I ended up creating three custom columns:
- rel_id: stores the book id for the related title (just one ID allowed). It's entered manually, as the first step to accomplish what I wanted.
- rel_urltxt: composite column with this template: calibre://show-book/mylib/{rel_id}
This column would be enough for my use case, but it can't be clicked. So...
- related: this one is where I get the clickable calibre URL. It's a comments field that I manually fill by copying the text from rel_urltxt, opening the Metadata Edit dialog at the "related" field, pressing control + L, and pasting it.
Note: after clicking the calibre URL, the Related Title gets selected. But I noticed that, when there's an active query on the library (search bar contains any expression), it doesn't get visually selected, unless it is one of the results of that expression