• ianb1469
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hey,

 

Hopefully someone out there can help me on this (and is alertly reading this dev board).

 

I have a Perl script that uses WWW::Salesforce to read data in from a SFDC org, do a whole bunch of transformation, and write data back in via upsert().  The structure and flow all seems fine, and all aspects of SFDC connectivity are functional.  EXCEPT when trying to write non-ASCII chars back to SF.  The use case is as follows:

 

1. Use 'query()' to pull a record from a custom Salesforce object.  The record's Name is 'Québec'.  Note the accented char, whose hex value appears to be 'c3a9' by the time it is pulled into my Perl script.

 

2. Assign this value to the Name field of a brand new record of another custom SF object, and use 'upsert()' to write this record to Salesforce.

 

This fails, with the following information in $result->envelope->{Body}->{upsertResponse}->{result}->{errors}:

 

errors->{fields} : Name

errors->{message} : <objLabel>: value not of required type: core.filemanager.ByteBlobValue@<hexNum>

errors->{statusCode} : INVALID_TYPE_ON_FIELD_IN_RECORD

 

I have tried encoding and decoding the field six ways to Sunday, using everything available in the Encode module (ascii, ascii-ctrl, iso-8859-1, null, utf-8-strict, utf-8), to no avail.  I even tried HTML::Entities and 'encode_entities()', but that changes the accented 'e' character to '&eacute;' which then gets passed verbatim to SF, which clearly I don't want (and should have expected).

 

My WWW::Salesforce module version is 0.12.

 

How can I get fields with characters like this into Salesforce from my Perl script?

 

Thanks.

 

 

 

  • January 06, 2011
  • Like
  • 0