CustomMetadataLoader icon indicating copy to clipboard operation
CustomMetadataLoader copied to clipboard

Error loading CustomMetadata records with null values for Number fields

Open wpiedrahita opened this issue 8 years ago • 2 comments

Error Message detail

Web service callout failed: WebService returned a SOAP Fault: '' is not valid for the type xsd:double faultcode=soapenv:Client faultactor= El error está en la expresión '{!upsertCustomMetadata}' del componente apex:commandButton en page custommetadatarecorduploader: Class.MetadataService.MetadataPort.upsertMetadata: line 9261, column 1 Class.MetadataUtil.upsertMetadataAndValidate: line 131, column 1 Class.MetadataUtil.transformToCustomMetadataAndCreateUpdate: line 97, column 1 Class.CustomMetadataUploadController.importCSVFileAndCreateUpdateCmdRecords: line 127, column 1 Class.CustomMetadataUploadController.upsertCustomMetadata: line 52, column 1

wpiedrahita avatar Feb 17 '17 07:02 wpiedrahita

It's not just Number fields. Any field without a value will be ignored which means all other values will shift left and get populated in the wrong field.

michellebaeten avatar Feb 13 '19 14:02 michellebaeten

I've proposed a simple fix here, which works for me. Interested to hear if it breaks anything else?

https://github.com/forcedotcom/CustomMetadataLoader/commit/1a6c01a51c462ec3b67f3d5ff5f7e3aa74a62e73

alex-wilson-gwf avatar Apr 27 '23 05:04 alex-wilson-gwf