• fhui
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
Hi,
 
   I have been using Perl to extract information from Salesforce for a year and it works great. Recently, our Sales Department create another new table and I try to use the same Perl script to extract the data in this new table. I got the "Invalid_Field" and "No such column" error message. If I only extract the build-in field such as "Id", it works fine. But not for any non custom field. Could you help, please? The field name and the table name are right.
 
thanks,
-Florence
 
Here is the error message:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Header><SessionHeader><sessionId xsi:type="xsd:string">110400D00000000heom!q8vMwJ.Reno2tmFCtfyeNSbac9XpMz4C78CBWK6OCWlgUQOcnoXt5IGwnH10XmTzej5Mkh4MfzXd7rDtEFbCfXGhU1gqdJvkA.lsUiPruNsEjEW0k.eZd8EK9cKPCmFcuuZpUwCW</sessionId></SessionHeader><QueryOptions><batchSize xsi:type="xsd:int">200</batchSize></QueryOptions></SOAP-ENV:Header><SOAP-ENV:Body><namesp2:query xmlns:namesp2="urn:partner.soap.sforce.com"><query xsi:type="xsd:string">Select Id, Business_Unit__c from FFI_Product__c </query></namesp2:query></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
Cache-Control: private
Date: Wed, 12 Dec 2007 19:26:06 GMT
Server:
Content-Type: text/xml; charset=utf-8
Client-Date: Wed, 12 Dec 2007 19:26:07 GMT
Client-Peer: 204.14.234.40:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
Client-SSL-Cert-Subject: /C=US/ST=California/L=San Francisco/O=Salesforce.com, Inc./OU=Applications/OU=Terms of use at www.verisign.com/rpa (c)00/CN=na1-api.salesforce.com
Client-SSL-Cipher: RC4-MD5
Client-SSL-Warning: Peer certificate not verified
Client-Transfer-Encoding: chunked
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <soapenv:Fault>
   <faultcode>soapenv:Server</faultcode>
   <faultstring>INVALID_FIELD:
Select Id, Business_Unit__c from FFI_Product__c
           ^
ERROR at Row:1:Column:12
No such column &apos;Business_Unit__c&apos; on entity &apos;FFI_Product__c&apos;. If you are attempting to use a custom field, be sure to append the &apos;__c&apos; after the custom field name. Please reference your WSDL or the describe call for the appropriate names.</faultstring>
   <detail>
    <sf:fault xsi:type="sf:InvalidFieldFault" xmlns:sf="urn:fault.partner.soap.sforce.com">
     <sf:exceptionCode>INVALID_FIELD</sf:exceptionCode>
     <sf:exceptionMessage>
Select Id, Business_Unit__c from FFI_Product__c
           ^
ERROR at Row:1:Column:12
No such column &apos;Business_Unit__c&apos; on entity &apos;FFI_Product__c&apos;. If you are attempting to use a custom field, be sure to append the &apos;__c&apos; after the custom field name. Please reference your WSDL or the describe call for the appropriate names.</sf:exceptionMessage>
    </sf:fault>
   </detail>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>
 
 
  • December 12, 2007
  • Like
  • 0
Hi,
 
   I wrote a very simple perl script to access some information from Salesforce. The script works well in my desktop but it doesn't work in the server. The server platform is Windows 2000 Terminal. Below is the error message, anyone can give me a hint??
 
500 Can't locate object method "new" via package "LWP::Protocol::https::Socket"
(perhaps you forgot to load "LWP::Protocol::https::Socket"?) at C:/Perl/site/lib
/Salesforce.pm line 52
 
thanks,
-Florence
  • November 14, 2007
  • Like
  • 0
I have a problem to update a custom field in Date type with Perl. When I run the query to select some custom fields, all the fields of the return hash are strings even some of the fields are Date type. If I try to update the field which suppose to be Date type, it return the error message "INVALID_TYPE_ON_FIELD_IN_RECORD". Any suggestion??
 
Below is my code :
sub test
{
my $result, $nw_designerId;
my $q2 = "Select Id, FA_Reason__c, FA_Status__c, FA_Design_Owner__c, FA_Completed_Date__c from FA__c where Name = 'FA070427-000181'";
$result = $port->query('query' => $q2, 'limit' => '200');
print "We got " . $result->valueof('//queryResponse/result/size') . " back.\n";
foreach my $elem ($result->valueof('//queryResponse/result/records')) {
 print "$elem->{Id}, $elem->{FA_Reason__c}, $elem->{FA_Status__c}, $elem->{FA_Design_Owner__c}, $elem->{FA_Completed_Date__c} \n";
 $elem->{FA_Status__c} = "Open";
 $elem->{FA_Completed_Date__c} = '2006-12-19T19:51:12.174Z';
 my $foo = $port->update(%{$elem});
 print "$foo\n"; # should print "1" if $port->update() succeeded.
 }
}
 
Here is the error message :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>
 <SOAP-ENV:Header
 >
   <SessionHeader
   >
     <sessionId xsi:type="xsd:string"
     >qDb2EUAjvgXw.LCb0f0L2NKx.BWxDv7gz3bcv_ZG7kgNuN6hbwE5EFaQtw_oR3obk4geuh36LW6VeH7JQ42op6QN9vOJezg802hoRYiHuRHjAF3vhkCDbMBZDURxjIkv4b4A8wCU</sessionId></SessionHeader></SOAP-ENV:Header>
 <SOAP-ENV:Body
 >
   <sforce:update xmlns:sfons="urn:sobject.partner.soap.sforce.com" xmlns:sforce="urn:partner.soap.sforce.com"
   >
     <sObjects xsi:type="sforce:FA__c"
     >
       <sforce:Id xsi:null="1" xsi:type="sforce:ID"/>
       <sforce:FA_Reason__c xsi:type="xsd:string"
       >Initial FA</sforce:FA_Reason__c>
       <sforce:FA_Status__c xsi:type="xsd:string"
       >Open</sforce:FA_Status__c>
       <sforce:Id xsi:type="xsd:string"
       >a0530000002fL8ZAAU</sforce:Id>
       <sforce:FA_Design_Owner__c xsi:type="xsd:string"
       >00530000000swzaAAA</sforce:FA_Design_Owner__c>
       <sforce:FA_Completed_Date__c xsi:type="xsd:string"
       >2006-12-19T19:51:12.174Z</sforce:FA_Completed_Date__c></sObjects></sforce:update></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Cache-Control: private
Date: Tue, 21 Aug 2007 21:52:00 GMT
Server:
Content-Type: text/xml; charset=utf-8
Client-Date: Tue, 21 Aug 2007 21:52:01 GMT
Client-Peer: 204.14.234.40:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
Client-SSL-Cert-Subject: /C=US/ST=California/L=San Francisco/O=Salesforce.com, Inc./OU=Applications/OU=Terms of use at www.verisign.com/rpa (c)00/CN=na1-api.salesforce.com
Client-SSL-Cipher: RC4-MD5
Client-SSL-Warning: Peer certificate not verified
Client-Transfer-Encoding: chunked
<?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>FA_Completed_Date__c</fields>
    <message>FA Completed Date: value not of required type: 2006-12-19T19:51:12.174Z</message>
    <statusCode>INVALID_TYPE_ON_FIELD_IN_RECORD</statusCode>
   </errors>
   <id xsi:null="true"/>
   <success>false</success>
  </result>
 </updateResponse>
 </soapenv:Body>
</soapenv:Envelope>
  • August 21, 2007
  • Like
  • 0
Hi,
 
   I have been using Perl to extract information from Salesforce for a year and it works great. Recently, our Sales Department create another new table and I try to use the same Perl script to extract the data in this new table. I got the "Invalid_Field" and "No such column" error message. If I only extract the build-in field such as "Id", it works fine. But not for any non custom field. Could you help, please? The field name and the table name are right.
 
thanks,
-Florence
 
Here is the error message:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Header><SessionHeader><sessionId xsi:type="xsd:string">110400D00000000heom!q8vMwJ.Reno2tmFCtfyeNSbac9XpMz4C78CBWK6OCWlgUQOcnoXt5IGwnH10XmTzej5Mkh4MfzXd7rDtEFbCfXGhU1gqdJvkA.lsUiPruNsEjEW0k.eZd8EK9cKPCmFcuuZpUwCW</sessionId></SessionHeader><QueryOptions><batchSize xsi:type="xsd:int">200</batchSize></QueryOptions></SOAP-ENV:Header><SOAP-ENV:Body><namesp2:query xmlns:namesp2="urn:partner.soap.sforce.com"><query xsi:type="xsd:string">Select Id, Business_Unit__c from FFI_Product__c </query></namesp2:query></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
Cache-Control: private
Date: Wed, 12 Dec 2007 19:26:06 GMT
Server:
Content-Type: text/xml; charset=utf-8
Client-Date: Wed, 12 Dec 2007 19:26:07 GMT
Client-Peer: 204.14.234.40:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
Client-SSL-Cert-Subject: /C=US/ST=California/L=San Francisco/O=Salesforce.com, Inc./OU=Applications/OU=Terms of use at www.verisign.com/rpa (c)00/CN=na1-api.salesforce.com
Client-SSL-Cipher: RC4-MD5
Client-SSL-Warning: Peer certificate not verified
Client-Transfer-Encoding: chunked
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <soapenv:Fault>
   <faultcode>soapenv:Server</faultcode>
   <faultstring>INVALID_FIELD:
Select Id, Business_Unit__c from FFI_Product__c
           ^
ERROR at Row:1:Column:12
No such column &apos;Business_Unit__c&apos; on entity &apos;FFI_Product__c&apos;. If you are attempting to use a custom field, be sure to append the &apos;__c&apos; after the custom field name. Please reference your WSDL or the describe call for the appropriate names.</faultstring>
   <detail>
    <sf:fault xsi:type="sf:InvalidFieldFault" xmlns:sf="urn:fault.partner.soap.sforce.com">
     <sf:exceptionCode>INVALID_FIELD</sf:exceptionCode>
     <sf:exceptionMessage>
Select Id, Business_Unit__c from FFI_Product__c
           ^
ERROR at Row:1:Column:12
No such column &apos;Business_Unit__c&apos; on entity &apos;FFI_Product__c&apos;. If you are attempting to use a custom field, be sure to append the &apos;__c&apos; after the custom field name. Please reference your WSDL or the describe call for the appropriate names.</sf:exceptionMessage>
    </sf:fault>
   </detail>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>
 
 
  • December 12, 2007
  • Like
  • 0
I have a problem to update a custom field in Date type with Perl. When I run the query to select some custom fields, all the fields of the return hash are strings even some of the fields are Date type. If I try to update the field which suppose to be Date type, it return the error message "INVALID_TYPE_ON_FIELD_IN_RECORD". Any suggestion??
 
Below is my code :
sub test
{
my $result, $nw_designerId;
my $q2 = "Select Id, FA_Reason__c, FA_Status__c, FA_Design_Owner__c, FA_Completed_Date__c from FA__c where Name = 'FA070427-000181'";
$result = $port->query('query' => $q2, 'limit' => '200');
print "We got " . $result->valueof('//queryResponse/result/size') . " back.\n";
foreach my $elem ($result->valueof('//queryResponse/result/records')) {
 print "$elem->{Id}, $elem->{FA_Reason__c}, $elem->{FA_Status__c}, $elem->{FA_Design_Owner__c}, $elem->{FA_Completed_Date__c} \n";
 $elem->{FA_Status__c} = "Open";
 $elem->{FA_Completed_Date__c} = '2006-12-19T19:51:12.174Z';
 my $foo = $port->update(%{$elem});
 print "$foo\n"; # should print "1" if $port->update() succeeded.
 }
}
 
Here is the error message :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>
 <SOAP-ENV:Header
 >
   <SessionHeader
   >
     <sessionId xsi:type="xsd:string"
     >qDb2EUAjvgXw.LCb0f0L2NKx.BWxDv7gz3bcv_ZG7kgNuN6hbwE5EFaQtw_oR3obk4geuh36LW6VeH7JQ42op6QN9vOJezg802hoRYiHuRHjAF3vhkCDbMBZDURxjIkv4b4A8wCU</sessionId></SessionHeader></SOAP-ENV:Header>
 <SOAP-ENV:Body
 >
   <sforce:update xmlns:sfons="urn:sobject.partner.soap.sforce.com" xmlns:sforce="urn:partner.soap.sforce.com"
   >
     <sObjects xsi:type="sforce:FA__c"
     >
       <sforce:Id xsi:null="1" xsi:type="sforce:ID"/>
       <sforce:FA_Reason__c xsi:type="xsd:string"
       >Initial FA</sforce:FA_Reason__c>
       <sforce:FA_Status__c xsi:type="xsd:string"
       >Open</sforce:FA_Status__c>
       <sforce:Id xsi:type="xsd:string"
       >a0530000002fL8ZAAU</sforce:Id>
       <sforce:FA_Design_Owner__c xsi:type="xsd:string"
       >00530000000swzaAAA</sforce:FA_Design_Owner__c>
       <sforce:FA_Completed_Date__c xsi:type="xsd:string"
       >2006-12-19T19:51:12.174Z</sforce:FA_Completed_Date__c></sObjects></sforce:update></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Cache-Control: private
Date: Tue, 21 Aug 2007 21:52:00 GMT
Server:
Content-Type: text/xml; charset=utf-8
Client-Date: Tue, 21 Aug 2007 21:52:01 GMT
Client-Peer: 204.14.234.40:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
Client-SSL-Cert-Subject: /C=US/ST=California/L=San Francisco/O=Salesforce.com, Inc./OU=Applications/OU=Terms of use at www.verisign.com/rpa (c)00/CN=na1-api.salesforce.com
Client-SSL-Cipher: RC4-MD5
Client-SSL-Warning: Peer certificate not verified
Client-Transfer-Encoding: chunked
<?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>FA_Completed_Date__c</fields>
    <message>FA Completed Date: value not of required type: 2006-12-19T19:51:12.174Z</message>
    <statusCode>INVALID_TYPE_ON_FIELD_IN_RECORD</statusCode>
   </errors>
   <id xsi:null="true"/>
   <success>false</success>
  </result>
 </updateResponse>
 </soapenv:Body>
</soapenv:Envelope>
  • August 21, 2007
  • Like
  • 0