We use Perl Salesforce library WWW::Salesforce to connect our web shop via SOAP API with Salesforce and Financial Force.
For invoices we send a string with HTML code to a richtext field in c2g__InvoiceDescription__c. The string and HTML special chars like < > are not encoded in any way. This worked until some days ago. We didn't change our Perl code, but on updating we get error message:
unable to update c2g__InvoiceDescription__c for a0z2s000002AW0PAAW: Unexpected element {}table during simple type deserialization
I can set the API version in WWW::Salesforce but error seems to be independet from version.
Richtext field definition for WWW::Salesforce is
WWW::Salesforce::Constants->register_type( 'c2g__InvoiceDescription__c', 'Items__c', 'xsd:string' );
For updating invoices upsert method of API is used which gets a hash with fields and values:
{
'id' => $salesforce_id,
'Items__c' => '<table>...</table>',
}
What is the correct way to send HTML code via SOAP API to a richtext field? A simple example for sending HTML via SOAP API would be very appreciated (doesn't have to be Perl)