Pages

Thursday, July 10, 2014

Salesforce URL Parameters


When you work with Salesforce for daily job, you may notice the URL is keep changing based on activity you work on.

This blog list unofficial information gathered based on multiple sources and personal experience. Salesforce do not support any implementation based on URL hack. But, for some Salesforce administrator, it is good to know to make our self productive for daily work with Salesforce.com

Using this technique, you can create custom button / link to pre-populate value when create new record.

Here list of the parameters collected, if you know any standard parameters and not listed here, let me know to add it:

Home Tab
Go to home tab
URL: /home/home.jsp
Example: https://na3.salesforce.com/home/home.jsp

Salesforce1
View as Salesforce1 mobile app
URL: /one/one.app
Example: https://na3.salesforce.com/one/one.app
This is no longer valid after Lightning Experience introduced.

Login Parameter
This is not a good practice to send clear text in web browser
URL: /login.jsp?un=<username>&pw=<password>
Example: https://www.salesforce.com/login.jsp?un=user@email.com&pw=secret

Object View
Open an object in list View without the need to create a tab
URL: /<object prefix>
Example: https://na3.salesforce.com/001

Object Tab
Open an object tab
URL: /<object prefix>/o
Example: https://na3.salesforce.com/001/o

View Record
Open a record in page layout
URL: /<record id>
Example: https://na3.salesforce.com/0015000000tC2gZ

Download file
Download a file stored as attachment or document
URL: /servlet/servlet.FileDownload?file=<record id>
Example: https://na3.salesforce.com/servlet/servlet.FileDownload?file=01550000000gdVu

Mini Page Layout
This is the view when user hover the parent record from a child record page layout
URL: /<record id>/m
Example: https://na3.salesforce.com/0015000000tC2gZ/m

Printable View
Open a record as user click Printable View link at the top right of the page
URL: /<record id>/p
Example: https://na3.salesforce.com/0015000000tC2gZ/p

Transfer a Record
Transfer record owner
URL: /<record id>/a
Example: https://na3.salesforce.com/0015000000tC2gZ/a

Create a new Record
Create a new record using default record type (if any)
URL: /<object prefix>/e
Example: https://na3.salesforce.com/001/e

Create a new Record with Record Type
Create a new record with Record Type parameter
URL: /<object prefix>/e?RecordType=<record type id>
Example: https://na3.salesforce.com/001/e?RecordType=01250000000HeOC

Edit a Record
Edit an existing record 
URL: /<record id>/e
Example: https://na3.salesforce.com/0015000000tC2gZ/e

Clone a Record
Edit an existing record 
URL: /<record id>/e?clone=1
Example: https://na3.salesforce.com/0015000000tC2gZ/e?clone=1

Cancel a Record
When user create or edit a record, if user click Cancel button retURL parameter will bring user back to a record specified.
URL: /<record id>/e?retURL=<record id> or /<object prefix>/e?retURL=<object prefix>/o
Example: https://na3.salesforce.com/0015000000tC2gZ/e?retURL=0015000000tC2gZ

Create Task & Event and relate it to Account and Contact
Use 00U for Event and 00T for Task, you can use any standard objects for what_id except: Contact & Lead, this is include custom objects with enable Track Activities. While for who_id you can use Contact & Lead.
URL: /00T/e?what_id=<account record id>&who_id=<contact record id>
Example: https://na3.salesforce.com/00T/e?what_id=0015000000qj947&who_id=00350000023g0qu


Reference: