Wednesday, 26 September 2012

Outputting the Salesforce 18 character ID

Those familiar with Salesforce record IDs, and more specifically their use within the Salesforce API will probably know that they come in both 15 and 18 character variations.

The 15 digit ID, as seen in the URL of any record within Salesforce, is a case sensitive ID, and can be confidently used internally within your org for managing objects.



If you intend to use, load or manipulate records with an external program, for example, exporting data via reports or the API, you will probably need to use the 18 digit ID, which includes three extra "check digits" and is not case sensitive. It is important to remember, that functions like Excel's VLOOKUP are not case sensitive, nor, by default are MySQL queries.

There are a number of functions and tools available to manually calculate the last three characters, and a really brilliant explainantion of how the digits are calculated, and their use can be found on the Astadia blog post 15 or 18 Character IDs in Salesforce.com.

This isn't an ideal solution though, which leaves you thinking that there must be a simpler way to get the 18 digit ID out of the front end of your organisation. And of course, you can, and once you know how, it's actually incredibly simple!

All you need to do is create a new custom formula field on your object, give it a relevant name, set it's type to "text" and in the formula box enter:

CASESAFEID(Id)

and that's it! If you're feeling particularly lazy, it's even in the righthand box of "Functions" and you can just double click it to enter.



Save the field, alter your field level security settings, and add it to the relevant page layouts and this field will display the 18 digit ID on your Salesforce record.

Now when you want to test, or work, with your Salesforce records, as they will have been saved in external applications and data exports, you can grab the 18 character ID straight off your page layout.


Monday, 10 September 2012

Dreamforce 2012: Integrating PayPal Mass Payments with Force.com

"Welcome to Dreamforce 2012"

Everywhere you look at the moment in the Salesforce.com world, there are banners, blogs and news articles hailing the largest ever Enterprise IT conference.

It used to be held at the worlds biggest conference centre, the Moscone West in San Francisco; but now, it's held at the worlds biggest conference centre AND ten surrounding hotels and facilities. Not to mention closing off a few streets and booking out every hotel in the west of the city. With 70,000 attendees, and a gala headlined by the Red Hot Chilli Peppers, this is the CRM industry's flagship event.

So who wouldn't want to give a presentation there? Especially on such an awesome topic as combining one of the worlds most popular and accessible payment gateways with the worlds coolest CRM
(ok, it's just the inner-nerd in me that's getting so excited about those bits).

Welcome then to the supporting blog post to this Dreamforce 2012 developer track session:

Integrating PayPal Mass Payments with Force.com

If you are attending Dreamforce, you'll have access to the Chatter (touch!) session page here.

So what can you expect from this session? Well, having found this post, I can promise you will be well placed to take the most away from this presentation (and if you are here after the session, you will find this blog, along with what I presented an incredibly valuable combination towards understanding the process).

Firstly, let me link you up with the GitHub repository containing the integration code and demo files:

 https://github.com/srlawr/PaypalSFDC

Once I have clearance from Salesforce.com I will post the slides from the presentation up here too, but really, what you'll want is these two blog posts on the topic, which are the original works that landed me the Dreamforce presentation in the first place:

1) Salesforce - Paypal Masspay Integration

2) Salesforce - Paypal IPN integration


Working through these two blog posts should empower a talented developer to perform their own complete PayPal Mass Payments integration in a couple of days. If you don't have this kind of resource, or want to tap into my expert knowledge on the topic.. please get in touch with my employers Desynit, and I'm sure they will be more than happy to talk to you.

Thursday, 30 August 2012

Certified Force.com Developer

I remember a time when I blogged about coding and solving technical problems with intelligent solutions, but now I seem to write more and more about qualifications and user-meetups.

Maybe I am becoming a consultant after all?

Well asides, because it's time for a new badge, and about time too. I have just taken and passed my Salesforce.com Certified Force.com developers exam. I have huge thanks to pass on to Christopher Lewis, a colleague with the qualification who helped me prepare, through conversations, debates and a wicked revision guide, and also to the boss himself who took the exam minutes before me (and passed) which boosted my confidence nicely.

So here's to DREAMFORCE 2012, and my Developer Session "Integrating PayPal Mass Payments with Force.com" - presented Friday September 21st 11:00 San Francisco time (7:00pm UK time) in the Developer Theatre.


Monday, 25 June 2012

Now Cross Browser Compatible!

I recently attended The Learning Tree's "CSS for Web Page Development" course, at their Euston House education center, London.

I have just received my certificate for completing the 3 day qualification, having passed the final exam with a super respectable 87.5%.


Thursday, 17 May 2012

Force by Forcewest: Salesforce Developer meetup

Thursday May 31st @ 6pm in The Elephant, Bristol
It's that time again, time for me to sell my soul and advertise another group meet-up in the South West of England.

This time, the group is Force by Forcewest, it's an-off shoot of the original Salesforce user group, Forcewest, and it's really intended just for the technically minded. No old admins in battered ties, or accountants talking about licence costs, just developers, coders and hackers (ethical, of course) talking about Apex, Workflow and Visualforce.

So if you live anywhere near Bristol and you know how important semi-colons are, then write "May 31st - FxFw" on a post-it note and stick it to your monitor. We'll be meeting in The Elephant pub, in St. Nicks market, please come on down and join us for a couple of beers, and to meet like minded people.

 Sign up for more info on the usual channels:

http://www.facebook.com/ForceByForceWest
http://twitter.com/fxfwbarman

and actually sign up (for free!)

http://fxfw1.eventbrite.com/

but more importantly just head to this pub:


Developer certification is certainly not a must (I'm not even a certified developer!) but you might find the more badges, and the more merch you can drop into the conversation, the more likely you are to be bought a pint by me :D


Thursday, 10 May 2012

Drupal cron stopped working after site migration

Have you recently moved your Drupal website to a new server, and all of a sudden Cron has stopped working, and all your jobs are timing out, or locking up?

That has recently happened to me.

First of all, I will point out that I am using Drupal 7, and we are managing a number of jobs using the Ultimate Cron module, which as you may know, is dependant on the Background Process (and Progress) module(s). We migrated our site from a test server to a live server, with identical setup, and all of a sudden, our cron jobs packed in. I couldn't run them automatically, manually, externally, with drush or even from the root shell.

For a day I struggled. With every CRON setting I could imagine.

Then, whilst manually trawling through the system and variable tables in the database I discovered the following setting:

background_process_derived_default_host | a:1:{s:7:"default";a:1:{s:8:"base_url";s:20:"http://test.desynit.com";}}

http://test.desynit.com is the name server of test site (obviously). This is not the path of the live server.

So I leapt into the admin config for the BACKGROUND PROCESS module, and lo and behold, there it was..

I clicked "Determine default service host" and this was instantly updated to the new correct base_url for the live server, and away you go!

Full cron ahead.

I hope this helps someone out.

Tuesday, 10 April 2012

Forcewest - UK Salesforce user group


Where will you be on April 17th 2012? If you'll be anywhere near the south west of England, can I recommend you make your evening plans to be attending Forcewest?

Forcewest is a networking group for Salesforce users and developers organised by my company, Desynit. Attendance is free, but places are numbered, so ideally you need to register your name at Eventbrite. It then kicks off at 6pm at Totos bar, which is on the opposite site of the river from King Street and The Apple; and less than 5 minutes walk from Temple Meads station.

There's a presentation from Simon Parker who is presenting his Surf Life Saving Salesforce.com implementation case study, followed by an open Q&A. The night then normally evolves into an eruption of conversation and debate about almost all technologies.

I'll also point out that there is a fair tab behind the bar, courtesy of Desynit, so if you're in good time you can enjoy a free pint to help break the ice with your fellow Salesforce.com users.