function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jcroalljcroall 

Perl API and custom objects - need to use enterprise WSDL?

Hi All,

 

Salesforce API newbie here.

 

Using Perl I can do basics on Accounts, Cases, Opportnuities, but when I try to access custom objects I run into trouble. For example trying to look up a custom object returns an error like:

 

INVALID_TYPE:
select id from Bugzilla__c where BZ_Number__c like '1234'
^
ERROR at Row:1:Column:16
sObject type 'Bugzilla__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names. at update-keywords-for-bug.pl line 185

 

I assume I need to reference my enterprise WSDL instead of the default (in my script I reference https://test.salesforce.com/services/Soap/u/23.0)

 

How do I do this in Perl? I have searched the forums here and find threads that touch on the topic but can't find any answers,

 

Help appreciated!

 

Thanks - James

ptepperptepper

Are you using the partner or enterprise WSDL? Partner should work, but if you need to use Enterprise you need to make sure that you generated the WSDL file after you created those objects and fields.

 

docs

 

-paul

jcroalljcroall

Well that's the thing - I am using the Perl WWW::Salesforce module, which I understand is hard-coded to use partner. This leads me to the questions:

 

  • Can I look up custom objects while using teh partner WSDL?
  • Can I use enterprise WSDL from Perl?

 

Thanks!

ptepperptepper

Sorry, I'm not sure about this - I don't think you can use enterprise with Perl, but you should be able to access custom objects with partner. "https://test.salesforce.com/services/Soap/u/23.0" is not the WSDL though -- that would be setting the API version.

RajanMRajanM
We had the same issue and we were able to solve it by updating the variables $SF_PROXY and $SF_APIVERSION in the perl module (...../perl5/WWW/Salesforce.pm) to match our version. 

$SF_PROXY       = 'https://www.salesforce.com/services/Soap/u/35.0';
$SF_APIVERSION  = '35.0';

API end point www.salesforce.com is being retired from 01/01/2015, in case if it doesn't works try login.salesforce.com.

Hope this helps.