1WWW::Salesforce::SimpleU(s3e)r Contributed Perl DocumentaWtWiWo:n:Salesforce::Simple(3)
2
3
4

NAME

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

DESCRIPTION

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

METHODS

14       This class inherits all the methods from WWW::Salesforce and adds the
15       following new ones.
16
17   new( %parameters )
18       Handles creating new Salesforce objects as well as the login process to
19       use the salesforce objects.
20
21   do_query( $sql_query_string )
22       Executes a query against the information in Salesforce.  Returns a
23       reference to an array of hash references keyed by the column names.
24       Strict attention should be paid to the case of the field names.
25
26   do_queryAll( $sql_query_string )
27       Executes a query against the information in Salesforce.  Returns a
28       reference to an array of hash references keyed by the column names that
29       includes deleted and archived objects. Strict attention should be paid
30       to the case of the field names.
31
32   get_field_list( $table_name )
33       Gathers a list of fields contained in a given table.  Returns a
34       reference to an array of hash references.  The hash references have
35       several keys which provide information about the field's type, etc.
36       The key 'name' will provide the name of the field itself.
37
38   get_tables( )
39       Gathers a list of tables available for use from salesforce.  Returns a
40       reference to an array of strings representing each table name.
41

EXAMPLES

43   new()
44           use WWW::Salesforce::Simple;
45
46           my $sforce = WWW::Salesforce::Simple->new(
47               'username' => $user,
48               'password' => $pass
49           );
50
51   do_query( $query )
52           my $query = 'select Id from Account';
53
54           my $res = $sforce->do_query( $query );
55
56           foreach my $field ( @{ $res } ) {
57               print $field->{'Id'} . "\n";
58           }
59           print "Found " . scalar @{$res} . " results\n";
60
61   do_queryAll( $query )
62           my $query = 'select Id from Account';
63
64           my $res = $sforce->do_queryAll( $query );
65
66           foreach my $field ( @{ $res } ) {
67               print $field->{'Id'} . "\n";
68           }
69           print "Found " . scalar @{$res} . " results\n";
70
71   get_field_list( $table_name )
72           my $fields_ref = $sforce->get_field_list( 'Account' );
73
74           foreach my $field( @{$fields_ref} ) {
75               print $field->{'name'} . "\n";
76               foreach my $key ( keys %{$field} ) {
77                   print "\t $key --> ";
78                   print $field->{$key} if ( $field->{$key} );
79                   print "\n";
80               }
81               print "\n";
82           }
83
84   get_tables()
85           my $tables_ref = $sforce->get_tables();
86
87           foreach my $table ( @{$tables_ref} ) {
88               print "$table\n";
89           }
90           print "\n";
91

SUPPORT

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

AUTHORS

98       Chase Whitener <capoeirab@cpan.org>
99
100       Fred Moyer <fred at redhotpenguin dot com>
101
103       Copyright 2003-2004 Byrne Reese, Chase Whitener, Fred Moyer. All rights
104       reserved.
105
106       This program is free software; you can redistribute it and/or modify it
107       under the same terms as Perl itself.
108
109
110
111perl v5.28.1                      2017-10-07        WWW::Salesforce::Simple(3)
Impressum