AnsweredAssumed Answered

2.5 Issue with Feature Service Editing Updates window

Question asked by mjk5000 on Feb 7, 2020
Latest reply on Feb 21, 2020 by mjk5000
protected async override void OnClick()
        {
            try
            {
                await QueuedTask.Run(async () =>
                {
                    Inspector selectedItemInspr = new Inspector();
                    selectedItemInspr = await FeatureServiceManagement.GetFirstSelectedItem();

                    if (!selectedItemInspr.IsNullOrEmpty() && !selectedItemInspr.Shape.IsNullOrEmpty())
                    {
                        FeatureLayer FieldFeatureLayer = FeatureServiceManagement.GetFeatureLayer("Field");

                        if (FieldFeatureLayer != null)
                        {
                            EditOperation CreateCurrentOperation = new EditOperation
                            {
                                Name = "Create Field Button"
                            };

                            //Create a feature with a polygon
                            CreateCurrentOperation.Create(FieldFeatureLayer, selectedItemInspr.Shape);
//THIS IS HUNG
                            CreateCurrentOperation.Execute();
                        }
                    }
                });
            }
            catch (Exception e)
            {
                LogError("CreateField - OnClick", e);
            }
        }

I just installed 2.5 and have begun to test my addin and have run into a problem right away.  I have a button that creates a feature based on a selected feature using an Edit operation.  After the Execute() command is run, it looks like the warning box for editing updates might be blocking the UI.  It just sits and spins waiting for the Execute command to finish.

 

Outcomes