Highest scored questions

169 votes
4 answers
72k views

What are Salesforce ID's composed of?

I remember seeing somewhere that IDs are composed of a few pieces. I always have a hard time trying to find that information when I'm looking for it. What I mean by the above is that the various ...
Ryan Elkins's user avatar
  • 7,727
161 votes
8 answers
38k views

Unit testing code which has logic around the CreatedDate

An example of the problem would be trying to test a trigger on a case which will fire on update, and look for time differences between when a case was created and now. Ideally in the unit tests I want ...
David Gillen's user avatar
  • 3,007
158 votes
3 answers
27k views

End of javascript sidebar workarounds? (Salesforce Classic / Aloha)

Reading through this doc: Docs.releasenotes.salesforce We replaced the rich text editor in HTML Area home page components with a new version that supports more markup but doesn’t allow HTML to ...
Rao's user avatar
  • 16.8k
141 votes
2 answers
13k views

Any reason to skip DML on empty lists?

In parts of my code I have DML statements with an if around to only do the DML if the list is not empty: if( !recordsToUpdate.isEmpty() ) { update recordsToUpdate; } Couldn't I just write? update ...
Robert Sösemann's user avatar
134 votes
3 answers
9k views

Force.com IDE - Still Officially Supported?

In the Summer '13 release webinar, Ryan Upton and Samantha Ready mention that the Force.com IDE is no longer being supported. During the Q&A time, they both chime in on a question related to the ...
Jesse Altman's user avatar
  • 19.8k
130 votes
3 answers
179k views

Is it possible to run a SOQL Query and get a Map returned?

It is possible to run query and the results inserted into an Apex list: List<Opportunity> opportunities = [SELECT Opportunity.OwnerId, Opportunity....
dublintech's user avatar
  • 4,363
130 votes
2 answers
26k views

How to reduce a large internal view state / what is in the internal view state?

I'm building an account search page that lets users select accounts and then pass them to other pages to perform various actions on them. Unfortunately users are reporting hitting the view state ...
Ralph Callaway's user avatar
126 votes
3 answers
140k views

How can I efficiently generate a Set<Id> from a List<SObject> structure?

I have a bit of code where I've written a SOQL query that returns a list of SObject records, however I need a Set<Id> structure to pass to another method that I don't have control of (and thus ...
ca_peterson's user avatar
  • 23.2k
119 votes
1 answer
18k views

Difference between the multiple messaging options in Visualforce?

I have always been curious what are the exact differences between all of the messaging options Visualforce provides, such as apex:message, apex:messages, apex:pageMessage, and apex:pageMessages. The ...
Jesse Altman's user avatar
  • 19.8k
118 votes
14 answers
64k views

Can we determine if the Salesforce instance is production org or a Sandbox org?

I am looking for the most efficient way of identifying the type of org (Production or Sandbox) via Apex code. URL scraping is not useful to me, since I'd like to get this information inside a trigger ...
Anup's user avatar
  • 3,820
110 votes
11 answers
43k views

How do I start to debug my own Apex code?

Sometimes questions are posted here that would best be answered by helping the questioner learn how to do their own debugging. (Remember that proverb?) I'd like to have something to link to on this ...
Keith C's user avatar
  • 138k
104 votes
1 answer
4k views

When are the Queueable/Batchable penalties going to be enforced?

According to The New Apex Queueable Interface, from October 2014, we were told that chained Queueable calls would be exponentially delayed up to 64 seconds, chaining Batches would be exponentially ...
sfdcfox's user avatar
91 votes
8 answers
16k views

Apex static code analysis

What static code analysis tools are there for apex? The only one I seem to be able to find is the Force.com Security Source Code Scanner but that has the draw back of placing your request into a queue ...
Bob Roberts's user avatar
  • 2,815
89 votes
4 answers
56k views

SFDC: Understanding With Sharing, Without Sharing & Unspecified Sharing Classes

Per my understanding of With Sharing, Without Sharing and non-sharing-specified Classes in Apex, I would like to jot down the following notes and leave certain blanks for not sure answers; I wanted to ...
Swati's user avatar
  • 891
87 votes
7 answers
16k views

How to study/prepare for the Salesforce ADVANCED Developer Certification?

After reading the overwhelming responses to the question How to study/prepare for the Salesforce Developer Certification, I decided to ask the same question but for the Advanced Developer ...
Shumon Saha's user avatar
  • 4,682

15 30 50 per page
1
2 3 4 5
9076