Top "Apex-code" questions

A proprietary Java-like programming language for the Force.

Apex SOQL subquery in Visualforce

I am looking at showing a subquery SOQL query in an Visualforce page. This is my SOQL Expression. public ApexPages.…

salesforce apex-code visualforce soql force.com
VisualForce page for new custom object

I am a newbie in this field. First time trying to code a VisualForce page. I have created a custom …

salesforce apex-code visualforce
How to increment a value in a map with Apex?

Is there a way to increment a value in a map without needing a second variable? for example, this doesn't …

map salesforce apex-code increment visualforce
Custom Exception Message in apex Salesforce

I want to create a custom exception. In this exception I want to make a constructor which take one string …

salesforce apex-code visualforce apex
How to assign 'blank' to a Decimal field in Salesforce

I'm having problems with one of our custom validation rules that forces me to have 'blank' value in a custom …

null salesforce apex-code
Need Help to Overcome Apex CPU time limit exceeded Error

I am working on a module which will de-duplicate contact records on insert/update but I am hitting into Apex …

salesforce apex-code visualforce apex force.com
How can I get subList of a List in Apex Salesforce?

I have got a list of SObjects having N number of items/sObjects SObject[] sList = [sobject1, sboject2, sboject3, ........ , sobjectN] How …

list salesforce apex-code apex sublist
inputField databinding issue with VisualForce

I'm having strange results with a Visualforce page (yes, Salesforce.com is icky, I know). My issue is that I …

salesforce apex-code visualforce
How do I introspect the class of a variable in APEX?

I would like to know the class of a variable/property at runtime. For example: Integer i = 5; //pseudo-code if (i.…

dynamic salesforce apex-code
Apex AddError to SObject field

Has anyone found a way of adding a dynamic field level error to an sobject? I would like to do …

salesforce apex-code