Tuesday, December 27, 2011

Formula Fields

Salesforce defines a formula as: "A formula is an algorithm that derives its value from other fields, expressions, or values. Formulas can help you automatically calculate the value of a field based on other fields."

There are many instances where formula field can come in handy.  Here is an excellent set of 100 sample formulas that can be used as a guide to get started on a formula:

100 Sample formula salesforce guide

Friday, December 23, 2011

MIXED_DML_OPERATION

This error occurs when attempting to update a setup object and a non-setup object at the same time.  For example updating the user object and a chatter group object:

MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa):

To get around this use future method to call the non-setup object.  @future

Thursday, December 22, 2011

Sandbox refresh boofing!?

Came across an issue from refreshing a sandbox, when it completed it had appended a bunch of extra characters at the start of all the usernames.  The refresh completion email indicated that the usernames had to be unique across all sandboxes.  For some reason it thought the usernames were already taken. This was strange since we don't currently have another sandbox with the same name.  But did have a sandbox by that name in the past.  Sfdc premier support's explanation was that boofing occurred during the copy process and suggested the box be refresh again.  Something to watch out for if you're not able to get in to a newly refreshed sandbox, particular when deleting and reusing the same sandbox name.

Wednesday, December 21, 2011

How to delete record type assigned to certain profiles

This is a workaround by manipulating the url to get to the default record type screen of certain profiles that you would otherwise be unable to get to from navigating in the UI,  comes in handy when trying to delete record types.  Chatter free user profile is a good example of such a profile.

How deselect record type from certain profiles that don't have edit link.

Tuesday, December 20, 2011

Spring '12 Sandbox Preview

Time to opt in for Spring '12 sandbox preview, the cut of date is January 14th, 2012.  Spring '12 Sandbox Preview Window Instructions


Salesforce Governor Limits

Salesforce Limits QRG gives you governor limits for:
-App setup limits
-Chatter limits
-Data related limits
-File related limits
-Sandbox limits
-Force.com limits
-Concurrent API limits
-Storage limits
-etc...

Monday, December 19, 2011

Salesforce APIs

Ever wonder what are the differences between all those SFDC APIs?  Apex API, Soap API, Metadata API, REST API?  Here are some answers: Salesforce APIs – What They Are & When to Use Them

18 digit ID vs 15 digit ID


To get the 18 digit ID in the UI and in reports, create a custom formula field of type text and use the below formula:
Id
& MID("ABCDEFGHIJKLMNOPQRSTUVWXYZ012345",(
IF(FIND(MID(Id,1,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,1,0)
+IF(FIND(MID(Id,2,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,2,0)
+IF(FIND(MID(Id,3,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,4,0)
+IF(FIND(MID(Id,4,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,8,0)
+IF(FIND(MID(Id,5,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,16,0)
)+1,1)
& MID("ABCDEFGHIJKLMNOPQRSTUVWXYZ012345",(
IF(FIND(MID(Id,6,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,1,0)
+IF(FIND(MID(Id,7,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,2,0)
+IF(FIND(MID(Id,8,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,4,0)
+IF(FIND(MID(Id,9,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,8,0)
+IF(FIND(MID(Id,10,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,16,0)
)+1,1)
& MID("ABCDEFGHIJKLMNOPQRSTUVWXYZ012345",(
IF(FIND(MID(Id,11,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,1,0)
+IF(FIND(MID(Id,12,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,2,0)
+IF(FIND(MID(Id,13,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,4,0)
+IF(FIND(MID(Id,14,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,8,0)
+IF(FIND(MID(Id,15,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,16,0)
)+1,1)

Chatter in list views

Chatter in list views introduced in Summer '11 is a great way to get chatter updates without having to follow the individual records.