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

Error while loading rows #156

Closed BenediktBergmann closed 2 years ago

BenediktBergmann commented 2 years ago

In the latest version of BDU I get the error you can see further down whenever I try to load rows (starting or returning some selection from FetchXML Builder) from an onPrem 8.2 (Microsoft Dynamics 365 Version 1612 (8.2.1.176) (DB 8.2.1.176) on-premises) environment. It does work when I switch back to the previous version.

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 Rappen.XTB.Helpers.ControlItems.AttributeMetadataItem.GetType()
   at Rappen.XTB.Helpers.ControlItems.AttributeMetadataItem.ToString()
   at System.Windows.Forms.Formatter.FormatObject(Object value, Type targetType, TypeConverter sourceConverter, TypeConverter targetConverter, String formatString, IFormatProvider formatInfo, Object formattedNullValue, Object dataSourceNullValue)
   at System.Windows.Forms.ListControl.GetItemText(Object item)
   at System.Windows.Forms.ComboBox.ItemComparer.Compare(Object item1, Object item2)
   at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4420.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
XrmToolBox
    Assembly Version: 1.2022.2.54
    Win32 Version: 1.2022.2.54
    CodeBase: file:///C:/Program%20Files%20(x86)/XrmToolBox/XrmToolBox.exe
----------------------------------------
XrmToolBox.Extensibility
    Assembly Version: 1.2022.2.54
    Win32 Version: 1.2022.2.54
    CodeBase: file:///C:/Program%20Files%20(x86)/XrmToolBox/XrmToolBox.Extensibility.DLL
----------------------------------------
Rappen.XTB.BDU
    Assembly Version: 1.2022.2.1
    Win32 Version: 1.2022.02.001
    CodeBase: file:///C:/WORK/XRMTOOLBOX/PLUGINS/RAPPEN.XTB.BDU.DLL
----------------------------------------

I used the following fetchXml

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="salesorder">
    <attribute name="name" />
    <attribute name="customerid" />
    <attribute name="statuscode" />
    <attribute name="totalamount" />
    <attribute name="xx_salestype" />
    <attribute name="xx_orderdate" />
    <attribute name="xx_ordernumber" />
    <attribute name="ownerid" />
    <attribute name="xx_products" />
    <attribute name="statecode" />
    <attribute name="xx_contact" />
    <attribute name="xx_businesssupport" />
    <attribute name="xx_businesssupport2" />
    <attribute name="salesorderid" />
    <order attribute="name" descending="false" />
    <filter type="and">
      <condition attribute="xx_lastsyncedtonav" operator="on-or-after" value="2021-12-22" />
    </filter>
    <link-entity name="account" from="accountid" to="customerid" visible="false" link-type="outer">
      <attribute name="xx_navcompany" />
    </link-entity>
  </entity>
</fetch>

I does not work with an easier one either

<fetch top="100">
  <entity name="account" />
</fetch>
rappen commented 2 years ago

Aouch. I have a beta - can you please try this? I don't have access to this version... https://1drv.ms/u/s!AjplCnpZdSjqn6VuHOFQohv2SNcFbg?e=v4USt9

BenediktBergmann commented 2 years ago

With the beta it does work again.

rappen commented 2 years ago

Awesome. Release is coming soon...

rappen commented 2 years ago

Fixed by https://github.com/rappen/Rappen.XTB.Helper/commit/c32dd364a5ce56b47682aec2cc0901d4abe78be1