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
InterceptTechieInterceptTechie 

IsDeleted and queryAll() with Perl?

Hello,
 
I am using the SalesForce.pm module, which has worked great, but I need to bring in deleleted records now too.  The API method queryAll() supports that, but the SalesForce.pm module doesn't seem to recongnize it.
 
Is there a newer version vailable that supports that method?  I can't seem to find it.
 
thank you!
InterceptTechieInterceptTechie

I tried modifying the SalesForce.pm module like so -- adding a queryAll function.  I don't get any error, but I also dont get any data back.  Any ideas?

 

Code:

sub queryAll {
    my $self = shift;
    my (%in) = @_;

    my $client = SOAP::Lite
 ->deserializer(Salesforce::Deserializer->new)
 ->on_action( sub { return '""' } )
 ->uri('urn:partner.soap.sforce.com')
 ->proxy($self->{address});

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

}


 

Ron HessRon Hess
that should work, but you will have to change the hard coded end point to increase the API level, i think it's 8.0
you may need to increase it to 9.0?
also, you need to have some deleted records that match your query