You need to sign in to do that
Don't have an account?
jiri1.3966104396934639E12
INVALID_TYPE_ON_FIELD_IN_RECORD for integer value
Hi,
I'm trying to do upserts progrmatically. For some reason I'm getting an INVALID_TYPE_ON_FIELD_IN_RECORD error for integer fields.
For example 5267 is reported as invalid value for field PaperID__c (see below).
I¨m quite buffled by this.
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Header><sforce:SessionHeader xmlns:sforce="urn:partner.soap.sforce.com"><sessionId xsi:type="xsd:string">00Dg0000003LRFz!ARAAQGWdG_dr.Ia_2V3QWeFZb7jWZJkn23A905ygVgvCN8_6MjC8aaqrBujiH4Gtp0_wUKzWW8HDr4CeIjqsOjaiobVp6VhH</sessionId></sforce:SessionHeader></soap:Header><soap:Body><sforce:upsert xmlns:sfons="urn:sobject.partner.soap.sforce.com" xmlns:sforce="urn:partner.soap.sforce.com">
<sforce:externalIDFieldName xsi:type="xsd:string">PaperID__c</sforce:externalIDFieldName>
<sObjects xsi:type="sforce:Account">
<sforce:PaperID__c xsi:type="xsd:int">5267</sforce:PaperID__c>
<sforce:name xsi:type="xsd:string">Test test5eeerreedede</sforce:name>
<sforce:type xsi:type="xsd:string">0</sforce:type><sforce:fieldsToNull xsi:type="xsd:string">website</sforce:fieldsToNull>
<sforce:fieldsToNull xsi:type="xsd:string">country__c</sforce:fieldsToNull>
<sforce:fieldsToNull xsi:type="xsd:string">papertype__c</sforce:fieldsToNull></sObjects>
</sforce:upsert></soap:Body></soap:Envelope>
I'm trying to do upserts progrmatically. For some reason I'm getting an INVALID_TYPE_ON_FIELD_IN_RECORD error for integer fields.
For example 5267 is reported as invalid value for field PaperID__c (see below).
I¨m quite buffled by this.
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Header><sforce:SessionHeader xmlns:sforce="urn:partner.soap.sforce.com"><sessionId xsi:type="xsd:string">00Dg0000003LRFz!ARAAQGWdG_dr.Ia_2V3QWeFZb7jWZJkn23A905ygVgvCN8_6MjC8aaqrBujiH4Gtp0_wUKzWW8HDr4CeIjqsOjaiobVp6VhH</sessionId></sforce:SessionHeader></soap:Header><soap:Body><sforce:upsert xmlns:sfons="urn:sobject.partner.soap.sforce.com" xmlns:sforce="urn:partner.soap.sforce.com">
<sforce:externalIDFieldName xsi:type="xsd:string">PaperID__c</sforce:externalIDFieldName>
<sObjects xsi:type="sforce:Account">
<sforce:PaperID__c xsi:type="xsd:int">5267</sforce:PaperID__c>
<sforce:name xsi:type="xsd:string">Test test5eeerreedede</sforce:name>
<sforce:type xsi:type="xsd:string">0</sforce:type><sforce:fieldsToNull xsi:type="xsd:string">website</sforce:fieldsToNull>
<sforce:fieldsToNull xsi:type="xsd:string">country__c</sforce:fieldsToNull>
<sforce:fieldsToNull xsi:type="xsd:string">papertype__c</sforce:fieldsToNull></sObjects>
</sforce:upsert></soap:Body></soap:Envelope>
Ramu_SFDC
Hi, replace "xsd:int" to "xsd:integer" hope that will fix the problem.
Superfell
Custom number fields are xsd:double or xsd:decimal not xsd:int. check what the wsdl says the field type is.