I found myself trying to migrate files from a client’s server to a rackspace cloud sites account. Unfortunately, the server that was the source did not have lftp, ncftp, or any other ftp client I could use to recursively upload files. I wrote a script in php then realized that php-cli didn’t have ftp compiled.
Here is the line that I used to upload the data to the rackspace cloud site using a find statement and curl:
A site my wife needs for work recently overhauled their site using Microsoft Silverlight (didn’t say “upgraded”). My wife’s iBook G4 works perfectly for streaming video, email, calendar, and basically everything else a personal trainer would use. Unfortunately, Microsoft decided the new version of Microsoft Silverlight should not support G4 macs.
It sounds to me like Microsoft Silverlight is telling me to buy a new mac, which I did.
I created integrations with ExactTarget for a client and found it was an up-hill battle to get information about their web services and rest interface. The only way to get the documentation is behind lock and key, a private forum and knowledge-base called 3sixty that is slow, has no user participation, and if you are a freelancer it’s just another layer of overhead to get an account to talk to people there – probably the reason why there is virtually no user adoption. :)
Since I see no merit in contributing code to a private forum that you have to buy in for the sake of that company, I bought a domain and put up a punBB forum to give people a public space to talk openly (like the Salesforce.com forums): http://ExactTargetDeveloper.com
I was answering a question in the Salesforce.com developer forums today and someone asked if the solution I offered was documented anywhere. I couldn’t find the documentation for the option – so I may as well post it here.
The function URLFOR() creates a link to somewhere in Salesforce.com without having to hard-code your server name and worry about links breaking later. You can use this function to create another record automatically and have the system automatically press the save button too. Simply append “save=1″ at the end of the array of field values you are passing. Here are some example uses:
Create a button that updates a hidden workflow field on the record you are in. To use custom fields you must find the field ID (open the object, under fields, and open the field detail page, use the ID in the url).
{!URLFOR($Action.Account.Edit, Account.Id, [retURL=URLFOR($Action.Account.View, Account.Id), 00N300000030Ea1 ="TRUE", save=1] )}
Have an Account and you want to have 1 button that creates a renewal opportunity. You can add more fields that are important to you (close date+1 year?).
{!URLFOR($Action.Opportunity.Edit, null, [Amount = Opportunity.Amount , AccountId=Opportunity.AccountId , OwnerId = Opportunity.OwnerId, save=1] )}
March 2nd, 2009 by James Sullivan | No Comments | Filed in Nerd
Nerd Factor: 8
I am trying to call an Exact Target Web Services (SOAP) API via PHP and there is this problem where the __getLastRequest() is showing that my data isn’t actually being put into the request. It looks like I’m not passing any data aside from the basic XML showing the method name.
It has been a while since I ran into this issue and so I wanted to make note of it on a blog, somewhere indexed more thoroughly by Google, so the next person who ran into the problem would save a little time.
The skinny: You need to explicitly encode the objects that are being sent to the service.
If you want to pass no data:
$sfs = new ExactTarget_SalesforceSend();
$sfs->Email = $e;
$sfs->Targets = array( $t );
$sfs->FromName = "Lead/Contact Owner Name";
$request = new ExactTarget_CreateRequest();
$request->Options = NULL;
$request->Objects = array($object);
$results = $client->Create($request);
If you do indeed want to pass data:
$sfs = new ExactTarget_SalesforceSend();
$sfs->Email = $e;
$sfs->Targets = array( $t );
$sfs->FromName = "Lead/Contact Owner Name"; $object = new SoapVar($sfs, SOAP_ENC_OBJECT, 'SalesforceSend', "http://exacttarget.com/wsdl/partnerAPI");
$request = new ExactTarget_CreateRequest();
$request->Options = NULL;
$request->Objects = array($object);
$results = $client->Create($request);
That bolded line tells php/soap that it needs to encode based on a specific element in the wsdl schema. In other languages you can use wsdl2java and end up with classes that you can just pass along and they get serialized the right way. PHP and other languages of that group (Perl, Ruby) need to explicitly encode the data that is being passed. You would expect that passing an array/dictionary/object into the function expecting that element would work – but no – it just needs to be told ever so gently which data type it should use.
Of note: I belive this may just happen when inheritance is used in publishing the web service (.Net and Java) which is represented in the wsdl file like this:
I love when people proclaiming to do it right do it so wrong. This website which is focused on “User Interface Engineering” has an RSS feed, but not one that you can subscribe to via the normal meta tags. They require you navigate all the way down the page and look on the right side and they call it an XML Feed. I just thought it was funny.
February 12th, 2009 by James Sullivan | 2 Comments | Filed in Nerd
If you are making a website – and who isn’t lately – you need to make a theme for the site. I an not stylistically inclined and am also colorblind, so I have a couple tools that I use when building sites that help me with that side of things. One of them is ColorSchemeDesigner.com – a really great tool to help you get your colors right.
Previously, most of my sites were “yellow”, “green”, and “red” to add color. Now they are shades of all different colors that actually jive together. I don’t recognize much of the improvement but people say it’s better.
Watching a video like of “Improv Everywhere” doing an escalator high-5 and seeing the smiling faces of the people getting off the train convinces me that arts have a place in every day life.
February 2nd, 2009 by James Sullivan | 1 Comment | Filed in Nerd
The last truly usable, well-performing version of Excel is obviously Excel 2003. It has all the features you need without the needlessly redesigned UI and massive bloat. Plus, it works nice and quickly in my XP virtual machine on my MacBook Pro.
Unfortunately I made the mistake of using Windows Update on automatic mode. It installed some garbage called “Office Live Add-in” which will not go away. Even when you disable the toolbar, delete it, whatever… it comes back every time you restart Excel. Here’s how it works: