Error (Transaction outside of API context is not allowed) on IExternalEventHandler
Hi everyone
I've implemented this IExternalEventHandler which was working pretty well for the last 3 months:
public class CSVExportHandler : IExternalEventHandler
public void Execute(UIApplication app)
switch (caseValue)
{
case caseHandler.docOpened:
docOpened(app);
break;
case caseHandler.refreshData:
refreshData(app);
}
private async void refreshData(UIApplication app)
{
UIDocument uidoc = app.ActiveUIDocument;
//if(uidoc== null) return;
Document doc = app.ActiveUIDocument.Document;
...
}
somehow it's throwing the error when implementing another transaction wrapped within the refreData() method. A hint to the issue is that it also appeared since I send a 2° request to an web API.
¿Any thoughts on this issue?
Link copied