Authenticating against the Force.com Web Services API using Java and Apache Axis

by Jon Mountjoy on July 10, 2009 at 06:41 AM

This video shows how to authenticate against the Force.com Web Services API using Java and Apache Axis.

It's one of my first attempts at a screencast - hopefully the next one I have planned (on the logic layer in Force.com) will flow a little faster! It's also HD (hit the HD button and full screen to view it in all its glory).

You can find it on the wiki too, which points to additional related resources.

LMK if you find this format useful. I've tried to keep it really short!

License Management App (LMA) 2.1 is now available!

by Sati Hillyer on July 7, 2009 at 12:54 PM

Available today is the new version of the License Management App (LMA)! LMA 2.1 offers some new enhancements to help you as an partner know more about your customers. Two new features include:

  1. The partner can now know how many users in the customer org have been granted a license to their package. LMA 2.1 includes a new read-only custom field “Used Licenses” on the “License” object for this purpose. Note: Existing licenses will not have a value for this field after upgrading to LMA 2.1. Modifying a license and saving the record will populate this value. Contact support to have a batch utility run to update multiple existing licenses in your org.
  2. Via Apex, the partner can query whether or not the user in context has license to the package.

LMA is a Managed Package, so upgrading is a breeze. Just visit the AppExchange listing and click Get It Now. The installation wizard will install the latest version, while maintaining your data and customization.

Developer Gigs on Force.com and Plugging In

by Jon Mountjoy on July 6, 2009 at 06:56 AM

JP has a great blog post: Landing Your Next Developer Gig on the Force.com Platform written for aspiring Force.com developers - and I wanted to blog a pointer as it's well worth a read. He also has some great tips on getting involved:

  • Get on Twitter
  • Plug in to the Developer Community
  • Connect on LinkedIn
  • Get to Dreamforce
  • Bid on oDesk
  • and many more, such as donating your talent to a non-profit

I just wanted to add a few points on "plug in to the Developer Community". How can you do that? Well:

As JP says, Welcome to the Cloud and Good Luck!

Supercharge your Email Template Merge Fields

by Quinton Wall on July 2, 2009 at 12:02 PM

I was working with some colleagues this morning who had a requirement to send an email using the email template functionality, but wanted to access data from a grandchild object (so Parent Object-->Child Object-->Grandchild Object). At first glance the UI only allows you to select fields from the Parent or Child object, but fear not --- you can supercharge your email template merge fields with just a little extra effort.

Merge
Take the example of a school which has an Enrollments object which is related to Classes via a Master Detail relationship. Classes have a similar relationship with Venues (a class has to be held somewhere), but an Enrollment really shouldn't have any sort of relationship with a Venue (thats the classes responsibility). To make things easier we may model this the Class-Venue relationship in another custom object, we could call ClassVenues:


Cv

With our newly discovered superpowers in the Email Template, we can easily traverse the new relationship to send our student all the details they need to make it to class right on time. The trick is writing the merge field yourself. You can use the Available Merge Field picklists as a start, but you have to manually add the grandchild relationship. For this example the following code works great:

{!Enrollment__c.Class__c.Venue__c.Building__c}


Template

Now if only I could get fix the 'dog ate my homework' problem :)

Announcing the Force.com Cloud Developer Challenge

by Jon Mountjoy on July 2, 2009 at 10:59 AM

challenge-1.jpg

We're excited to announce the Force.com Cloud Developer Challenge!

In February we broadcasted the winners of the previous challenge (Force.com Sites Developer Challenge) - which resulted in some outstanding submissions. See for example the gaming e-commerce site, a complete e-commerce site, and a wiki!

Now that Force.com Sites is GA, it’s time to innovate yet again. The Challenge home page has all the rules, the sign up and the submission links, but I guess the most important pieces of data are here:

* the end date – July 31. A month for a masterpiece. Or two. You can submit more than one entry if you like.
* the app must be built on Force.com, and it must use Force.com Sites (so that we can all visit it and see it in its glory)
* sign up here

We’ll again be rewarding submissions that catch our eye – this time with a MacBook Pro, iPods and iPod touches. Oh, and the all-important exclusive t-shirts as well!

Interested?

PS. We also have a discussion board where we can all discuss various aspects of the challenge. Good luck!

PPS. If you want to tweet, how about using the #forcechallenge tag!

Governors are not evil.....

by Nick Simha on July 2, 2009 at 10:02 AM

Every programming environment has a set of constructs, features and constraints.  These may vary but in every programming environment, the programmer has to consciously manage resources.  These resources could be memory, socket connections, file descriptors etc. - I remember coding in C++ where bad memory (heap) management could bring the entire program crashing.  Java provided better built in support for this aspect but the programmer still had to work within the constraints of the actual heap space available and ofcourse manage the other resources like socket connections, threads etc. 

How does all this relate to Force.com? Your Force.com program runs with all the other programs in a multi-tenant environment where all the resources (memory, network, database connections etc.) is being shared with every other program.  Thus it is very important that the platform not let a badly written program hog all the resources and affect the performance of all the other programs running on the platform.  Force.com does this via governors - when a program exceeds its allocated quota for some resource, an exception is thrown.  To be a good Force.com programmer you need to understand this well - think of the governors as helping you with resource management.  Andrew Albert has written a great article on governors, read it to get started on the way to write efficient, scalable programs on Force.com.  Happy Holiday!

Let's talk about Governors

by Andrew Albert on July 1, 2009 at 03:26 PM

Are you a new Force.com developer? About to write your first Apex trigger or class? Or already developed some Apex just to run into a governor limit? Want to learn more about governors in Apex?

If so, check out this new technical article that explains what governors are, why they exist, and how they are calculated. The article is intended for architects and developers writing Apex code on the Force.com platform. Here is a brief snippet from the Abstract:

Apex Code is the Force.com programming language used to write custom, robust business logic. Apex is compiled and executed on the Force.com multitenant infrastructure, which is a shared resource across all customers, partners, and developers. Consequently it is important that Apex code uses infrastructure resources efficiently.

This is where Apex governor limits come in. Governor limits are runtime limits enforced by the Apex runtime engine to ensure that code does not misbehave. This article presents an overview of Apex Code governor limits, why they are important, and how to design scalable, efficient Apex code.

If interested in reading the entire article, it can be found here.

Becoming the next salesforce.com

by Sati Hillyer on June 30, 2009 at 05:13 PM

If you have commercial intent and your looking to build the next killer app on Force.com, then you're going to want to attend our next Tech Talk. Come join Andrew Smith, our Application Distribution PM discuss what's new with packaging.

With every release, our customers are seamlessly upgraded to the latest version without having to worry about their customizations breaking. The latest enhancements in packaging are going to let you offer this same type of experience to your customers. This means when you release a new version of your Force.com app, your customers can be confident functionality they've built on top of your prior versions will not break. You can continue to release new features while maintaining backwards compatibility.

Application Distribution is a very important area of Force.com and crucial to your commercial success on Force.com. So come and learn what's available today and what's coming! Register now!

Tech Talk: Want to Learn About Building Email Services?

by Rasmus Mencke on June 26, 2009 at 04:04 PM

Join the webinar Tech Talk Series: Email Services on Force.com on Wednesday July 1st.

Will give you a great introduction into how you can leverage Email Services and start building email integration into Salesforce. You will learn and see examples of how to build your own services.

We will show you

  • What are Email Services
  • How to build an Email Service
  • Security model for Email Services

See you on July 1st!

Rasmus Mencke
Senior Product Manager

 

Opportunity Field History Through the API

by Quinton Wall on June 25, 2009 at 09:40 AM

One of the great features of the Force.com platform is the ease at which you can meet auditing requirements such as field history tracking. With just a few clicks you can add history tracking to most standard objects, and any custom object. And because everything on the platform is metadata driven you can access this same field history information through the API:

  • For a custom object, you could use a query such as:
	SELECT OldValue, NewValue, Parent.Id, Parent.name, Parent.customfield__c 
  FROM foo__history

  • For a standard object, you could use a query such as:
	SELECT OldValue, NewValue, Parent.Id, Parent.name, Parent.customfield__c 
  FROM ContactHistory

I had a customer query this morning asking about Opportunity field history, and access through the API. Naturally, your first instinct is to look for an OpportunityHistory table, which certainly does exist; But Opportunities are a special case, it seems, when referring to field tracking. The OpportunityHistory table stores a record of how a particular Opportunity has progressed through the various stages of it's lifecycle.
I did a little digging, and if you want to access field history tracking for Opportunity you need to use the OpportunityFieldHistory table instead:

	SELECT OldValue, NewValue, OpportunityId FROM OpportunityFieldHistory

Ophist 
It's a small tip, I know --- but sometimes these are the best ones.