0

We are developing a small external program in C# to migrate records between Salesforce organizations using the Bulk API. The data submitted to Salesforce use the XML format.

Our issue is that for some fields (so far the issue appears with Long Text fields) the data contains "=" signs. Salesforce fails these records indicating that it cannot parse the request. We have attempted to do an Html encode, but that does not encrypt "=" signs, we also did a replace of "=" with the html standard of "=". For the latter Salesforce says that it does not recognize "equals".

Are there any other suggestions regarding illegal characters when using the Bulk API and workarounds?

  • 2
    Can you add a sample sObject to the question from your XML file? – Daniel Ballinger Oct 10 '16 at 19:09
2

I was able to successfully create a new Contact via the Bulk API where the Description field had the = character. The Description field in this case is the data type "Long Text Area(32000)".

The Batch XML data was:

<?xml version="1.0" encoding="UTF-8"?>
<sObjects xmlns="http://www.force.com/2009/06/asyncapi/dataload">
    <sObject>
        <FirstName>Deployment</FirstName>
        <LastName>Fish</LastName>
        <Description>This Description has an = symbol in it.</Description>
    </sObject>
</sObjects>

The ContentType for the POST request was set to:

application/xml; charset=UTF-8

The job completed and a new Contact was created with the expected data.

Maybe you have an issue with the character set? Or the problem might be close to the equal symbol, such as an escape character.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.