rappen / BulkDataUpdater

Updates or touches single attributes on a set of records.
https://www.nuget.org/packages/Cinteros.XrmToolBox.BulkDataUpdater/
GNU General Public License v3.0
5 stars 5 forks source link

Unable to Filter Entities #155

Closed Reigningfear closed 2 years ago

Reigningfear commented 2 years ago

Hello,

first and foremost, thank you for your effort with this tool, it has been very helpful for me. I recently ran into an issue where I was trying to filter a custom entity and continually received this error log: " See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

** Exception Text ** System.NullReferenceException: Object reference not set to an instance of an object. at XrmToolBox.Extensibility.Worker.CancelWorker() at Cinteros.XTB.BulkDataUpdater.BulkDataUpdater.RetrieveRecords(String fetch, Action AfterRetrieve) at Cinteros.XTB.BulkDataUpdater.BulkDataUpdater.FetchUpdated(String fetch) at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1) at XrmToolBox.New.PluginForm.SendIncomingBrokerMessage(MessageBusEventArgs message) at XrmToolBox.New.NewForm.MainForm_MessageBroker(Object sender, MessageBusEventArgs message) at Cinteros.Xrm.FetchXmlBuilder.FetchXmlBuilder.ReturnToCaller() at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) " This appears to be new as I have done this sort of filtering countless times before. I did recently update the xrmtoolbox app and I believe this is the first time i've used your tools after the update.

My steps are:

  1. select entity
  2. all-attributes
  3. filter on 1 or more fields.
  4. execute - this works and shows results.
  5. 'Return FetchXML' to FetchXML Updater
  6. Immediate Error.

Please let me know if there is anything else I can provide.


rappen commented 2 years ago

Hi, I would first ask you to not use all-attributes, but select the attributes you really want instead. Does that work?

Reigningfear commented 2 years ago

It does not. I attempted to select a single attribute and send the results to Bulk Data Uploader. The error message appears to be different:

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

** Exception Text ** System.MissingMethodException: Method not found: 'Void XrmToolBox.Extensibility.PluginControlBase.ShowErrorDialog(System.Exception, System.String, System.String, Boolean)'. at Cinteros.XTB.BulkDataUpdater.BulkDataUpdater.<>cDisplayClass10_0.b1(RunWorkerCompletedEventArgs completedargs) at XrmToolBox.Extensibility.Worker.<>cDisplayClass4_0.b0(Object s, RunWorkerCompletedEventArgs e) at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)

May or may not be helpful but If I open 'Edit FetchXML' and click ok to effectively reload the query, I get the first error message I posted. I have tried complex columns attributes and simple column attributes with the same result.

Edit - When the error dialog box shows up, I choose 'quit'. and after choosing 'No' when asked to save the xml query, XRM Toolbox shows this error: xrm toolbox error

unsure if it's related or not.

rappen commented 2 years ago

Thanks, If you update then XrmToolBox to latest (1.2022.2.54), you will (probably...) get better error message.

Can I see the fetchxml you are using when it fails?

rappen commented 2 years ago

Ping @Reigningfear - any more info, or this issue should be closed? I would like to fix it if there is a bug in the tool...

rappen commented 2 years ago

Closing now - please reopen if more issues appear.