Skip to content

Commit 111aa0b

Browse files
Submit was not working for objects calling the submit method itself.
Its the case of offlinedatabase that for gxconfirmsync entrypoint calls the method this.executeSubmit.
1 parent 3ae5c21 commit 111aa0b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

dotnet/src/dotnetframework/GxClasses/Model/GXBaseObject.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,10 @@ protected virtual void ExecutePrivateCatch(object stateInfo)
5555
}
5656
protected void SubmitImpl()
5757
{
58-
context = new GxContext();
59-
DataStoreUtil.LoadDataStores(context);
60-
IsMain = true;
61-
context.SetSubmitInitialConfig(context);
62-
initialize();
63-
Submit(ExecutePrivateCatch, this);
58+
GXBaseObject newInstance = (GXBaseObject)Activator.CreateInstance(GetType());
59+
newInstance.context.SetSubmitInitialConfig(context);
60+
newInstance.initialize();
61+
Submit(ExecutePrivateCatch, newInstance);
6462
}
6563

6664
protected virtual void CloseCursors()

0 commit comments

Comments
 (0)