Changed By and Changed Date system members in Excel export
Hi All, i’m working on an Excel export using the ExcelExporter. In the exported data I also want to include the ‘changed by’ and ‘changed date’ system members. The export itself is working fine but unfortunately during the export (following the excel export instructions) I iterate over the objects I want to export to associate them with the export object (file doc). During that iteration the object gets “changed” so in the exported file it shows that all exported objects got ‘changed by’ me (or better said the person who’s initiating the export) and the corresponding time of the export as ‘changed date’. That’s obviously not what I want to show there. I want to see who actually changed the objects and when. Did anyone ran into that same problem before and/or does anyone know a solution to that? Thanks in advance! BR Jan
You should probably change the association from ‘db objects*->* exportdoc’ to ‘exportdoc*->*dbobjects’.
This way your dbobjects will not be changed, only your exportdoc.
So for everyone: Sjors answer is working fine!
Just change the association in the domain model to many-to-many and then set/initiate the association (during the iteration) from the export object instead of from the object itself.
If you have set the "deleteAfterDownload" to true for your export object there also shouldn't be any problem from a data perspective.