Greasemonkey Script for Salesforce.com Setup and Apps Links

October 4th, 2010

So…uh…who wants to tell salesforce.com that performing an operation that required one click and now requires two clicks is movement in the wrong direction on the click-o-meter productivity scale?

With the Winter 11 release they did this to admins the world over. To access the setup menu you must first click your name in the header and then click setup, system log, or log out. Why the extra click? I don’t know, it baffles me as they usually get the user interface and experience stuff right. Fear not for I provide a solution that will hopefully be included out of the box in the next release.

It is a Greasemonkey script where all you need to do is hover your mouse over your name and the options become visible. I tested in both Firefox and Chrome. You can download it by clicking here.

UPDATED: Hover support also added to App links, use same install link above.

Categories: salesforce 7 comments

Force.com + 500k emails = uh oh

October 4th, 2010

Force.com has limits. These limits are in place to make sure you don’t bring down the entire force.com infrastructure. To me these limits are simply a challenge saying, “break me, I dare you”. Building apps that find innovative ways to get around these limits can be incredibly annoying but I also find these challenges quite satisfying when you finally come up with with a radtacular awesome solution that works within the limits. In coming up with these solutions I tend to push the platform to the max…to the breaking point…. and this is one of those stories.

Awhile back I was asked, “Any idea how you could let users subscribe to a topic and then get a daily email regarding this topic with content driven from force.com?” This also had to scale up to 1000s of emails. I thought about this for a little bit, approximately 653 nanoseconds, and then came up with an idea. It was and still is a little crazy. Thousands of emails in a day is nice but I had bigger plans. Plans of epic proportions. I was going to build a email system on force.com that could literally send millions of emails in one day. Whuauahahahahahahahah!!!! (< -evil laugh). I mean, nothing could go wrong, right? Salesforce.com would have some sort of controls in place to prevent some crazy guy like me from building this right.......right? Read more…

The Salesforce Dot

September 28th, 2010

Once you see it…..The Salesforce Dot will haunt you forever…

Categories: salesforce 8 comments

The Best Way to Explain Code Changes

September 15th, 2010

Categories: Technology No comments

Getter Method Order and Visualforce Pages

August 24th, 2010

I recently had a Visualforce page that was working perfectly for over two years. This thing was solid, a workhorse, one of the most used pages I have ever created. Then one day it stopped working as expected. It wasn’t a big deal really, simply an warning message wasn’t being displayed to the users. All unit tests still passed and I had made no major changes to the code. What the crazy I thought?!? The only thing I may have done at some point in the past was make minor changes to the the layout or updated the page API version.

The way I architected the page from the very first day created a ticking time bomb that would show up two years after the page was created. Enter the world of Visualforce page generation and getter method order. Before I get to the juicy good stuff I’ll briefly explain how Visualforce pages are created…at a very high level.

Read more…

Seattle Force.com User Group – August 2010

August 5th, 2010

Major late notice here but today is a Seattle Force.com user group. If you are are Force.com pro or a n00b looking for more information about this platform swing by.

WHO: Me, you, and some other cool peeps.

WHAT: Discuss force.com related topics, questions, and technologies

WHEN: Today, August 5, 2010 4:00PM

WHERE:
West Monroe Partners
1215 4th Ave, Suite 1010
Seattle, WA 98161

WHY: See WHO & WHAT

This month’s meeting will be an open forum for any questions and discussion topics you may have.

Why I Can’t Buy the iPhone 4 (but really want to)

July 16th, 2010

This phone is cool, very cool. I really want it and when the first reviews started to come out I knew this would be my next phone. Enter the antenna issue.

Shortly after launch reports started to surface that touching the little back band in the lower left corner would significantly reduce cellular reception. Worst case the iPhone would go from five bars to no service. This was concerning. When the 3G came out there were reports of yellow tinted screens but this turned out to be a non issues so I thought I would wait it out to see what happens. Yet the reports continued to roll in.

We all know what happens next and if you are reading this I don’t need to go in to detail so here is the short version.

Read more…

Categories: Technology 5 comments

Choose My Next Blog Posts

July 13th, 2010

I’ve got a pretty decent back log of super awesome and overwhelmingly exciting blog posts. Some related to force.com and some not. I’ve got so many that I can’t decide what is next so I need your help. Below are a few of the top choices. The only teaser is the title of the post.

On this poll you can select two options so make your votes count!

What should be my next blog post?

View Results

Loading ... Loading ...

IP Address Geolocation with Force.com

July 9th, 2010

If you have a website knowing where your visitors are located is a powerful feature. For starters it makes your website appear to have super powers if it automatically knows where the user is from. You can do all sorts of cool stalker stuff, and by cool stalker stuff, I mean customizing site content based on the visitors location.

iplocation

There are several different ways to figure out where a visitor is located, each with their pros and cons. The two main ways are IP address tracing and HTML5 geolocation. There is a great guide on developer.force.com about HTML5 geolocation that you should check out. HTML5 is all the rage these days but both methods have their advantages. In my testing HTML 5 was more accurate but it requires input from the user. The user must explicitly grant permission for the browser to find their location. Depending on the use case this may or may not work. IP address tracing on the other hand requires no input from the user and can be done completely behind the scenes unobtrusive to the user. The down side is that it is not as accurate. Another issue to consider is that some users (think your parents) will not want to click a button that gives away the location because they may think the internet is full of scams and the website will use this information to track them down and steal their identity….just sayin. So these are the two primary methods and choosing one really depends on the type of application you are building.

Read more…

Serious Force.com Cookie Security Issue

June 25th, 2010

UPDATE:
Before you read the update I would encourage you to read the original article below first.

This is not a bug but an expected issue with the way force.com sites pages are cached. For some reason in my crazy head I thought the only items cached on pages where the html structure, images, css, etc. I thought that even on cached pages the controller would execute on every load of the page. This is not true. The controller will only execute once when a page is not cached. Any subsequent visits while the page is cached will not cause the controller to execute. So if you are populating dynamic data on the page with Apex it will stay there for the next 10 minutes.

This becomes a major issue with pages that depend on cookies and customizing the site content per visit.

I’ve recommended that salesforce.com update their documentation with two big red bold updates:
1) Cached pages will not execute the controller on load
2) Pages that use cookies to display dynamic data should never be cached

I hope this is helpful to someone out there as I definitely learned something today.

Additional info can be found here: dev board post.

-Jason


Original Post:

I have discovered a major bug with the new cookie feature released in the Summer 10 edition of salesforce.com. Let’s get straight to the point. Cookie data is being passed across different browsers, different computers, and different users. Yes, you heard this right. Sounds unbelievable so I created a video that shows this happening. Clearly this is a major issue if you are storing session or personal information in cookies.

Before anyone rips into me for blogging about what could be a very significant security issue I have already notified salesforce.com and it is a high priority issue. I also believe it is best to get this information out to other force.com developers before they build something that depends on this functionality and this issue causes major problems for them.

At this point I highly recommend not using the new cooking feature until more information about this issue or a fix is released.

Page:

<apex:page controller="CookieBug" expires="60">
    <apex:form >
        <apex:inputText value="{!input}"/>
        <apex:commandButton value="Update Cookie" action="{!updateCookie}"/>
    </apex:form>
</apex:page>

Controller:

public class CookieBug{
 
    public String input {get; set;}
 
    public CookieBug(){
        //Autofill input based on cookie value
        Map<String,Cookie> cookies = ApexPages.currentPage().getCookies();
        if(cookies.size() > 0){
            if(cookies.get('myCookie') != null){
                input = cookies.get('myCookie').getValue();
            }
        }
    }
 
    public void updateCookie(){
        List<Cookie> cookies = new List<Cookie>();
        Cookies.add(new Cookie('myCookie',input,null,15552000,false));
        ApexPages.currentPage().setCookies(cookies);
    }
}

Dear Apple: Please Add Image Stabilization to iPhone Video

June 21st, 2010

There was a time long ago when home made videos where smooth and stable. The main reason for this was the size of the camera. Look at this bad boy…

vhs

While the quality of the video was horrible it was usually pretty stable and not bouncing all over the place. For starters it would literally rest on your shoulder which is a pretty solid platform. It is also physically large and therefore requires a lot more movement to cause a shaky recording. Over the years this has become more and more of a problem as cameras have become smaller and smaller.

Read more…

Categories: Technology 6 comments

Seattle Force.com Developer Meeting – June 2010

May 28th, 2010

UPDATE: I’ll be demoing how to authenticate with OAuth using Force.com and how this can be used with the Twitter API.

It’s that time again for the Seattle Force.com Developer Meetup. Details below…

When: 6/3/2010 4:00 PM – 6:00 PM Pacific Daylight Time
Where: 7 Simple Machines Office
Subject: Seattle Force.com User Group Meeting – June 3
Comments: This month, our meeting will be held in a new venue. 7 Simple Machines has offered up a change in venue for us in June.

Location:
Their office is located at:
800 Maynard Ave S, Suite 208
Seattle, WA 98134

http://www.7simplemachines.com/views/ContactUs.aspx

As always, bring your any ideas and questions to the meeting to discuss with everyone!

Dear Microsoft, Please sue me.

May 20th, 2010

As you’ve probably heard Microsoft is suing salesforce.com over nine patents Microsoft holds. One would probably assume these patents are for some ultra complicated algorithm or computer process hidden within the depths of top secret Microsoft source code. Well you’d be wrong, really wrong.

Let’s take a look at just a few of the patents they are suing over.

1) System and method for providing and displaying a web page having an embedded menu
2) Method and system for stacking toolbars in a computer display

Wait, what?!?! They own a patent on a flipping web menu!?! Yes, it would appear so. So if you have ever created or implemented a menu on a web page you are infringing on a Microsoft patent. See the menu across the top of this page? Yup, I’m a rebel.

3) Aggregation of system settings into objects

I’m not patent lawyer but I’m pretty sure this one means you can’t store some type of system setting (aka text/boolean/etc) value in an object. I didn’t read through the entire patent filing but I’m guessing ‘object’ refers to a class object or database object. So if I can’t store system settings in any of these two places where on earth can I store them! Maybe Microsoft thinks there is some pixie dust magic land where settings can be stored.

4) Timing and velocity control for displaying graphical information

This is lawyer speak for a time delayed tool tip. If you put your mouse over an icon, stop, wait 300ms, and show a tool tip you are busted! So the thousands of websites that have implemented this type of functionality are infringing on a Microsoft patent.

These are just a few of the patents Microsoft is suing over and the others I didn’t list are just as ridiculous.

What is all this madness? Well, there is a lot of crack smoking going on here. First we have the US Patent office smoking crack and approving ridiculous patents like these. Secondly, we have Microsoft smoking a little something suing over these absurd patents. If they were really concerned about protecting their intellectual property they would be suing a lot more people that have implemented these types of features, but they aren’t. They are suing a company that is a direct competitor that is innovating faster and more successfully than Microsoft in the given space. It’s is clear Microsoft is using it’s size and money ($250B) to take on a smaller company like salesforce ($10B) in the courtroom rather than on the keyboard which is just sad.

Some will say, “But Jason, you are biased supporter of salesforce.com”. Yup, that is probably true, but Microsoft isn’t really suing salesforce.com. They are suing all of us. Where “us” is any web developer or smaller company that has created the functionality mentioned above.

Seattle Force.com Developer Meeting – May 2010

May 5th, 2010

I really need to get better about posting these earlier but if you are able to make it to the Seattle Force.com Developer Meeting we would love to have you stop by. All are welcome, pros and noobs. Below is the info regarding the upcoming meeting.

Our next Force.com user group meeting will be held on Thursday, May 6th.

Time: 4:00pm – 5:00pm PDT
Location: WMP Seattle
1215 4th Ave, Suite 1010
Seattle, WA 98161

Richard Saunders and Evan Callahan will be presenting their Client Management System.

As always, we are looking for people to present at our future meetings, so please let me know if you would like to share something with the group.

The Best Way To Eat An Orange

May 3rd, 2010

There are many ways to eat an orange. This is the best way.

1) Find a delicious looking orange.
img_0288 Read more…

Categories: Life 7 comments