Archive for API 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

set_child_relationship_name.png

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

Simon Fell on Apex Code as a Web Service & SOQL-R

In case you don’t already subscribe to Simon Fell’s pocketsoap blog feed-icon-12x12.png, he just posted a couple items relevant to the new Winter 07 functionality.

  • Apex Web Services: Explains how you can expose your Apex code as a Web Service available to any web application.
  • SOQL-R: A 101 on the new SOQL’s support for relationships (joins).

Comments off comments feed

Updated Developer Documentation

Just echoing the post from the ADN Blog.

  • The 8.0 API documentation was updated and posted. (link)
  • The AJAX Toolkit will be out of beta with Winter 07 and the documentation was posted (link). Usage of the beta toolkit will still work, but changing to the production toolkit will provide better performance and will allow you to take advantage of new enhancements as they come out.
  • Tech Note “What’s New in Apex Web Services API Winter ’07” (link) provides an overview of the API changes and considerations in moving your integrations to the 8.0 API.

If you only care to follow 1 link, the main Documents page on ADN is the place to look.

Comments off comments feed

3-part series about Salesforce.com on the O’Reilly Network

Tony Stubblebine just posted part 2 of his 3-part series on how to build and distribute applications on Salesforce.com’s AppExchange. The series is being published on the O’Reilly Network. Links have been permanently added to my blog sidebar, but here they are again:

Part 1 of 3 – An Introduction to Salesforce.com’s AppExchange: Tony lays out the basic information that any developer should know to get started. This article provides some context and points to how a developer can get their hands on a free Developer Edition account.

Part 2 of 3 – Using the Salesforce.com API: Tony explains how the Salesforce API works by creating a PERL script that automatically creates Salesforce.com Leads for every comment posted on a blog. This is a well-rounded example because it explains how to use the API and also how it impacts the back-end (inside Salesforce).

Part 3 of 3 – Packaging for Salesforce.com’s AppExchange: Tony continues building the blog-to-lead application by walking through the process of packaging and uploading to the Salesforce AppExchange.

Comments (1) comments feed

Ruby on Sforce

I came across a new blog by Oliver Muthig in Germany called Ruby on Sforce. His most recent post is a getting started example for displaying accounts. If you are a Ruby on Rails developer working with Salesforce.com, you might want to keep tabs on this blog.

http://rubyonsforce.blogspot.com/   feed-icon-16x16.png

Comments (1) comments feed

Next entries » · « Previous entries