How to get Entity ID attribute created by Mendix

0
Hello Everyone, Can you please let me know how can i retrieve my Entity ID in MicroFlow
asked
3 answers
3

Do you need the Entity ID (generated by the modeler while working on your domain model) or do you need the Object id? The Object ID can be used as described by Dragos. If you need the internal EntityID, I don’t think you can do it in a microflow.

answered
2

Hello Hamroush,

The ID is available through Java – if you import the community commons module from the app store that will contain a java action called “getGUID” which gives you the ID you’re looking for.

Edit: If you wish to handle this through generics I’m afraid that’s impossible through microflows, you can do it through Java’s IMendixObject class but I’d recommend against it.

If you wish to do it for a specific type of object you can do a retrieve first on XPath [id = $GUID] and update that,

Hope this helps

answered
2

You could create an autonumber attribute on your entity and use it als id to create, retreive and update the related data. Keep in mind, that the ‘id’ from Mendix object, which is not catchable out of the box  in Mendix modeller can change, by moving app from an environment to an another one.

answered