forcedotcom / CustomMetadataLoader

Tool to help users bulk create and update custom metadata records in salesforce.com from a CSV file.
Other
166 stars 133 forks source link

Error when loading a relationship field #82

Open AndiMcLaughlin opened 3 years ago

AndiMcLaughlin commented 3 years ago

I have a zip code metadata type that has a reference field referencing a city relationship metadata type. i was abe to load my records for the city file with city and state but the zip code file referencing the city record is giving me this error. Do I need to use a different API field name or use API name as data value or is it not possible to load mdt records with a relationship to another metadata record field? Very much appreciate a response as this is the file I really do not want to load manually!

Web service callout failed: WebService returned a SOAP Fault: Must specify the name in the CustomMetadataType.CustomMetadata format, Current Name: Council_City_Zip., Required Delimiter: . faultcode=soapenv:Client faultactor= Error is in expression '{!upsertCustomMetadata}' in component in page custommetadatarecorduploader: Class.MetadataService.MetadataPort.upsertMetadata: line 9261, column 1 Class.MetadataUtil.upsertMetadataAndValidate: line 158, column 1 Class.MetadataUtil.transformToCustomMetadataAndCreateUpdate: line 124, column 1 Class.CustomMetadataUploadController.importCSVFileAndCreateUpdateCmdRecords: line 144, column 1 Class.CustomMetadataUploadController.upsertCustomMetadata: line 52, column 1

An unexpected error has occurred. Your development organization has been notified.

AndiMcLaughlin commented 3 years ago

My error actually may have been because I was trying to use label for a text field that started with a number. I'm more Admin that dev so Ithere may be a easier way but I was able to use the tool by loading the DeveolperName and then reloading the file with both DeveloperName and Label to update. This was still a better solution than loading all the zip code files manually!