I was quite excited by the introduction of the hashCode and equals methods to custom classes in Winter ’13, as I was finally going to be able to get a map to behave the way that I wanted it to. I started to write such a map and a post to go with it when [...] Read more – ‘Generating Hashcodes’.
Over the past few weeks I have been getting a few requests from some of our customers to add a feature to one of our products; some minor integration with Chatter. Being a company that prides ourselves on being responsive to our customers wants (once a little common sense has been applied of course) we [...] Read more – ‘Handling Optional Platform Features From APEX’.
Reading other people’s code is great, be it good or bad, functioning or broken there is always something to discover – and generally it is something that makes you think: “d’oh, why didn’t I see that before?” I liked my latest discovery so much that I thought I’d share it myself for those, like me, [...] Read more – ‘Accessing Record Types Consistently’.
A slight departure from my normally technical posts to give me a chance to get a random thought off my chest. Rypple is doing it’s best to revolutionize the way in which staff and teams are managed and it seems to be a great tool to do it wit. However lately I’ve been wondering about [...] Read more – ‘An unusual use case for Rypple?’.
Last Thursday was a sunny one in Bristol, UK. It was also the inaugural meeting for the South West’s Force.com dev group. The group met in The Elephant in the city centre and was, according to those left at the end of the night, a great success. We never expected the group to be big [...] Read more – ‘The First Bristol Dev Meetup’.
When it comes to technology I love proving that things are possible even if, at the time, they have little practical value. The latest example of this trait comes in an idea I had whilst tramping through the Welsh countryside last week: wouldn’t it be cool to be able to broadcast your view of Salesforce [...] Read more – ‘Sharing my Salesforce screen with remote users’.
The requirement to move numbers between bases is something that I haven’t need to worry about in a while with most interfaces dealing strictly with a decimal base. Having said that, as the laws of the universe dictate, I have found myself of late needing to deal with hexadecimal numbers. The ability to switch between [...] Read more – ‘Hex to Dec and back again’.
My previous post glanced over the details behind the dependency management framework that I have started to build. However the intention of this post is to rectify that and go through the core parts of the code in more detail. Hopefully giving you a better idea of how it currently works. There are two main [...] Read more – ‘Force.com Dependency Management: A More Detailed Look’.
I’m starting to sound like a broken record I’m sure – constantly going on about why we should be using interfaces in Salesforce more, why we should be breaking tightly couple code blah blah… Go here and here if you haven’t already been exposed to my rabbiting! Now, I don’t just write this stuff I [...] Read more – ‘Force.com Dependency Management: A First Pass’.
We are all grateful for and love the native JSON support that was introduced to the platform in Winter 12 it has certainly made lives much simpler when it comes to integrating with external systems. One of the reasons that the introduction of JSON support was such a step change for the platform was the [...] Read more – ‘JSON deserializtion: Have Salesforce got it wrong?’.
Since setting up my new business Wickedbit I have been spending a lot of time looking at integrating Salesforce with various third party applications. I love integration work which is just as well as one is never like another, despite there being standards for things like authentication and data payloads people still seem to relish [...] Read more – ‘Convert a Blob to a Hex String in Salesforce’.
Wizards – the step by step type, not the spell casting type – they’re not much fun. Well, at least that’s what I think; to be honest there are few things less interesting to code in the world than another Wizard. The trouble we have is that it’s a paradigm that’s presented to the end [...] Read more – ‘A VisualForce Wizard Framework’.
I woke up this morning to a bug in a production environment, it seemed fairly innocuous but being a sensible individual I went off to the sandbox first to replicate it before blundering into production with a fix. Things got interesting when I couldn’t even get to the page that I needed to in order [...] Read more – ‘Empty Maps and VisualForce in Spring ’12’.
I’ve once again had the pleasure over the past few days of using Custom Settings in Salesforce. I strangely enjoy using them; they are designed for a job and they do that job well. Well, that was how I felt until this most recent encounter with Custom Settings. The difference this time was that I [...] Read more – ‘Beware of Hierarchical Custom Settings’.
Counting weekdays in Salesforce is something that you see cropping up every now and then and generally speak the same solution gets wheeled out – loop through the days between your two dates and count the number of days that are Saturday or Sunday. This has, ever since I first saw it, frustrated me; it’s [...] Read more – ‘Counting weekdays’.
Last night I got to enjoy another fantastically organised SFDC London Dev Meetup. I really enjoy these events not only for the excellent talks and the great knowledge that comes form them but also for the chance to just meet people that all have the same appreciation for the platform as each other. I can’t emphasise enough how good [...] Read more – ‘SFDC London Dev Meetup’.
The arrival of Winter ’12 brings with it the long awaited feature, by me at least, native JSON support. This is a massive plus for the platform and it’s ability to support further integration with external systems – something which is key to the survival of any cloud based platform in this day and age. [...] Read more – ‘sobject-serialization project update’.
The past few weeks have been quiet for me in terms of any kind of technology driven activity, outside of work. Mainly due to the massive reorganisation of the house that we’ve been undertaking: creating an office, remodelling the living room, creating a nursery and contemplating the merging of the kitchen and dinning room – [...] Read more – ‘Project updates’.
We all know that SalesForce enforces a 75% code coverage rule for code in production and whilst it can be a pain having this pushed down on us it’s also a great thing. A great thing, that is, so long as we write good tests, assert sensible conditions and as a consequence achieve fantastic code [...] Read more – ‘Salesforce’s missing interfaces’.
I have just pushed an update to the sObject serialization project up to GitHub. This update is a class to serialize/deserialize sObjects into JSON. This removes the dependance on the native string.valueOf() method that the earlier serializer was dependent on and also means that the objects are converted to a standard format rather than a proprietary [...] Read more – ‘JSON serialization for sObjects’.
I thought I’d add a quick guide to getting the demo installed and running to save you having to read all that guff in the other posts. 1) Download and install this package into your SalesForce Org. 2) Log into this site with your SalesForce credentials; keep this window open. 3) Call Console.Write(‘Hello World’); from you Org – be it [...] Read more – ‘A quick start to SF Console’.
SF Console is a cross between a need to create some form of remote logging for APEX and an excuse to try and get my hands dirty with some technologies that I hadn’t tried before. In my head there are three parts to this story; the links to the other two are below and will [...] Read more – ‘SF Console version 2: A node.js experiment’.
Yet another update to the AnotherBoringUtilClass. This time it’s to extract a Set of fields from a list of objects. I find myself writing the same loop over and over to do this work – often in a trigger or another bulkification scenario. The idea is that this method will take a list of objects [...] Read more – ‘AnotherBoringUtilClass: Extract a Set from a List’.
SF Console is my attempt to bring a Console.Log() statement into being within APEX and hence giving me some way, other than debug logs, of outputting some diagnostic information around code execution. In my previous post I pretty much just threw it into the wild and let it speak for itself, it is after all fairly [...] Read more – ‘SF Console version 1: Just hacked together’.
I recently needed to get the day of the week from a Date in SalesForce and I was amazed to find that there’s no weekday() method on the date object; month: yes, day: yes, weekday: no. Anyway I came up with the following addition to my AnotherBoringUtilClass: This will return a zero based day for [...] Read more – ‘AnotherBoringUtilClass: Day Of The Week’.
The debug logs in SalesForce are great; they’re a rich mine of information about the execution of the various parts of the platform. However in some cases they can be too rich; trying to trace through code or inspect variables using System.debug() statements can be a bit of a pain to say the least. Then [...] Read more – ‘Force.com Custom Console’.
After reading this post yesterday on Dynamic Visualforce Controllers I decided that I should should stay well away from the subject and leave it to those more experienced and more intelligent than myself to debate. And I am sticking to that decision; no one needs my ignorance muddying the waters. However one of the comments [...] Read more – ‘Generating HTML from within APEX’.
A quick update on the sObject serialization code. I have added the project to GitHub as promised and I have also submitted it to the Force.com Code Share site too. Although if/when it will appear on there I have no idea. Other than that I haven’t, as of yet, managed to actually update the code [...] Read more – ‘sObject serialization project update’.
Yes, when it’s ajar… we all know it. But what about these two snippets of code? And then So, what about them? They seem the same – I mean they do the same thing I’ve just used a slightly different syntax, so what? Well our friend SalesForce doesn’t see them as the same. And I’m sure that [...] Read more – ‘When is a door not a door?’.
I discovered something this week: you can’t pass sObjects as parameters to methods that are decorated with the @future annotation in SalesForce. It is documented, I’d just missed it previously – it is there just read carefully. Oh, bummer, I like passing sObjects around. I decided to solve the issue by serializing the sObject to [...] Read more – ‘Passing sObjects to @future methods in SalesForce’.
It’s often the case that we want to check to see if a record exists and depending on the outcome perform differing actions – often resulting in either an insert or an update. Thankfully we have the database upsert to help us in this quest however I feel as though we’re then let down by [...] Read more – ‘The shortcomings of SalesForce’s upsert’.