Tag Archives: visualforce

Hacking Salesforce – Part 1 (Resource)

Introduction of Salesforce

My company uses Salesforce as its online CRM solution. And I happen to be in charge of this team. So, I get a chance to mess around with it. The more I look into it, the more I like the idea and infrastructure behind it. I am not going to dig deep into the beauty of its architecture in this post. Instead, I would post some useful resources to get you to start playing with it. To begin with, I would open a developer account in force.com. The developer account gives you all the enterprise edition feature with no time limit. The caveats are that  you can only have 1 admin and 1user account, and your account is limited to several MB storage space only. However, it is good enough to get a good taste of Salesforce. After you sign up, you can go to its invaluable Wiki and Discussion Boards to obtain tips and starter tutorials. Salesforce also made 2 ebooks available. They are:

  1. Introduction to the Force.com Platform – for beginner
  2. Force.com Cookbook – for intermediate user

Now I assume you can do the followings:

  1. Create custom objects and fields via SF UI
  2. Build object relationships
  3. Create validation rule and approval process
  4. Customize the layout for object (very limited without Visualforce)
  5. Create S-Control
  6. Mess around with Salesforce Security Model.

Great! You are now empowered by Salesforce to build a solution for your company. However, you may encounter issues related to its UI limitation like you cannot hide a field when someone selects a particular field on a picklist (resolved by Visualforce) or you cannot populate another object when one object is saved (resolved by Apex Trigger). You may find a way to get around this problem but I bet it is not going to be pretty. If you are interested to unveil the true power of Salesforce, keep reading.

Become a expert user

If you are interested in solving the UI and functionality limitation above, please take a look at the following ebooks:

  1. Apex Developer’s Guide
  2. Visualforce Developer’s Guide

Become a developer

OK. You are like me, the tools above may not satisfy you completely. To fully control its UI, I would use Flex. To fully manipulate the data model, I would like to use its API. If you are interested in building the next killapp on top of Salesforce platform. Here are some of the APIs that you may be interested:

  1. Apex Web Services API – Covers the SOAP API in all its glory. I personally wish this was REST, but SOAP is better than everything but REST.
  2. Apex Metadata API – A newer API, the Metadata API allows us to define the structure (fields and relationships) of our custom objects via XML rather than via the declarative point-and-click interface. Unfortunately there’s no Metadata API available for standard objects (Contacts, Accounts, Opportunities) yet, but I expect that to change this year.
  3. Apex AJAX Toolkit API – The AJAX Toolkit is primarily used with S-Controls, which are being phased out in favor of Visualforce. To be honest, the AJAX Toolkit has always seemed like a workaround hack to me, and hopefully the combination of Visualforce and Apex Code will render it obsolete.

I will keep this post updated for the new features Salesfoce releases in the future. :mrgreen:

  

Leave a comment Continue Reading →

Power up Salesforce UI via Flex

Get started

Follow the steps below to get your first Flex salesforce app up in Salesforce.

  1. Register a developer edition account from Salesforce. Note: Dev account never expires but the account does come with a few limitations. You can only have two users, one an admin account so that you can build and install applications and the other a normal user account so you can test your work from the perspective of a normal user. The account has a 2MB data limit and you can send mass email. However, It is totally fine for playing around all the features that Salesforce provides.
  2. Download the Flex Salesforce Toolkit (ie. force.com-air_flex-1.0.zip). This toolkit provides the needed libraries to communicate directly with your salesforce.com database records from within a Flex application, using native ActionScript packages and returning strongly typed classes.The documentation on the classes can be found here.
  3. In this zip file, there is a library called as3Salesforce.swc in the bin directory just off the root of this zip file. It is the library you need to associate to your Flex project.
  4. Create a Flex project and include the swc library in it.
  5. You can follow this screencast to get your first project up.

What you can do after that?

Now you have your Flex application run locally in Salesforce. Here is my TODO list and the solutions of each one.

  1. Run your app under your own website and pull info from Salesforce using the same api.
  2. Run your app under Salesforce and have it pulled data from your system thru Flex Remoting (HTTPService, WebService, RemoteObject…etc).
  3. Can we use the API to pull Salesforce metadata like SControl?
  4. How can we provide our application via Apex Exchange?
  5. How can we use the Salesforce Flex AIR Toolkit to make have your application deal with Salesforce in offline mode? Look into this article.

What Flex gives you but not original Salesforce UI?

Now you know how to integrate Flex with Salesforce. But what problems that Flex helps us solving but not the original Salesforce UI?

  1. Capture user events on the fly and display additional fields or populate bunch of fields.
  2. Visual the data via Flex charting.
  3. Full control on the layout, and look and feel.

  

Leave a comment Continue Reading →