Get itemkey from attachmentkey
I wanna achive the function that jump from local PDF to item in zotero.
Attachmentkey can get from local folder, like
Is there any way to obtain itemkey from attachmentkey?
Attachmentkey can get from local folder, like
8KH8HZAR
, then can reach to zotero via zotero://select/library/items/[attachmentkey]
. But selection is attachment instead of item.Is there any way to obtain itemkey from attachmentkey?
copy select item links
andcopy zotero URIS
via Zutilo, but get the attachment link instead of item link.Is there any .js or other way to get itemkey from attachmentkey?
So, I need to set my workflow of jump from current PDF in PDF Expert to Zotero:
1. (Finished) Get the folder of current PDF (
attachmentkey
) via PDF Expert;2. Transform the
attachmentkey
toitemkey
;3. Jump from PDF Expert to Zotero using
zotero://select/library/items/[itemkey]
.Step 2 is what I want to ask for help.
var attachmentItem = await Zotero.Items.getByLibraryAndKeyAsync(
Zotero.Libraries.userLibraryID,
attachmentKey
);
var itemKey = attachmentItem.parentKey;