You need to sign in to do that
Don't have an account?
Ron Hess
Sfdc.pm
I've been using this as a basis for developing simple scripts to locate duplicates , verify key fields are filled in properly ( I would love a lookup field type ! ) and integerate with our production system for auditing data.
It's not well documented or packaged for CPAN type install (yet) but you may get some ideas.
I just drop this in ...perl/site/lib/Sfdc.pm to get started
you may also need to install Date::Calc from CPAN to get conversions to and from sforce date formats
enjoy
Ron,
Thx for posting this code. I�m in the process of evaluating means of integration to SFDC and Perl is one of our options.
I have a few questions:
I assume you are running on a win environment (ActiveState).
Where did you get XMLRPC::Lite?
From what I gathrered it is part of SOAP::Lite, which I have installed⬦ but I get an error on the use XMLRPC.
And also... where to place Sfdc::Serializer? (A sub-dir under perl/site/lib?)
Thx in advance,
Josh
----------
#!/usr/bin/perl -w
use Sfdc;
$username = 'andy@genuinelyuseful.com';
$password = 'argle';
my $login = Sfdc::call('sfdc.login', username => $username, password => $password);
print "Found it.\n";
----------
My password obviously isn't "argle", but you get the picture. Anyhow, it runs but I always get the following error:
1112 fault user not valid
Any help would be greatly appreciated.
Regards,
Andy
Hi andy,
At a minimum you will need to make the following change:
my $proxy = 'http://www.salesforce.com/servlet/sales.servlet.Api'; #was 'http://ssl.salesforce.com/servlet/sales.servlet.Api';
my $client = 'LiuwguKtTjU5BwgMCgsMDQ4PcHFycwAj'; # probably not needed
my $sfdcversion = 1.5; # default version is lowest
sub apiversion { $sfdcversion = shift; } # allow version to be set
You will probably want to change the version to 1.9 or 2.0 also. After successfully logging in, you will be resetting my $proxy to the server_url returned from the login call.
----------
method
< ?xml version="1.0" encoding="UTF-8"?>
< methodCall>
< methodName>sfdc.login< /methodName>
< params>
< param>< value>< struct>
< member>< name>username< /name>< value>andy@genuinelyuseful.com< /value>< /member>
< member>< name>client< /name>< value>LiuwguKtTjU5BwgMCgsMDQ4PcHFycwAj< /value>< /member>
< member>< name>password< /name>< value>argle< /value>< /member>
< member>< name>version< /name>< value>< string>1.9< /string>< /value>< /member>
< /struct>< /value>< /param>< /params>< /methodCall>
failed
----------
Again, "argle" has been changed to protect the innocent. I also have to put a space after every "
Help?!?
- Andy
Message Edited by andy on 08-05-2003 03:29 PM
Message Edited by andy on 08-05-2003 03:33 PM
All the best,
Andy
I started messing with SOAP::Lite but have no sample code.
I actually turn to Java to get some things done quickly.
It�s a pity there isn�t much more Perl code here.
Josh
sorry for the delay getting back to this message board
XMLPRC::Lite was in the active state install i believe, if not everything else i get came from CPan
I just put SFDC::serializer in my perl/site/lib directory
I haven't tried to use the perl SOAP stuff directly with sforce (yet...)
not yet, but it sounds like fun, will try this soon