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
adamgadamg 

Updated Perl access to 2.5 API

Looks like Byrne has fixed the login issue with his perl toolkit (note that currently only supports query.)

http://www.majordojo.com/salesforce/

 

 

nhnh

Is there any Sforce documentation describing the usage of the native Sforce API calls using Perl?

In the 2.5 API from Byrne you can see:

   my $r = $client->query($self->get_session_header(),
             SOAP:ata->name('query' => $in{'query'}),
             SOAP::Header->name('QueryOptions' => SOAP::Header->name('batchSize' => $in{'limit'})));

which gives clues to how to call the query method but what about  the other  API methods - 'create', 'update', 'getUserInfo', etc?

Thanks

adamgadamg
It only supports query, for now.
 
The code has been posted in sourceforge, so I encourage any Perl hacks out there to have a shot at implementing the rest.
 
 
Byrne ReeseByrne Reese
To keep everyone up-to-date... I wanted to let you know that I am currently working on getting the other API calls to work using the 2.5 Partner WSDLs. These changes will be posted to sourceforge in the next week or so. If support for this toolkit is needed more urgently, please contact me more directly.

In any event, just hang in there. I just added support for the create method, and adding more will be relatively trivial. But it is time for bed right now, and I will pick up where I left off tomorrow.

Happy Hacking and Happy New Years.
Ron HessRon Hess

I'm moving my code over to use this soap, 2.5 perl toolkit and so far it's going well.

however I'm stumped on how to get to the picklist values out from a describeSObject call, this is really a SOM question,

I've tried

valueof('//fields/picklistValues')

but this returns a flattend list of all picklist values, also tried //fields/[$i]/picklistValues but this didn't match()

I'm hoping that I'm missing something easy here, any ideas?

Ron HessRon Hess

I found that the Update call in this module assumes updates are made to single ID's, is this correct?.  I'm using batch in lots of places and it appears that batch is replace by an array to update in the 2.5 and future API.

Therefore I'm going to modify this code to pass the sobject array, unless it's already been done ?

thanks

Ron Hess

adamgadamg
Yes - thats correct.

Let us know when/if you make the change and i can submit that back to sourceforge for you..
Ron HessRon Hess

I got this to work, very important to add the following line to your copy of Salesforce.pm

block of code in create() and update ()

    my $client = SOAP::Lite
 ->readable(1)
 ->deserializer(Salesforce:eserializer->new)
 ->on_action( sub { return '""' } )
 ->uri($uri)
 ->multirefinplace(1)              <<< ------------- need this if we are passing an array to create or update
 ->proxy($self->{address});

otherwise I've gotten this perl module to work fine with the 3.0 service.

I've made lots of other enhancements but several more functions to write (like retrieve ) before I post it back to this board.