• Thomas Lettieri
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 9
    Replies
I want to insert (using the dataloader with a csv file the dataloader generated) a set of Object A, and then insert (in the same way) a set of Object B which has a lookup to Object A

When inserting if I include the id it fails because it is an invalid type of ID (ID is org specific and I am transfering between two orgs).

Is there anyway of using data loader on objects that have lookups?  I cannot change the original records so I cannot use external IDs.
I just started using the migration tool and got the custom object retrieval working fairly quickly.  The problem is when I go to deploy I get an error on every fields and an All field that is not a field of the object 

Here is the error:
All Component Failures:
1.  objects/My_Object__c.object (My_Object__c.My_Field__c) -- Error: Not in package.xml
2.  objects/My_Object__c.object (My_Object__c.All) -- Error: Not in package.xml


Here is package.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>z87__My_Object__c</members>
        <name>CustomObject</name>
    </types>
    <version>36.0</version>
</Package>


 
I just started using the migration tool and got the custom object retrieval working fairly quickly.  The problem is when I go to deploy I get an error on every fields and an All field that is not a field of the object 

Here is the error:
All Component Failures:
1.  objects/My_Object__c.object (My_Object__c.My_Field__c) -- Error: Not in package.xml
2.  objects/My_Object__c.object (My_Object__c.All) -- Error: Not in package.xml


Here is package.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>z87__My_Object__c</members>
        <name>CustomObject</name>
    </types>
    <version>36.0</version>
</Package>


 

I am integrated REST API (v20.0) in my Android application, as per current requirement i would like to upload image from Android application to custom object (in custom field, where datatype is Rich Text Area)...

 

As per current implementation i am getting error message: Invalid encoding specified:  base64. The base64 is the only supported encoding.","errorCode":"INVALID_DATA_URI"

 

Android Code:

// Here 'imgBytes' object is nothing but compressed image data
String encodedImage = Base64.encodeToString(imgBytes, Base64.DEFAULT);

// Put base64 image data with image tag in JSON object parameter
data.put("Meter_Reading_Picture__c", "<img src=\"data:image/jpeg; base64," + encodedImage + "></img>");

// ....
post.setHeader("Authorization", "OAuth " + myTokens.get_access_token());
post.setHeader("Content-type", "application/json");

// ...
// execuating Http request

 

Any help/pointer on this would be gretly appriciated - thank you.

 

I can upload encoded image data using v19 of the API.  Any idea what the change is that I am missing?  I get the following error: 

 

Invalid data specified, the provided data does not seem to be a valid image: [B@574b1c

and

INVALID_DATA_URI

 

Again, if I use v20/21 I get the error, if I use v19 then all goes well and I see my image.

 

Thanks