You need to sign in to do that
Don't have an account?
Perl API - Update Issues
I am using the Perl API Salesforce.pm to update data in the 'account' data type. I can update the 'Name' field no problem. It works perfectly.
Also in the 'Account' table is a customer custom field 'Client_ID__C'. Whenever I try to update that field, I get an update return result of 1 but the field does not get updated.
If I try to update both the Name and Client_ID_C field, I still get a return of 1 but neither field gets updated. Shouldn't there be an error return if the update does not happen?
Is this a permissions issue or an API issue? If we login via the web interface with the same account/password we can update these fields. Help?
The best way to help us investigate these types of issues is to collect and post a trace of the XML message; by passing your request through a XML proxy (or if Perl provides similar debugging tools) you can generate a copy of the XML request.
The alternative is to modify the Java quickstart to just ping/update the field you are referencing; that would at least narrow down the scope of the issue.
> use SOAP::Lite +trace => 'debug';
Then let's see the code being generated.
Also, the update function distributed through the Salesforce-0.55 tar file is not functional. However, if you check out the latest code from CVS, you will find update in good working order (however, I still need to define all the datatypes so SOAP::Lite nows how to serialize each object correctly - since there is no strong data typing in Perl, introspection doesn't tell me enough to serialize a SCALAR into a xsd:string, or xsd:float and what not)...
In any event, I am working on documenting the code right now and should release something in the next week or two.
Byrne/Adam,
I turned on the trace and I get an INVALID_TYPE_ON_FIELD_IN_RECORD error. I believe this field is set to hold a numeric value. Using the API 'query' call to list existing account records, id, name and client_id__c returns:
00130000001DDkZAAW - Carlton Consulting - 10093743
00130000001DDkaAAG - Dolphin Quest/Quest Global Management - 10092896
00130000001DDkbAAG - MindTools, Inc. - 10013878
00130000001DDkcAAG - The Roof Guys Inc. - 1000124
00130000001DDkdAAG - Sys/admin Inc. - 9500622
Here is the trace output.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
<soapenv:Body>
<updateResponse xmlns="urn:partner.soap.sforce.com">
<result>
<errors>
<fields xsi:null="true"/>
<message>Value 11093743 not of required type string on field Client_ID__c</message>
<statusCode>INVALID_TYPE_ON_FIELD_IN_RECORD</statusCode>
</errors>
<id xsi:null="true"/>
<success>false</success>
</result>
</updateResponse>
</soapenv:Body>
</soapenv:Envelope>
Now if I change the value to update to 'abcdefg' it WORKS PERFECTLY. So somehow, this field can be set to a numeric (probably textual numeric) value through the web interface but can only be set as an alphanumeric/string via the API.
I guess we need to make sure the field Client_ID__c is defined as numeric.