Getting GUID for a FileDocument

1
I want to be able to retrieve the GUID of an entity that inherits form fileDocument and store it in a string, what is the best way to achieve this?
asked
3 answers
1

Community commons is the way to go here indeed. But, why do you need the fileGUID in the first place? In most cases it makes more sense to use the fileID instead of the guids. Note that prior Mendix 4 guids are not constant over time.

answered
3

The only way to do this is Java. Pass the filedocument as an object. Code is something like.

// BEGIN USER CODE    
myobject.setMyGuidString(myobject.getId().toString());
myobject.Commit();
// END USER CODE
answered
2

I found a solution, the mendix community commons has a java action that retrieves the GUID.

answered