If you need to use the actual guid then you'll have to do it via java.
I think this question will help:
Writing a custom java action might be able to achieve this:
Note that ObjectId is the id (int/long) passed in as a parameter for the java action:
@java.lang.Override
public IMendixObject executeAction() throws Exception
{
// BEGIN USER CODE
List<IMendixObject> results = Core.createXPathQuery("//<insert-module-here>.<insert-entity-here>[id=$value]")
.setVariable("value", ObjectId)
.setAmount(1)
.setDepth(1)
.execute(context());
IMendixObject ProjectObj = results.get(0);
return ProjectObj;
// END USER CODE
}
This retrieves the first object from the list of objects returned from the function createXPathQuery.
Of course, if the id is unique, there should only be 1 item returned in the list - results
Remco,
No need to get the id in the Modeler. In your Xpath, you can use the attribute name id. So if you have the object you are trying to retrieve in a microflow as $ObjectName, your Xpath can look like this:
id = $ObjectName
Is there a requirement you have where that won't work?
Mike