When updating records where a decimal field has a value >= 1000 (e.g. 1024), Bulk Data Updater throws "Not valid Decimal".
Example:
Input: "1,024.0"
After replacements (in pl-PL): "1,024,0" -> invalid
After replacements (in en-US): "1.024.0" -> invalid
Root cause:
StringConverters.ConvertTo replaces both . and , with the current culture’s decimal separator without handling thousand separators. The conversion logic does not strip thousand separators or use NumberStyles.AllowThousands, so formatted values like "1,024.0" cannot be parsed.
Suggested fix:
File: https://github.com/rappen/Rappen.XTB.Helper/blob/a4c40411116cf5692702ee68195f89c8de87e526/Rappen.XRM.Helpers/Extensions/StringConverters.cs
Replace:
case AttributeTypeCode.Decimal:
if (decimal.TryParse(textdecimal, out decimal decimalvalue))
{
return decimalvalue;
}
break;
With:
case AttributeTypeCode.Decimal:
if (decimal.TryParse(
text,
NumberStyles.Number | NumberStyles.AllowThousands,
CultureInfo.CurrentCulture,
out decimal decimalvalue))
{
return decimalvalue;
}
break;
System.Exception:
Not valid Decimal
Bulk Data Updater
- Rappen.XRM.Helpers.Extensions.StringConverters.ConvertTo(String text, Nullable`1 attributetypecode, AttributeMetadata metadata)
- Cinteros.XTB.BulkDataUpdater.BulkDataUpdater.GetUpdateRecord(Entity record, List`1 attributes, Int32 sequence)
- Cinteros.XTB.BulkDataUpdater.BulkDataUpdater.UpdateRecordsWork(BackgroundWorker bgworker, DoWorkEventArgs workargs, IEnumerable`1 includedrecords, JobExecuteOptions executeoptions, Boolean isn, BDULogRun log)
- Cinteros.XTB.BulkDataUpdater.BulkDataUpdater.<>c__DisplayClass53_0.<UpdateRecords>b__4(BackgroundWorker bgworker, DoWorkEventArgs workargs)
- System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
- System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
- XrmToolBox Version: 1.2025.7.71
- BulkDataUpdater Version: 1.2025.8.1
- DB Version: 9.2.25081.226
- Deployment: Online
When updating records where a decimal field has a value >= 1000 (e.g. 1024), Bulk Data Updater throws "Not valid Decimal".
Example:
Input: "1,024.0"
After replacements (in pl-PL): "1,024,0" -> invalid
After replacements (in en-US): "1.024.0" -> invalid
Root cause:
StringConverters.ConvertToreplaces both . and , with the current culture’s decimal separator without handling thousand separators. The conversion logic does not strip thousand separators or useNumberStyles.AllowThousands, so formatted values like "1,024.0" cannot be parsed.Suggested fix:
File: https://github.com/rappen/Rappen.XTB.Helper/blob/a4c40411116cf5692702ee68195f89c8de87e526/Rappen.XRM.Helpers/Extensions/StringConverters.cs
Replace:
With: