Problem using data loader to load csv page data to skuid__Page__c, "null" prepended to skuid__UniqueId__c

  • 1
  • Problem
  • Updated 2 years ago
In order to migrate page data between Salesforce orgs, we exported the data on object skuid__Page__c to a csv file, and import it to the target org.

During first upsert, it finished without error, but "null" prepended to skuid__UniqueId__c.
2nd time upsert, it will throw error below and upsert failed:

2015-04-10 15:38:21,248 ERROR [Upsert_skuid__Page__c] client.PartnerClient processResult (PartnerClient.java:432) - Errors were found on item1
2015-04-10 15:38:21,248 ERROR [Upsert_skuid__Page__c] client.PartnerClient processResult (PartnerClient.java:434) - Error code is:DUPLICATE_VALUE
2015-04-10 15:38:21,248 ERROR [Upsert_skuid__Page__c] client.PartnerClient processResult (PartnerClient.java:435) - Error message:duplicate value found: unknown duplicates value on record with id: a3pZ00000001PHW Could you please help?
Photo of Jason Guan

Jason Guan

  • 160 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Greg Jarrett

Greg Jarrett

  • 3,496 Points 3k badge 2x thumb
Hi Jason, is there a special reason why you are using Dataloader? The best way I've found to import/export pages is outlined in this tutorial which uses the standard skuid functions to import/export: http://help.skuidify.com/m/page-assignments-and-overrides/l/102531-export-all-pages-and-import-pages
Photo of Jason Guan

Jason Guan

  • 160 Points 100 badge 2x thumb
Thanks for quick reply.

We are currently using the tool you mentioned, but it does not provide source control, and it cannot be automated.

We are trying to automate the source control, import/export with data loader. but the trigger on skuid__Page__c prepended the "null" in the external id field skuid__UniqueId__c.

When using data loader for 2nd time, the dirty external id does not recognize the data as update but instead trying to insert the record again, which will result in duplicated page name error above.
(Edited)
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Jason,  this is an interesting problem. 

We think that your data loader tool is incorrectly prepending the string 'null' to the field skuid__UniqueId__c.    When no module name is defined for a page,  our code passes in an empty string.  Can you make sure that the CSV that is created by your data loader has this empty string at the beginning fo the UniqueId__c field?  
 
Another alternative would be to add a module name to your pages.  We believe this will get around the problem entirely. 
Photo of Jason Guan

Jason Guan

  • 160 Points 100 badge 2x thumb
Thanks Rob.
Adding a module name to the pages resolved the issue.
We didn't specify any module value for our pages, and the Page UI does not make it mandatory neither.

I think it will be nice to make it mandatory since it's working with the page name as a unique Id.

Anyways, after we specified module names, the CI tool we created works as expected.
(Edited)
Photo of Christian Camacho

Christian Camacho

  • 60 Points
Hi,

I am facing the same exact error.
We receive leads, those leads get dumped into a SQL Database, then from there, we have a process that uses DataLoader and drops the leads into SALESFORCE, this process is working for all our customers but "1", and we get the PartnerClient.java:435 error, any idea why?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
What data loading tool are you using? 
Photo of Jason Guan

Jason Guan

  • 160 Points 100 badge 2x thumb
We are using Salesforce's DataLoader, can be downloaded from Setup>Data Management>Data Loader.

We are also using tooling api, Jenkins and git to regularly pull skuid page changes and save to git, then use dataloader to push changes to target org on demand.
Photo of Jaime

Jaime

  • 1,220 Points 1k badge 2x thumb
Hey Jason can you give more details on how you are doing this? I have a similar requirement to get pages into a code repository and push to other environments.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
That sounds very cool.