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

Not able to upload CSV for Unmanaged Org #3

Closed sankalp-jhingran closed 7 years ago

sankalp-jhingran commented 8 years ago

Web service callout failed: WebService returned a SOAP Fault: Unknown SObject Namespace for Metadata Error Id: 144931985-272582 (-768177128) faultcode=soapenv:Server faultactor= Error is in expression '{!upsertCustomMetadata}' in component apex:commandButton in page goc:custommetadatarecorduploader: Class.goc.MetadataService.MetadataPort.upsertMetadata: line 9261, column 1 Class.goc.MetadataUtil.upsertMetadataAndValidate: line 131, column 1 Class.goc.MetadataUtil.transformToCustomMetadataAndCreateUpdate: line 97, column 1 Class.goc.CustomMetadataUploadController.importCSVFileAndCreateUpdateCmdRecords: line 127, column 1 Class.goc.CustomMetadataUploadController.upsertCustomMetadata: line 52, column 1

sankalp-jhingran commented 8 years ago

The same error is also coming from a managed package org with domain enabled.

sricharananand commented 8 years ago

Hi, Have you created Remote Site Setting on the orgs?

sankalp-jhingran commented 8 years ago

Yes I did. The error seems to be coming when using relationship field in custom metadata type. Once I removed the relationship field, it worked fine.

You might want to fix it as relationship fields are new.

-Sankalp

sricharananand commented 8 years ago

ok - good to know - yes will fix - thanks for the info.

sricharananand commented 7 years ago

Uploading records with relationship fields should be fixed now - the fix was in the sfdc code that pushed out recently. Do let us know if you still have issues. Closing this for now.

DarrenGood commented 7 years ago

Hi there, I'm getting this error when trying to insert records with relationships. Exactly the same error (apart from the error ID). Grateful for any help. Thanks, Darren

jeffhube commented 7 years ago

@DarrenGood I'm also seeing this error and I've opened a case with Salesforce.

sricharananand commented 7 years ago

Thanks @DarrenGood and @jeffhube for bringing the issue to our attention. I see that Jeff has opened a case. Will take a look. Couple of questions - 1) was the insert of records with relationships working before and did it stop working recently? 2) Are you inserting records with relationships to other custom metadata types or to Entity and Field Definition?

DarrenGood commented 7 years ago

@sricharananand 1 - this is the first time I have used the loader 2 - the records were related to other custom metadata types

Cheers DG

DarrenGood commented 7 years ago

Has anyone had an update on this at all? Thanks, DG

michellebaeten commented 7 years ago

Hi, we're having the same issue with Lookup fields. It was working on Winter '17 but seems to have stopped working recently (assume this has something to do with Spring '17 release). Only records with Relationships to other metadata types seem to be affected. Would appreciate an update on this as this is now delaying our project.

sricharananand commented 7 years ago

Hi All - Yes, I will be taking a look at the issue this week, and should have an update soon. Apologize for the delay

michellebaeten commented 7 years ago

Hi All,

In the mean time I've written a piece of Apex that generates individual xml files in the right format and emails them so that you can then use the ANT deployment tool to deploy them. Please let me know if anyone is interested in this code. (it's done a bit quick and dirty but does the job).

Michelle

michellebaeten commented 7 years ago

Hi All,

I've just had an update from Salesforce Support saying that the issue has been fixed across all instances.

Michelle

sayanka commented 7 years ago

Hey Michelle,

Can you share the apex code..

Sayanka

michellebaeten commented 7 years ago

Hi Sayanka, This has been resolved by Salesforce so you should be able to use the metadata loader now, this means you won't need the apex code?

sayanka commented 7 years ago

Hey Michelle,

Getting the error:Error is in expression '{!upsertCustomMetadata}' in component in page custommetadatarecorduploader

michellebaeten commented 7 years ago

Hi Sayanka, Just tried it in my sandbox and it still works for me. Would you be able to attach a (sample) csv file and I can have a look? Please note that you need to put the DeveloperName in the lookup field not the ID.

It is easier to use the metadata upload tool than using apex so that's why I think it would be better to troubleshoot first before going down the apex route.

Michelle

sayanka commented 7 years ago

uploadFile.xlsx Hey Michelle, I created a test custom metadata type in which field 1 and field 2 are sample fields.Was trying to upload the csv version of the above file but error is coming for the same.

Sayanka

sayanka commented 7 years ago

Hey Michelle, Meanwhile Can you share your apex code too?.

michellebaeten commented 7 years ago

Hi Sayanka,

Just looking at the file the DeveloperName values don't look right, I think the name needs to start with a letter. I would suggest having either DeveloperName or Label in the file, the other one will then be generated automatically.

attached the instructions when using apex. As said before it's not the prettiest way of doing it and requires some manual steps, so I still think it might be worth trying to make the custom metadata loader work.

Let me know if you have any questions. ImportCustomMetadata.txt