Salesforce: Files vs CRM Content vs Knowledge vs Documents vs Attachments

Choosing the right file or document management system on- (or off-) platform can be a difficult decision, and one of those things that’s difficult to change once implemented so it’s important to make the right choice up front. Salesforce.com has a number of content and document solutions (and more on the way) and the options when given a set of decision points aren’t always clear. To this end I’ve created a matrix comparing the on-platform systems which should make that decision easier. It’s based on the official documentation but add in a few other key decision points (please don’t sue me Salesforce, I’m just a lowly a certified technical architect!). If I’ve got anything wrong, or left something out please let me know.

Salesforce User License Feature Matrix

Understanding Salesforce licensing is incredibly important for all areas of a business buying salesforce and implementation projects. Common questions are: What licenses are available? How much do they cost? Which license types support my intended solution? What are the limitations? How are they “consumed”? As part of my Salesforce TA Certification I created a matrix that compares all current license types making it easy to learn about licenses and make the licensing decision a bit easier. The matrix isn’t comprehensive but instead tries to balance ease-of-use whilst providing the most important decision points. Let me know if I missed anything important! References User license types Getting started with communities

Salesforce Certified Technical Architect

Fall seven times, stand up eight. – Japanese proverb Finally, I have this certification. This has been a journey for me, and taken much longer than I anticipated. I did fail the first attempt, but was given a retry (make-up exam) in the sections that I’d failed. I subsequently failed that too. My second, full attempt saw me pass, and in fact I found it quite easy so let me help you learn from my mistakes. Attempt 1 Late last year I booked in my board review exam. I’m not going to go into the detail of what the board exam entails it’s because this has been discussed in detail here, here and here. I spent a lot of time preparing, and had some ad hoc coaching from the UK SFDC certification team but in the end the hypothetical exam destroyed me. Here’s why: I’d been developing apps for nearly a …

Read more

Salesforce: Sharing Cheat Sheet

Sharing is complex, but necessarily so. It gives you incredibly fine-grained control over data access through it’s flexibility but requires quite a deep understanding to do it properly. There are great articles out there that describe sharing in detail e.g. Force.com object and record level security An Overview of Force.com Security I don’t want to recreate what’s in those articles, instead I’m providing a short, sharp cheat sheet of the major topics you need to understand. So without further ado… Sharing Cheat Sheet Sharing Metadata Records Implicit Sharing Organisation-Wide Defaults (OWD) No Relationship Master Detail Lookup Manual Sharing Apex Managed Sharing Recalculation Choosing the Right Share Type “Traditional” / Ownership-based Sharing Rules Criteria-based Sharing Rules Apex Managed Sharing Rules Manual Sharing Rules Share Groups Sharing Sets Portals High Volume Portals (Service Cloud Portals) other portals Large Data Volumes If you’ve got any other items you think should be in this …

Read more

Salesforce: Insufficient privileges when trying to access Activity Settings

This strange issue blocked access to certain areas of the setup menu in my production Org, and I couldn’t find a comprehensive solution so here we are. The problem is documented most comprehensively here with problem statement as: If you choose to show a custom logo in meeting requests, if the admin who specifies the logo specifies a document that other admins cannot access, then other admins will be locked out of the entire activity settings page. If the file was created in the last six months you can find out which fart-face did this and have a quick chat with them. However, if the change was made more than 6 months ago you’re in a bit of a sticky situation. The advice of the aforementioned document is to contact salesforce.com support and ask them to let you know who owns the file. However, you can do this yourself using …

Read more

Salesforce JavaScript Remoting: Using Apex and JavaScript objects to pass data from client- to server-side and vice versa

I’ve spoken about how to do this at a high level during Cloudstock London and there are hints at how it can be done but no formal documentation that I’ve found, so here we are 🙂 Quite simply JavaScript Remoting will transform Apex objects and classes (or collections of these types) into JavaScript objects for you. The opposite is true too but there are some rules you need to observe. Apex Types to JavaScript Equivalents This is the easier of type conversions in that you don’t have to really do anything to make it happen. The code below uses a custom class that I’ve defined but you can do the same with any sObject too. Let’s have a look at the code. The Controller The Visualforce The Output JavaScript Types to Apex Equivalents This is a little tricker, especially when it comes to sObjects. Note that the approach below works for …

Read more

Using the Heroku Shared Database with Sinatra and Active Record

ActiveRecord is an amazing (mostly) database-agnostic ORM framework and so it’s a natural choice to use with non-Rails frameworks such as Sinatra. Note that I’ll be using sqlite3 locally but the Heroku Shared Database is a Postgres database so I’ll be setting my environments appropriately. In this post I’ve assumed that you have a Sinatra app that is working locally and on Heroku. Getting it working locally First up you’ll need a few extra gems in your Gemfile, once again note that I’m using different databases in development, test and production environments. [code language=”ruby”] source ‘http://rubygems.org’ gem ‘sinatra’ gem ‘activerecord’ gem ‘sinatra-activerecord’ # excellent gem that ports ActiveRecord for Sinatra group :development, :test do gem ‘sqlite3’ end group :production do gem ‘pg’ # this gem is required to use postgres on Heroku end [/code] Don’t forget that you’ll need to install the gems using bundler. [code language=”bash”] bundle install [/code] And …

Read more

Voodoo – A Todo list that demos the power of KnockoutJS

This small demo app will demonstrate the usage and power of JavaScript MVC frameworks and in particular KnockoutJS. You can learn more about the framework through the tutorials on the KO site. I will gloss over some of the details but you can learn more in framework documentation. My goal here is to give you a high-level sense of what’s possible. The picture along side shows what we’re building. You can find the demo here and the full sourcecode here. The HTML Strictly speaking jQuery is not required for KO to work but it is likely that you will often include it as a helper for the framework. As alway you need to start with the static resource inclusions. [code language=”html”] <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="js/knockout-2.0.0.js"></script> [/code] And you’ll need a form in order to create new todo items. [code language=”html”] <form data-bind="submit: addTask" id="create-todo"> <input class="new-todo" data-bind="value: newTaskText" …

Read more

The rise of JavaScript and it’s impact on software architecture

MVC and it’s siblings have been around for a while and developers are comfortable bathing in the warm light of their maturity and wide-spread advocation. However, a few years ago developers started doing more of their coding client-side and as a natural consequence the lines between M, V and C became blurred leaving many of us cold and uncomfortable when trying to explain where the architectural puzzle pieces belong.

I’m sure you’ve had a similar experience. Anyone who’s used jQuery, for example, has been in the uncomfortable situation where controller code now exists within view and even worse these two are tightly coupled by virtue of jQuery selectors. To make matters more complicated if you’ve ever used class-names for application state or .data() then you’re model, view and controller are now more tightly bound than the figures in a Kamasutra carving.

This is not a new problem but the solution(s) are quite new to me and so I thought I’d share my experiences.

jQuery is Great. But…

Read more

Salesforce: JavaScript Remoting and Managed Packages

I love the crap out of JavaScript Remoting, but came across a small bug when wrapping up the code in a managed package. As many of you know when you create a managed package it prepends your code with a unique name to prevent code conflicting e.g. a page controller called “MyController” becomes “MyPackage.MyController” where “MyPackage” is the prefix you’ve chosen for your managed package. The bug I’ve found is caused by the fact that the prefix isn’t applied to the JavaScript that calls your Apex Remoting methods i.e you might have an Apex method called “myMethod” which is called like so outside of a managed package environment: [code language=”javascript”] MyController.myMethod(parameters, function(result, event) { callback(result); }, {escape: false}); [/code] Once you package up your code however this call will no longer work, and if you look in the debugging console of your browser you’ll find an error something like: “MyController …

Read more