Archive for Winter ’07 Category Feed

Set Child Relationship Name on custom Relationship fields

This post only applies to relationship fields (lookup and master-detail) that went through the Winter ’07 upgrade.

If you plan to use SOQL relationships in queries that have custom relationships to other objects, you should go and edit your custom relationship fields to include a Child Relationship Name. This allows you to use a user-friendly name for the relationship when querying the master object.

Going forward, this field is set for you. However, after the Winter 07 upgrade, this field was left blank on all relationship fields. Without making this update, SOQL relationships will still work, but you will be forced to use an archaic value for the relationship name. That archaic value will look like a Salesforce ID.

The Salesforce online help has very good documentation on relationships, but here’s a quick example.

Suppose you had 2 custom objects before the Winter 07 upgrade: Quote and Quote Line. Quote Line has a relationship field called Quote, which sets a master-detail relationship between quote (master) and quote line (detail). After the Winter 07 upgrade, the Child Relationship Name on that relationship is null. You need to update it. To do so:

  1. Go to your custom object (Quote Line in this example)
  2. Edit the Quote relationship field
  3. Provide a value in the Child Relationship Name field


Doing this allows you to make a query like:

Select q.Name, (Select Id, Name From Quote_Lines__r) From Quote__c q

To get this setup correctly in your org, you should go through each object and make sure this is set for all custom lookup and master-detail relationship fields. You’ll probably use SOQL relationships someday. May as well fix it now.

Comments off comments feed

Is “Platform Edition” a reality?

In April of 2006, I blogged about the need for Salesforce to adopt a new licensing scheme to accommodate a license to the platform only. In that post, I described what I felt to be the necessary components of the platform in that licensing model.

I remember hearing people at Dreamforce mention that this could become a reality soon, but I don’t recall hearing anything specific about it actually being deployed. However, I am seeing some hints in the application now that it’s been upgraded to Winter 07 that elude to it being a reality.

  • There is a field called License Type on the user record. This defaulted to “Salesforce” for all users (as far as I know). The Help explains that there are now 3 potential values here.
    • Salesforce License: Designed for users who require full access to standard CRM and AppExchange apps
    • Apex Platform Licenses: Designed for users who do not need standard CRM functionality. Users with an Apex Platform user license are entitled to use custom apps developed in your organization or installed from the AppExchange. In addition, they are entitled to use core platform functionality such as accounts, contacts, reports, dashboards, documents, and custom tabs.
    • Apex Platform One Licenses: Designed for users who are entitled to use only one custom app developed in your organization or installed from the AppExchange. The app is restricted to five custom tabs. In addition, they are entitled to use core platform functionality such as accounts, contacts, reports, dashboards, documents, and custom tabs.
  • There is a new standard App called Platform. This includes the Accounts, Contacts, Reports, Dashboards and Documents tabs.
  • In the Company Profile screen, there is now a list of Licenses for your organization. A record exists for each of the 3 license types I mention above.

I cannot find very much information on how one can buy an org with Apex Platform Licenses only. The ability to purchase a platform-only license like this would be huge. It would obviously provide a platform for companies to build apps on even though they aren’t interested in CRM (yet). It would also instantly provide a very solid, configurable back-end to a web application. This would compete with the MySQLs, Oracle’s, etc. of the world. A benefit over those guys is that you have an instant user interface and robust reporting tools to manage your application’s database.

Does anyone out there have additional information on this licensing model? If so, what capabilities are included? Suppose this license type was added to the’s edition comparison chart, how would it look?

Comments (5) comments feed

Map a custom lead field to 2 places

There have been many instances on projects where I have needed/wanted to map a lead field to 2 places. For example, on my most recent project we are using custom address fields. We wanted to do this to have better control over data quality. Using a picklist value for country coupled with Winter 07 Validation Rules, we have the ability to put pretty tight restrictions on the data that gets entered (e.g. forcing a 2 character state/province code when the country = “United States” or “Canada”). This aids in overall reporting, Territory Manager rules once the lead is converted and in Lead Assignment rules.

One of the things you give up when you do this is the ability to map those custom address fields on a Lead to both the Account and Contact like the standard Address fields do.

Pre-Winter 07

In the pre-Winter 07 world, doing this required a user to run an s-control or to have a polling application look for recently converted records and copy the address to the 2nd location. I had been able to use Formula Fields to get painfully close to making creating a 2nd copy of a field and mapping it, but when trying to save a mapping from a formula field on a Lead to a text field, I’d get an error that field sizes didn’t match. Big headache.

With Winter 07

Now that Winter 07 is here, I am able to use Field Update workflow rules to make a second copy of Lead data so that I can map that second copy to my Contact record. To do this:

  1. Create a copy of each Lead field you want mapped to a 2nd object
  2. Map the copied Lead fields to the Account, Contact or Opportunity fields they should be mapped to
  3. Create Workflow Rules on the Lead object that use Field Updates to update these new fields with the values of your original fields
  4. Test it out. It should work

Some tips:

  • Choose to evaluate your workflow rule “Every time a record is created or edited” so that your rule is always evaluated.
  • Use criteria that will always be met like Created Date > 1/1/2000so that the data is always copied to those new fields.
  • To avoid confusion for end-users, use Field Level Security to hide those copied fields from view. This way your users won’t see them on report screens and wonder what they are. Even if you hide the field from everyone, workflow can still see it and update it.

There is 1 snag. Formula fields (which you need to do the Field Updates) have to use the ISPICKVAL function to get a value from a picklist. If you have a sizable amount of picklist values, you won’t have enough formula space to make this work. I hit that on my Country picklist.


In the future, you should be able to use APEX code to intercept the Convert logic and map those custom lead fields to 2 places.

Better yet is a simpler approach that will make it so you aren’t doing all kinds of workarounds or coding in your configuration. Vote for these Ideas that Salesforce customers have already requested:

Comments (5) comments feed


I just went to the ADN site and noticed a complete redesign. It appears that Salesforce will be introducing the Apex Wiki. This looks to be the new home for all the toolkits and documentation on developing with Salesforce (native, composite, api, ajax, apex).

While writing this post, the ADN site design was flip-flopping between old and new. I imagine they will let us know exactly what the site is to be used for, who can edit, etc. etc. It appears that it will be open for anyone with a developer account to edit the pages. I was able to login with my developer account ID and get to an edit page.

The direct link to the wiki is

Comments off comments feed

Winter 07 Landing Page on Successforce

Comments off comments feed

« Previous entries