Wednesday, November 08, 2006

Checkboxes in Salesforce - aaarrrgghhh!

Quite a few of our customer often want to update checkboxes in Salesforce. To the un-initiated a checkbox in salesforce is a boolean (basically a True or False and using it means you get a nice looking box on your form that is either ticked (for true) or not ticked (for false)).

As nice as these are, from an integration perspective they are a pain in the ****. Why? Well, Salesforce treats checkboxes as booleans - That means that when you export the information from Salesforce it comes out as a one or zero. And, when you pass information back in to Salesforce you can only set 0,1 or True/False. This gives two problems, firstly displaying pre-selected information in Clicktools and second, pushing information back in to Salesforce

So what options do you have?

  1. If you are passing information in to a clicktools form you can only show information that is selected (i.e. true). That is until we can find a useable way of recognizing '0'.

  2. If you are creating information have a radio question in Clicktools with the options True or False. This is ok, but not in all circumstances. Please note: These will not be successfully pre-populated from Salesforce in to Clicktools.
  3. If you are creating or updating information have a one-option checkbox question, set the option to '1' and hide the question text.
  4. If you want to use Clicktools to present Checkbox information in a form and then use the same form to update it please speak to us - we can do it, it just involves a little manual effort.

Option 3 is quite clever as it presents a checkbox that people can select. This involves putting the following html '<p style=color: white>1</p>' in against the Option value in Clicktools which ends up looking in the survey like this:

The option is set to be 1 but, it is displayed as white so it can't be seen by the person completing the form. It's an acceptable solution and looks ok. We will come up with something better though - soon.

4 comments:

Unknown said...

Thanks for the workaround.

FYI -- found I needed to use:

style="color: white">1

(i.e. with quotes -- had to omit wrap around code as comment box wouldn't allow it, so include opening and closing p stuff, too)

Johannes&Elias said...

I wonder if there is a newer solution to this? We are having
troubles with our Yes and No radio buttons and need to know what to do...

thanks!
Best regards,
Katarina, Invest in Sweden Agency, Stockholm

Unknown said...

I use a fixed value with a condition. For example: the question that asks if it ok for someone to contact them has a checkbox for yes and a checkbox for no. I then pass that with a fixed value of 1 to a boolean field in salesforce and have the condition on the mapping that this is yes.

Unknown said...

Please ignore the above (which is outdated) and go here instead.