Top "Apex-code" questions

A proprietary Java-like programming language for the Force.

Salesforce - How to Deploy between Environments (Sandboxes, Live etc)

We're looking into setting up a proper deployment process. From what I've read there seems to be 4 methods of doing …

deployment salesforce apex-code
SOQL query WHERE Date = 30_days_ago?

How do I make a SOQL query like this? SELECT id FROM Account WHERE LastActivityDate = 30_DAYS_AGO This produces an …

salesforce apex-code soql
newline character on text area

I have a custom field called Current_Address__c which is of datatype textarea. I need to populate this field …

salesforce apex-code visualforce
How to avoid MIXED_DML_OPERATION error in Salesforce tests that create Users

Sometimes in Salesforce tests you need to create User objects to run part of the test as a speciifc type …

unit-testing salesforce apex-code
SOQL query with subquery

I'm having trouble getting the results I want from a Salesforce/Apex/SOQL query. I want: A list of Contact …

salesforce apex-code soql
How can I get the key as well as the value in an apex for loop?

I have a map object which stores <Id, String> where the Id is a contact Id, and the …

for-loop key salesforce apex-code
Retrieve salesforce instance URL instead of visualforce instance

From a visualforce page, I need to retrieve our organization's salesforce instance's URL, and not the visual force URL. For …

salesforce apex-code controllers visualforce
Check if an apex list contains an object

Is there any way to check if a list contains a certain element? I looked at the List functions and …

salesforce apex-code
getting Value of a field by its Name in apex salesforce

in my visualforce page i have some campaign object first user select an object then there is a multi picklist. …

salesforce apex-code soql
How do we schedule a class to run every 15 minutes in salesforce?

I am trying to schedule a class to run every 15 minutes. I know we can set in salesforce for every …

salesforce apex-code