Tuesday 11 March 2014

Salesforce’s URL Structure

Salesforce’s URL Structure

This post was inspired by Mike Schinkel’s “URL Structure”.
Finally found the structure to delete a record in SF, adding it below. Eoin
Here’s a quick introduction to understand the structure of all the URLs in Salesforce:

Instances

Salesforce’s organizations reside on multiple instances, to find out what instance you’re on, once you logged into Salesforce, have a look at the address bar; you’ll notice the URL starts with something like:
  • ssl - North America #0 (aka na0)
  • na1 - North America #1
  • na2 - North America #2
  • na3 - North America #3-
  • na4 - North America #4
  • na5 - North America #5
  • emea - Europe, Middle East, Africa
  • ap - Asia, Pacific
  • tapp0 - Sandbox #0
  • tapp1 - Sandbox #1
https://xyz.salesforce.com where xyz is the name of the instance your organization is on.

Objects’ specific URLs

Every Salesforce’s object has it’s specific URL, here are listed the links to the standard objects:
Objects URLs Objects’ code
Accounts https://[instance].salesforce.com/001/o 001
Contacts https://[instance].salesforce.com/003/o 003
Leads https://[instance].salesforce.com/00Q/o 00Q
Cases https://[instance].salesforce.com/500/o 500
Solutions https://[instance].salesforce.com/501/o 501
Reports https://[instance].salesforce.com/00O/o 00O
Opportunities https://[instance].salesforce.com/006/o 006
Campaigns https://[instance].salesforce.com/701/o 701
Products https://[instance].salesforce.com/01t/o 01t

Basic action URLs

Use the following URLs to perform the listed operations on a specific object. Note this is fundamental to then understand how to create internal custom links.
Object’s overview page
https://[instance].salesforce.com/[object]/o
Create a new record
https://[instance].salesforce.com/[object]/e?retURL=/[object_code]/o
Edit a record
https://[instance].salesforce.com/[object]/[recordID]/e?retURL=[recordID]
Clone a record
https://[instance].salesforce.com/[object]/[recordID]/e?retURL=[recordID]&clone=1
Delete a record
https://[instance].salesforce.com/setup/own/deleteredirect.jsp?delID=[recordID]
where:
  • [instance] is the instance’s name your organization resides on;
  • [object] is the object’s code;
  • [recordID] is the ID of the record itself.

Tuesday 4 March 2014

History Tracking


  • You can select a combination of up to 20 standard and custom fields per object.
  • You cannot track the following fields:
    • History of formula, roll-up summary, or auto-number
    • Created By and Last Modified By
    • Expected Revenue field on opportunities
    • Master Solution Title or the Master Solution Details fields on solutions; these fields display only for translated solutions in organizations with multilingual solutions enabled.

Convert String to Date format

string str='7/28/2013';     /*Format must be mm/dd/yyyy
Date dt=Date.parse(str);

orstring str='2013/7/28';     /*Format must be yyyy/mm/dd
Date dt=Date.valueof(str);


Enabling Bulk API option in Data Loader

The Bulk API is optimized to load or delete a large number of records asynchronously. It is faster than the SOAP-based API due to parallel processing and fewer network round-trips. By default, Data Loader uses the SOAP-based API to process records.
To configure Data Loader to use the Bulk API for inserting, updating, upserting, deleting, and hard deleting records:

  1. Start Data Loader by choosing Start | Programs | salesforce.com | Data Loader | Data Loader.
  2. Choose Settings | Settings.
  3. Select the Use Bulk API option.
  4. Click OK.

Note: You can also select the Enable serial mode for Bulk API option. Processing in parallel can cause database contention. When this is severe, the load may fail. Using serial mode guarantees that batches are processed one at a time. Note that using this option may significantly increase the processing time for a load.

Mass Email Users

Problem:
Why we get the following error when sending mail through a class "System.EmailException: SendEmail failed. First exception on row 0; first error: NO_MASS_MAIL_PERMISSION, Single email is not enabled for your organization or profile. Single email must be enabled for you to use this feature.: []" 

Solution:
The reasons are :

-Trial accounts do not allow the use of mass email. You will have to purchase a license to go live with your org.

-You are missing a permission in the backend and must log a case with Salesforce support to enable "Respect SendEmail API" and "SendEmail API".

-The access level might have been set to "system e-mails".
 In setup | Administration setup | Email Administration | Deliverability, verify if the access level is set to "All e-mails".

The e-mail deliverability is a new feature released in spring 13 and as per the release notes, all newly refreshed sandboxes default to "system email only"

Page number 46 in the link below :

https://na1.salesforce.com/help/doc/en/salesforce_spring13_release_notes.pdf

Saturday 1 March 2014

User account Freezing

Freezing :-

It means temporarily suspend a user account, So He/She not able to access your Salesforce org once  they left the organization and you need more time to deactivate user account.

Explanation : -

We cant deactivate users account immediately once user left the organization. Some time we have requirement to deactivate user but that user may be selected in workflow email alert, custom hierarchy field or some where else in this case you need to perform some extra steps, may be it take  few minutes to few hours but it may possible user can access your Salesforce org even he/she left the organization. So from Winter 14 release salesforce come up with an feature called as “Freeze” users.

Freezing user accounts doesn’t make their user licenses available for use in your organization. You must deactivate user accounts to make their user licenses available.

Steps to freeze :-

To freeze user’s account follow the below instruction :-
  1. Click on Name | Setup | Administration Setup |Manage Users | Users.
  2. Click the name of the user whose account you want to freeze.
  3. Click Freeze button beside login.
Only System Administrator or Users with “Manage Users” Permission can perform Freezing.