Skip to content

Thoughts on Saleforce

A Salesforce.com community dedicated to making Salesforce, it's products, and partners better...

Click to register with Salesforce.com for a FREE 30-DAY TRIAL!

Sponsors

Login Form






Lost Password?
No account yet? Register
Home

URL Structure

table.url-info {margin-top:1em;margin-left:1em;width:90%}
table.url-info th {text-align:left;background-color:whitesmoke;;padding:0.25em;}
table.url-info td {padding:0.25em;}
.longurl {font-size:0.8em;font-family:Courier New,Courier,Monospace;}
.footnotes {font-size:0.8em;}
.sidebar {float:right;margin-left:1em;font-size:0.9em;width:25%;border:thin solid red;padding:1em;background-color:whitesmoke;}
img.browserurl {border:thin solid; margin-left:1em;margin-bottom:1em;}
li {font-size:1.1em;}

URL for adding an Account to Saleforce.com with return to the Home Page

Recently I decided I wanted to create soom "quick launch" bookmarklets for Salesforce.com. I wanted buttons on my browser toolbar that would take me to specific Mods in Saleforce.com and execute the exact action I wanted without having to first visit a page with such a link, or worse having to use that infernal little drop down for creating new records/objects. For example, I really wanted a button for creating a new Account that was always available.

Of course creating a quick launch button requires understanding Salesforce.com’s URL structure because Salesforce.com in their infinte wisdom has decided that Professional and Team customers are second class and don’t need access to the API because we are just not sophisticated enough to need it. (Sorry there if my sarcasm there is just a bit too obvious.)

Anyway, though I didn’t do an exhaustive search, I googled and couldn’t find anything that explained it so I attempted to grok it on my own. Based on my research which I was obviously only able to do with my own account and thus might not fully apply to others, It appears their URLs work something like this assuming you are logged into Saleforce.com:

Code Module URL to Module Home Page
001 Accounts https://<s>.salesforce.com/001/o
003 Contacts https://<s>.salesforce.com/003/o
006 Opportunities https://<s>.salesforce.com/006/o
015 Documents https://<s>.salesforce.com/015/o
500 Cases https://<s>.salesforce.com/500/o
501 Solutions https://<s>.salesforce.com/501/o
800 Contracts https://<s>.salesforce.com/800/o
00O Reports https://<s>.salesforce.com/00O/o
00Q Leads https://<s>.salesforce.com/00Q/o
01Z Dashboards https://<s>.salesforce.com/01Z/o
a00 Custom Tabs1 https://<s>.salesforce.com/a00/o
a01 Products https://<s>.salesforce.com/a01/o

 1 Of course this is just for the first custom tab. Not sure about what happens we you create more.

For <s> I have always found it to be "na1" for (I assume) "North American server #1" (although I tried "sa1" and "eu1" and they both gave me a "Could not find domain" result in my browser so maybe that theory isn’t so good.) I even tried to set up a secondary DNS server to pull down the subdomains for Salesforce.com, but they evidently have them configured to block Zone transfers (go figure!). Here’s my CMD window/NSLookup transcript:

C:Program FilesSupport Tools>nslookupDefault Server:  xxxxAddress:  192.168.0.1

> salesforce.comServer:  xxxxAddress:  192.168.0.1

Non-authoritative answer:Name:    salesforce.comAddress:  204.14.234.33

> set type=ns> salesforce.comServer:  xxxxAddress:  192.168.0.1

Non-authoritative answer:salesforce.com  nameserver = pdns6.ultradns.co.uksalesforce.com  nameserver = pdns5.ultradns.infosalesforce.com  nameserver = pdns4.ultradns.orgsalesforce.com  nameserver = pdns3.ultradns.orgsalesforce.com  nameserver = pdns2.ultradns.netsalesforce.com  nameserver = pdns1.ultradns.net

pdns6.ultradns.co.uk    internet address = 204.74.115.1pdns3.ultradns.org      internet address = 199.7.68.1

Moving on, I researched URLs for the following actions:

Action
URL to Excute Acction
View All Objects

https://<s>.salesforce.com/<m>

View Object’s Home

https://<s>.salesforce.com/<m>/o

View Object

https://<s>.salesforce.com/<m><o>

Add Object

https://<s>.salesforce.com/<m>/e?retURL=<r>

Edit Object

https://<s>.salesforce.com/<m><o>/e?retURL=<r>

Clone Object

https://<s>.salesforce.com/<m><o>/e?retURL=<r>&clone=1

Add Related Task

https://<s>.salesforce.com/<m>/e?retURL=<r>&who_id=<m><o>

In the above table:

  • The term "Object" refers to a instance/record in a Module, i.e. an Account, a Lead, a Contact, etc.
  • retURL will often start with "%2F" when viewed in your browser. %2F is just the hex-encoded equivalent of "/" that the browser performs automatically on such characters when found in URL parameters.
  • <s> always seemed to be "na4" for these URLs, but your mileage may vary.
  • <m> refers to the three position alphanumeric from the first table (i.e. "003" for Contacts and "01Z" for Dashboards.)
  • <o> refers to the internal ID that Saleforce.com maintains for every unique object in its system. If you ever use the Excel Connector for mass data updates you’ll get to directly play with them (Professional Editions and above only;  Team Edition customers need not apply.).
  • <r> refers to the previous domain-relative URL (i.e. starting with a "/" instead of "http://na4.salesforce.com/") to which Salesforce.com should return after the user completes the request action. If retURL is omitted, SaleForce.com returns to "/home/home.jsp".
  • who_id refers to the Object to which the task should be associated, prefix with it’s Mod code.
NOTE

If it’s more than a few days since Oct. 1, 2006 you might want to also check out this link for updated information:

Salesforce’s URL structure

There are a lot of other URLs in Salesforce.com, but they start breaking down in consistency and use different conventions for similar concepts as if different groups within Salesforce.com implemented them and they didn’t have the foresight to coordinate on conventions. However, I think I’ve documented the most important URLs and with the above information you can probably grok any others on your own.  Besides. I wasn’t planning on writing a complete manual on Salesforce.com URLs when I sat down to write this post. :)

BTW, one of my ongoing campaigns has for a long time been to see more web developers and designed consider URL design to be an important component of web application design. As such, I recently launched a website called WellDesignedUrls.org with a mission to encourage more people to recognize the value of good URL design. On the aspect of URL design, I would give Saleforce.com a grade of B+ which is much better than I would give most websites.

At WellDesignedUrls.org among other things I plan to (get people to) document URL Structure for the various websites and installable web applications, especially if not documented by their respective vendor. That said, I’m going to copy this information about Saleforce.com’s URL Structure over to WellDesignedUrls.org wiki and potentially augment it over time.

If you do end up figuring out any of the other URLs, please just on over to the Saleforce.com’s URL Structure section on the wiki for WellDesignedUrls.org  and document the layout for the benefit of future seekers of the same information. Also go ahead and post a comment  here indicating which URL you documented and a another link to the wiki page where your updates can be found.

WordPress database error: [Table './thoughtsonsalesforce/jos_wp_comments' is marked as crashed and last (automatic?) repair failed]
SELECT * FROM jos_wp_comments WHERE comment_post_ID = '40' AND comment_approved = '1' ORDER BY comment_date

No Comments

Add your own comment...