We use SOAP-API and Perl to transmit data from our web shop to Salesforce and Financial Force. To save invoices and related line items we use FF objects c2g__codaInvoice__c
and c2g__codaInvoiceLineItem__c
.
I added new field Cost_Price__c
to c2g__codaInvoiceLineItem__c
. Field type is Number (9,2). In SOAP WSDL it is defined as xsd:double (like all other price fields). When I try to transmit a line item with a decimal value for Cost_Price__c
following error occurs:
{
'success' => 'false',
'errors' => {
'fields' => 'Cost_Price__c',
'statusCode' => 'INVALID_TYPE_ON_FIELD_IN_RECORD',
'message' => 'Cost Price: value not of required type: 10.740658'
}
The line item:
{
'FF_Flat_fee__c' => 'false',
'c2g__Product__c' => '01t90000001TRETAA4',
'Discount__c' => '0.00',
'c2g__DeriveUnitPriceFromProduct__c' => 'false',
'Cost_Price__c' => '10.74',
'c2g__TaxCode1__c' => 'a1d90000000ulx6AAA',
'c2g__Quantity__c' => 1,
'c2g__UnitPrice__c' => '15.24',
'c2g__Invoice__c' => 'a0zN0000001eUEIIA2',
'FF_Price_Before_Discount__c' => '15.24',
'CurrencyIsoCode' => 'USD',
'c2g__SetTaxCode1ToDefault__c' => 'false',
'c2g__CalculateTaxValue1FromRate__c' => 'true',
'c2g__LineDescription__c' => '2 Official TNUs'
}
Why I can't store value 10.74 to a field of type Number (9,2)?
10.740658
instead of just10.74
? I'm wondering if the four extra numbers are causing a problem.Cost_Price__c
field defined in the WSDL file?