GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
WWW::Salesforce::Simple(3) User Contributed Perl Documentation WWW::Salesforce::Simple(3)

WWW::Salesforce::Simple.pm - this class provides a simpler abstraction layer between WWW::Salesforce and Salesforce.com.

Because the Salesforce API is somewhat cumbersome to deal with, this class was created to make it a little simpler to get information.

This class inherits all the methods from WWW::Salesforce and adds the following new ones.

Handles creating new Salesforce objects as well as the login process to use the salesforce objects.

Executes a query against the information in Salesforce. Returns a reference to an array of hash references keyed by the column names. Strict attention should be paid to the case of the field names.

Executes a query against the information in Salesforce. Returns a reference to an array of hash references keyed by the column names that includes deleted and archived objects. Strict attention should be paid to the case of the field names.

Gathers a list of fields contained in a given table. Returns a reference to an array of hash references. The hash references have several keys which provide information about the field's type, etc. The key 'name' will provide the name of the field itself.

Gathers a list of tables available for use from salesforce. Returns a reference to an array of strings representing each table name.

    use WWW::Salesforce::Simple;

    my $sforce = WWW::Salesforce::Simple->new(
        'username' => $user,
        'password' => $pass
    );

    my $query = 'select Id from Account';

    my $res = $sforce->do_query( $query );

    foreach my $field ( @{ $res } ) {
        print $field->{'Id'} . "\n";
    }
    print "Found " . scalar @{$res} . " results\n";

    my $query = 'select Id from Account';

    my $res = $sforce->do_queryAll( $query );

    foreach my $field ( @{ $res } ) {
        print $field->{'Id'} . "\n";
    }
    print "Found " . scalar @{$res} . " results\n";

    my $fields_ref = $sforce->get_field_list( 'Account' );

    foreach my $field( @{$fields_ref} ) {
        print $field->{'name'} . "\n";
        foreach my $key ( keys %{$field} ) {
            print "\t $key --> ";
            print $field->{$key} if ( $field->{$key} );
            print "\n";
        }
        print "\n";
    }

    my $tables_ref = $sforce->get_tables();

    foreach my $table ( @{$tables_ref} ) {
        print "$table\n";
    }
    print "\n";

Please visit Salesforce.com's user/developer forums online for assistance with this module. You are free to contact the author directly if you are unable to resolve your issue online.

Chase Whitener <capoeirab@cpan.org>

Fred Moyer <fred at redhotpenguin dot com>

Copyright 2003-2004 Byrne Reese, Chase Whitener, Fred Moyer. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2021-09-10 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.