Hello Enzo,
I'm not 100% sure if this works but you can try '[%CurrentObject%]', that works in XPaths so there is a chance it would work here.
Otherwise I'd recommend using a java action, in java you could easily get it and either pass it back or run your query entirely in Java.
For example: Long identifier = obj.getMendixObject().getId().toLong();
Hope this helps
I solved it by using a listview with a ds with an OQL activity, whereby the parameters of the page (and others) could be used in the OQL query. You need to get the GUID if you want to use it on ID attribute.