You need to sign in to do that
Don't have an account?
Perl API - Data Issues - Text/Numeric fields
I found a problem when trying to create some 'text' fields that should only hold numeric values.
For example - PostalCode. I try and set with a Zip code, and get:
<errors>
<fields xsi:null="true"/>
<message>Value 12563 not of required type string on field PostalCode</message>
<statusCode>INVALID_TYPE_ON_FIELD_IN_RECORD</statusCode>
</errors>
I get the same error on other 'text' fields that need a numeric value. I found a work around by adding a 'space' character to the end of the string but assume this is something that needs to get fixed.
Thanks
Nigel
it should work if you specify the type as string, the parser tries to guess the encoding type unless one is specified and a numeric gets turned into a number.
i use
field => $sf->type('string',$var)
nstead of
field => $var
to ensure that the serializer knows what type i intend.