RE: An error ocurred when trying to export an entity
Hi Alireza and Andre,
It's a custom composite entity, that I export by code then send to to azure blob
so what happens is, that everytime a journal is posted, I export the entity, where I update the status of a log table to try and replace change tracking
It fails at the export. Could it be because of the number of users who are posting a journal at the same time? or is it related to the executionId? as this doesn't happen in my dev machine
DictCompositeDataEntity compositeDataEntity = new DictCompositeDataEntity(_queryName);
entityName = compositeDataEntity.label();
compositeDataEntity.label();
// Start:Optional if you want to filter data while exporting
Query query = new Query(DMFUtil::getDefaultQueryForEntityV3(entityName,_definitionGroupName));
DMFEntityExporter exporter = new DMFEntityExporter();
fileId = exporter.exportToFile(
entityName,
_definitionGroupName,
DMFUtil::generateExecutionId(_definitionGroupName), //Optional: ExecutionID
_dmfSourceName, //Optional::SourceName
#FieldGroupName_AllFields, //Optional field selection
query.pack(), //Optional: Filtered Query
curExt() //Optional: DataAReaId
);

When I tried to export it as XML in Live. I got this warning when I added the entity:
entity doesn't have primary or unique key staging table needs to be altered
what is this one?
However, when I exported the entity, it succeeded and I was able to see the file. However, there was a failing child entity because of an existing record, but this didn't affect the export