Archive for the '' Category

SIIA OnDemand Europe Conference – Notes from an SVP

By John McDowell – SVP of Global Sales for Astadia Consulting

I was half tempted to title this blog post “Notes from an SVP on a Small Island”! Yes, I’m in the UK visiting our EMEA team and as luck would have it I’ve chosen the coldest October week on record – what joy! Along with running from warm cab to rainy street and back again I was also invited to attend the SIIA OnDemand Europe Conference at London’s Royal Garden Hotel in Kensington, as a speaker for one of the panels. The conference is attended by executives from ISVs, SaaS, Web and Enterprise companies from across Europe, gathered to explore, debate and discuss all aspects of SaaS and Cloud Computing.

The overriding theme of the conference was that SaaS and Cloud Computing are here to stay and will continue to change the way we consume IT services in the future. However, with this change, Systems Integrators (SI) are faced with an ever-changing environment in which to grow, gain business and profit. My panel slot discussed how SIs can achieve this and what customers should be looking for when selecting an SI for a SaaS or Cloud-based project.

The ‘big boys’, the likes of Cap Gemini, Steria, Accenture and Deloitte, still reign king at the top of the tree, but what is becoming increasing apparent is the growth of new, smaller, more specialist SIs with real expertise in the SaaS and Cloud market space. In my role as Senior Vice President of Global Sales at Astadia Consulting, I have learnt there is more to being a profitable SI in today’s hi-tech market than we traditionally thought. Here’s a snippet from some of the panel questions and what my thoughts were:

Q: Why do you think there has been such growth in the smaller SIs for Cloud & Saas?

In todays cloud space it’s about being focused on one area of business; for Astadia we like to see ourselves as our customer’s first port of call for all things cloud. So when a company looks to step into the cloud space, we can help with the initial move and then look at what additional infrastructure can be leveraged once they’ve made the first step. Astadia are largest implementation partner worldwide. Why has Salesforce taken off at such speed? Because, traditionally CRM is the easiest place to start the migration of your application infrastructure into the cloud; the nice part about Salesforce is the license model, as well as the integrated bolt-ons that are part of the Salesforce AppExchange.

The sheer nature of smaller SIs makes them more adept at partnering with the many cloud vendors in order to provide holistic solutions for the Cloud. A nice example of this is the Astadia Front-Office; where customers can quickly leverage a package of applications that help with Marketing Automation, lead generation and lead nurture through to Salesforce Automation, targeting and commission structures.

Q: What advice would you give to smaller start ups in this market?

You can’t be half-hearted in your approach to the Cloud. That’s why so many smaller SIs are making such big changes and growth spurts in this game; they focus solely on the Cloud. They are experts in their fields who have a range of applications, technical expertise and best practise knowledge designed specifically for the Cloud. That really is Astadia’s strong point.

You should also realise that one size SaaS vendor does not fit all. Certain products will fit well in some cases and not in others; the successful SI will be the one that knows how to place these products specifically for the customer’s requirements.

SIs also need to focus on what they want to achieve. Astadia is a Services company, not a product company. We don’t compete on selling products; we compete on the services we provide from an industry best practice standpoint.

Q: What industry verticals do you see growing the most in this market?

So far the fast movers have been the Telcos, Media, Not-for-Profit and Financial Services sectors. The laggards are healthcare and the public sector, which I’m sure, will change as they have the most to benefit from SaaS and Cloud computing. Particularly from a cost saving point-of-view; which I see is at the forefront of the British Government’s agenda of late; I was looking at the news this morning re the pending government cost cuts.

Q: How much of the work to migrate to the Cloud requires integration – Getting the data into one place?

As far as we see it, all projects start and end with data. This underpins the success of any Cloud project and that’s why we partner with a number of integration providers. There’s no point having a whiz-popping Cloud application that can be used mobile, at home, offline and so on, if it doesn’t have the relevant data stored in it. Data drives end user adoption and buy in; without this your project is doomed.

Announcing Astadia’s Salesforce Performance + Support Program (SPS)

By Matt Finkelstein – Director of Sales Cloud – Astadia Consulting

CRM systems, such as, are without doubt the forerunner in the migration of business applications to the cloud. If an organisation wants to realise some of that elusive cloud ROI, CRM is one of the first places they look to gain momentum. Not surprising when you consider the growth in this area; after all, the foundation of rests on the early success of its CRM system. Why is that? Principally, because it is one of the easier applications to move into the cloud and one that yields the fastest ROI results.

Why then did announce late last year that “73% of CRM users do not use 50% of the functionality available to them in their CRM systems?”

Is it the nature of the CRM adoption curve? At first, you start off full of energy and raring to go. Then, in time, your attention gets diverted until eventually you neglect your CRM system almost entirely. What then can you do you do combat this?

Surely it’s a simple case of continual employee training? Not necessarily.

What is really required is the expertise to continually adapt your CRM system to the changing needs of your business. After all, your business doesn’t stop changing.  Your hectic environment creates constant demands for new reporting and management insight, so surely your CRM system needs to grow in order to provide a CRM adoption that promotes continued improvement. Hence, the inception of the Astadia Salesforce Performance + Support Program (SPS).

SPS is comprised of a 10-point methodology to help you manage configuration change in your instance of Clients that benefit from outsourcing their Salesforce support to Astadia:

  • Face ever-changing business processes, key metrics, and reporting requirements
  • Would like to implement configuration changes on a more timely basis
  • Desire to take advantage of’s ever-expanding feature base
  • Experience low user adoption in part or all of the user base
  • Maintain complex data
  • Want to deliver more value to the company using additional capabilities over time

To find out how strong your CRM system is, why not take our short quiz.


Come and visit us at Cloudforce London – September 7th, 2010

Cloudforce London 2010 opens its doors on Tuesday 7th September and yes, Astadia will also be there.

If you haven’t already registered, visit the Cloudforce site now!

Cloudforce is the industry’s leading Cloud expo, so if you’re already operating in the Cloud, want to learn more, learn how to move into the cloud, or simply want to see what is available this is the event to visit.

Astadia is the world’s largest pure-play Cloud Computing integrator and as the #1 partner for, Eloqua, Right90, and many other top SaaS (Software as a Service) technologies, we improve customer lifecycle management in marketing, sales and customer service – the functional areas that most companies move to the Cloud first.

As the IT Cloud Transformation (ITX) innovator, we deliver strategic analysis, operational design, technology deployment, and ongoing support for companies moving IT infrastructure or applications to the Cloud.

If you would like to book a personal meeting with our team at the event – contact

We look forward to seeing you all at the event and in the meantime, we’ll leave you with this tastier of what you can expect to see from Salesforce:

  • How Chatter boosts CRM adoption and productivity of sales and service professionals
  • How companies are using Chatter across the enterprise to break-down business silos and create collaborative companies
  • Discover how to make custom applications collaborative and social with just a few clicks
  • Test drive the latest cutting-edge applications from and Astadia

Is Your Code Green?

By Alan Shanahan – Principal Technical Architect for Astadia Consulting

Alan ShanahanNow when I say Green, I don’t mean the ‘Eco-Friendly’ type of green. What I’m referring to is the type of code that, when tested, comes back with zero errors

Here’s a real-world scenario I’ve come across more than once. You engage a consultancy firm to add some additional custom functionality to your org. They develop new Visualforce pages, along with some Apex code classes and triggers to give you what you need. After testing you’re happy with the new functionality and press on for production; then bang! The problems start!

Suddenly, they’re asking for more time (and money) to make changes to your existing codebase so they can deploy their newly-developed functionality into your production environment. You stand bemused, searching for reasons why on earth would that be the case? The people who developed the last set of custom programs deployed theirs without any problems, and you haven’t touched a line of code on the system since; you couldn’t have, nobody in the organisation knows how to!

So, what happened? Gremlins? Industrial sabotage? Inquisitive amateurs? Hackers?

Most likely none of the above. Perhaps you unwittingly caused the problems yourself.

Let’s dig a little deeper to discover why…

Firstly, let’s look at test methods. What are they? Put simply, test methods are a set of programs that (if built according to best-practice guidelines) create their own sample data, establish test conditions for your Visualforce pages, Apex classes and triggers, create events that run your code through as many test scenarios as possible, to check that various test results match expected results, and put up a metaphorical red flag if any failures occur. In short, they are programs that test other programs.

From the point of view of, you need to “exercise” at least 75% of your entire Apex codebase, and have no program failures occurring on ALL test methods in that codebase in order to deploy code to a production org. This is a hard-and-fast rule, and there’s no way around it, and for good reason.

In light of an excellent article that delves quite deeply into the whole subject, rather than have me rabbit on for pages, I suggest taking a look at this:

As business users work with their org, it’s not uncommon for them to find a case where users have entered erroneous data. To combat this, System Admin creates a new validation rule in the production org to ensure a phone number is now mandatory where it had previously been optional. The business continues without a hiccup, data quality is improved, all is well…

Except for one thing – the assumptions around business rules have changed and the developers were not informed, so any test methods that were creating test data in this functional area would have left this phone number field blank. As soon as the test methods attempt to write data to the database, program failures occur because of the new validation rule. In reality, there is no real problem yet because test methods don’t run until a developer asks them to run. It’s not until someone attempts to deploy new code to the production environment that problems occur.

On the face of it, there’s nothing really wrong with adding this validation rule, in fact Salesforce makes it easy to do this. However, there’s a strong argument against changing any component that has an effect on a system’s business rule implementations without going through the proper regression and acceptance testing. The fact is that your codebase, and its collection of test methods, if properly written, should form a sound basis for any regression testing that you carry out, which can be used to help identify just this type of scenario.

Except during times when development is taking place (and only then for short periods), all of a system’s test methods should be in GREEN status i.e. they should all run without failure and with the appropriate amount of code coverage. Above all, system tests should exercise all your code thoroughly and check for positive and negative conditions as much as possible.

To check the status of your org’s code, simply do the following:

  • Log into as an Administrator (or a user with similar permissions)
  • Click the Setup link, top-right of the page
  • On the menu at the left, under the App Setup section, click on the Develop heading
  • Now click on Apex Classes and you will see a list of class files in your system

The magic button is the Run All Tests button. Click it and stand back. This may take a few minutes depending on the amount of code to run but when it’s finished you will have quite a lengthy web page with detailed debugging information. We’re only interested in a small part of that though, at the top. It’s the figure next to Test Failures – if it’s zero, you’re in clover, Green! If not, something has changed and now there’s an additional element of risk to your next custom development project.

Don’t despair though. Quite often the code corrections are minimal. But one thing is sure, you do want someone with the appropriate expertise to carry out this work. Astadia Consulting can help with this. Just contact us at or email us at and we’ll organise a code review and give you a comprehensive written report to prepare you for your new development project. We can also talk to you about TDD (Test-Driven Development) and best practice for the entire subject area.

15 or 18 Character IDs in – Do you know how useful unique IDs are to your development effort?

By Alan Shanahan – Principal Technical Architect for

Data can be empowering or devastating.  Unique IDs can enrich your data and make your life significantly easier.  We have taken the concept of using IDs as quick means to locate data (in part 1 of this blog post) and navigate around, one very big step forward.

You’ve probably also noticed that these IDs are either 15 or 18 characters; however do you know why? A nice example is a standard report look up, where they’ll show up as 15 characters, take a look below:

If you aren’t following this, let’s take the opportunity to take a step back and point out a previous conversation.

If you are still with me, then we are going to explore a few tips and tricks to add some value to your data. IDs are case-sensitive so if you wanted to export data to Excel to be used as a lookup table using the VLOOKUP formula, you’ll need to be aware of this. If you happened to have records with IDs of 001A0000006Vm9r and 001A0000006VM9r the VLOOKUP formula, not being “case-aware”, would always find the first record, regardless of the case of the lookup value. realized the potential problem with this and instigated the 18-character ID.

There was a method to their madness of expanding out by three additional characters. They are similar to “checksum” values in that they were calculated based on 15 character IDs. They gave these IDs what they needed – the ability to be different if the case of ANY of the first 15 characters changed.

More importantly, the addition of 3 characters allow for upward-compatibility.  Salesforce made the two types of ID interchangeable.

You could use either ID and they would be regarded as identical, at least within applications. This was carried forward when the Apex programming language was made available.

For example, when you compare two fields of type “Id”, the values are first converted internally to 18-character values before being compared, so you never need to worry about programming specifically to handle this (this is very useful for developers)

Let’s get technical…

The next part of this article assumes a good working knowledge of the following:

  • Apex language constructs and syntax
  • Apex triggers and classes
  • Apex test methods, code coverage and unit tests
  • How to add code to your org using an IDE e.g. Eclipse & the plugin

This highlights one source of annoyance to many users – reports do not show 18-character IDs.

If Salesforce had provided a function to return an 18-character field from an existing ID, that might have given us enough to achieve a “formula field workaround”, but they didn’t. In lieu of a formal workaround I will give you this, albeit in a more technical form.

First, I’ll show you how to attach an Apex trigger to an object, to give you an identical result. With this, every time a record is added to the system, an 18-character (text) field is updated with the 18-character equivalent ID, calculated by the trigger.

Salesforce provide the algorithm they use for this, but not the code. So, here’s the code. Diagrams make things easier, so as you read, here is a mock up of the process:

  • In Step 2, the characters are reversed in each piece.
  • In Step 3, we check each character. If the character is uppercase A to Z, we replace it with a 1, otherwise we replace it with a 0 character.
  • In Step 4, we lookup the above table with each of the three 5-character “binary” string.
  • And finally, in Step 5 we simply append these three characters onto the end of the original ID value.

The clever thing about this is that the algorithm will always change the value of the additional 3-characters if you change the case of any of the original ID characters.

The Code

And now for the code – this assumes a familiarity with Apex code, the Eclipse environment, how triggers work and a little bit of knowledge.

I’ve created a class called Utility – you can call it what you like. We will create a static method called sfdc15To18

Now, copy the following code into the body of your class file:

public static String sfdc15To18 (String original15) {
// This method expects a 15-char valid Salesforce ID, and returns the 18-char equivalent

Map<String,String> lookup5bin = new Map<String,String>();
String Piece1 = '';
String Piece2 = '';
String Piece3 = '';

original15 = original15.substring(0,15);

lookup5bin.put('00000','A'); lookup5bin.put('01000','I'); lookup5bin.put('10000','Q'); lookup5bin.put('11000','Y');
lookup5bin.put('00001','B'); lookup5bin.put('01001','J'); lookup5bin.put('10001','R'); lookup5bin.put('11001','Z');
lookup5bin.put('00010','C'); lookup5bin.put('01010','K'); lookup5bin.put('10010','S'); lookup5bin.put('11010','0');
lookup5bin.put('00011','D'); lookup5bin.put('01011','L'); lookup5bin.put('10011','T'); lookup5bin.put('11011','1');
lookup5bin.put('00100','E'); lookup5bin.put('01100','M'); lookup5bin.put('10100','U'); lookup5bin.put('11100','2');
lookup5bin.put('00101','F'); lookup5bin.put('01101','N'); lookup5bin.put('10101','V'); lookup5bin.put('11101','3');
lookup5bin.put('00110','G'); lookup5bin.put('01110','O'); lookup5bin.put('10110','W'); lookup5bin.put('11110','4');
lookup5bin.put('00111','H'); lookup5bin.put('01111','P'); lookup5bin.put('10111','X'); lookup5bin.put('11111','5');

Piece1 = sfdc0Or1(original15.substring(4,5)) +
sfdc0Or1(original15.substring(3,4)) +
sfdc0Or1(original15.substring(2,3)) +
sfdc0Or1(original15.substring(1,2)) +

Piece2 = sfdc0Or1(original15.substring(9,10)) +
sfdc0Or1(original15.substring(8,9)) +
sfdc0Or1(original15.substring(7,8)) +
sfdc0Or1(original15.substring(6,7)) +

Piece3 = sfdc0Or1(original15.substring(14,15)) +
sfdc0Or1(original15.substring(13,14)) +
sfdc0Or1(original15.substring(12,13)) +
sfdc0Or1(original15.substring(11,12)) +

return (original15 + lookup5bin.get(Piece1) + lookup5bin.get(Piece2) + lookup5bin.get(Piece3));


private static String sfdc0Or1 (String charX) {
// This method accepts a one-char string and returns '1' if it's between A and Z, otherwise '0'.

if (charX.compareTo('A') >= 0 && charX.compareTo('A') <= 25 && charX.compareTo('Z') >= -25 && charX.compareTo('Z') <= 0) return '1';
return '0';


public static testMethod void Test15_to_18_a() {
// For the test methods, I've taken three values where I manually calculated the additional 3 chars expected

String orig1 = '001A0000006Vm9r';

String orig2 = '003A0000005QB3A';

String orig3 = '003A0000008qb1s';


The code is made up of one main method, sfdc15To18. I’m not going to go into too much detail as I’ve already described the process above, and I don’t think the code is too hard to follow. There is a comment for each method, that should be sufficient. It will give you 100% code coverage and no failures.

One final thing remains, I just need to show you how to use this method in an Apex trigger to keep a custom field updated with the 18-character value. The trigger is quite simple. First, create a new custom 18-character text field to hold the value (there is no reason to add this field to a page layout, unless you really want to):

Here is the trigger code (on the Account object) and the associated Utility class method:

trigger AccountID18 on Account (after insert) {
// This trigger must be after insert, as no ID values are available before insert.
// This means we must update the trigger records explicitly as a batch.
// One other problem, because the system locks the records, they must be updated in an
// asynchronous (@future) method. We will pass a list of IDs to an @future method.
// You will need to write your own test method code for this code.

List<Id> lstId = new List<Id>();
for (Account iAcc : {


…and the associated Utility class method…

public static void updateAccountId18(List<Id> IDsToUpdate) {

List<Account> lstAcc = new List<Account>();
for (Id iID : IDsToUpdate) {
Account wrkAcc = new Account(Id = iID, ID18__c = Utility.sfdc15To18(String.valueOf(iID)));
update lstAcc;


You can now go ahead and generate reports using the new 18-character ID fields. If you Export them to Excel you’ll have no problems using VLOOKUP (or similar) functions.

One minor point I should mention: @future methods may not always run immediately (but typically do), and in extreme cases there may be a few minutes wait before they update your data. Bear this in mind when you are testing!


There are alternative ways of doing the same thing. You could install the Excel Connector:

Follow the instructions to set this up and you now have a new inbuilt Excel function called FIXID available. You can enter a formula such as:


… and this will give you an 18-char ID using the same algorithm. If you have problems installing this (or you just don’t want to), and you have some Excel/VBA expertise, you could add this code to your Excel installation:

Function FixID(InID As String) As String
If Len(InID) = 18 Then
FixID = InID
Exit Function
End If
Dim InChars As String, InI As Integer, InUpper As String
Dim InCnt As Integer

InCnt = 0
For InI = 15 To 1 Step -1
InCnt = 2 * InCnt + Sgn(InStr(1, InUpper, Mid(InID, InI, 1), vbBinaryCompare))
If InI Mod 5 = 1 Then
FixID = Mid(InChars, InCnt + 1, 1) + FixID
InCnt = 0
End If
Next InI
FixID = InID + FixID
End Function

Or if you are working with 15-char Ids in a Microsoft SQL Server database, you can find a T-SQL function at this address:

And Ron Hess, Salesforce Evangelist, has posted the code for a JavaScript equivalent function here:

The very best of luck!

Follow me/AstadiaEMEA on Twitter: Record IDs Enlightenment for Everyman

By Alan Shanahan – Principal Technical Architect for Astadia Consulting.

Are you using the full force of your Believe it or not, Record IDs can help if you’re not!

Apart from being what many regard as long, useless numbers; Record IDs in can in fact be very useful, whether you’re a simple user of the system, or an advanced developer looking to extend your applications.

Each table and data record in the system has a unique ID field assigned to it. You can’t remove the unique ID, nor can you change it; it’s something that is system generated each time a new record is inserted into the application. Unique IDs are in fact very useful for anyone designing and developing applications on the platform. To understand this better let’s look at a real example:

  • As an exercise, sign into your org and find an Account record to work with (In my case, I am using a developer org with some test data pre-loaded)
  • I’ve selected the Edge Communications account, which has an ID of 001A0000006Vm9u as you can see from the page snippet below Unique ID

So why are these IDs useful?

Basically, they provide a consistent, foolproof way to refer to a data record; right down to the ability to copy and paste a unique ID as a URL into the page address after the part of the address.

What many do NOT know is that these IDs, though unique, are also case-sensitive. This can present a challenge when you are using the ID values in external systems such as MS Excel or database systems.

To demonstrate my point, try this URL:

(substitute the na7 part of the URL for your own instance)

It almost certainly will not work, and you’ll see an error message (unless, by some fluke this ID actually exists in your system). To drive home the point, 001000000009Abc is *not* equal to 001000000009ABC, at least not in ID terms.

Useful information: Record ID values are copied without modification from a production org when a sandbox is created, but it is almost certain that any subsequent records created in the two orgs will have different ID values.

Now, you can do some interesting things with ID values. For example, the following characters (entered after the part of the web address) will place you in a new Contact record page: /003/e – Try it!

Similarly, these characters will navigate you directly to the Campaign Home Page: /701/o

Using just the 3-char prefix will bring you to the default view for that object e.g. /800

Entering a known record ID (15 or 18 characters) will direct you straight to the details page of that record: /00QA0000004wjDt

Here are some more useful shortcuts:

Useful tip: The 1st 3 characters of an ID indicate the object type (i.e. table name)

  • 001 = Account
  • 003 = Contact
  • 005 = User
  • 006 = Opportunity
  • 00D = Organization
  • 00e = Profile
  • 00E = UserRole
  • 00Q = Lead
  • 00T = Task
  • 00U = Event
  • 012 = Record Type
  • 015 = Document
  • 01t = Product
  • 500 = Case
  • 701 = Campaign
  • 800 = Contract… and so on

These prefixes never change for standard objects. Custom objects are assigned 3-char prefixes based on internal SFDC rules that we cannot predict. However, even if you’re not a developer or an expert user of, these unique IDs can provide a quick route to locate and amend data in the system. Not only that, it’s also quite a fun way to show how much you know about the system and how quickly you can navigate around it.

For those of you who are a bit more technical, my next blog post will go into the 15 or 18 character IDs in more detail…

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 28 other followers

Astadia EMEA on Twitter

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Our Authors

Previous Blog Posts

%d bloggers like this: