Hot answers tagged


This is probably because the clas Name contains the definition of another inner class like this: public class name{ public class test{ } } If so, you have to specify the parent class name before referencing the test inner class. So if you want to make a list of records of type name.test, you have to use: List<name.test>


Generally speaking, when I have a question, the first place I look is at the documentation. Ordering by multiple columns is listed in ORDER BY in the SOQL & SOSL documentation (emphasis mine) The following factors affect results returned with ORDER BY: Sorting is case insensitive. ORDER BY is compatible with relationship query syntax. ...


This is due to how Type Systems work. While your ActiveContactListController.ContactsWithRoles object contains an AccountContactRelation object, it (ContactsWithRoles) is not the same as an AccountContactRelation object. The declared return type in your method needs to match (or extend) the type of the variable (or statement) that you actually return. ...


Aside from the potential problems with governor limits, getting your 10k lists is pretty simple: sObject[] dmlExecuteList = new sObject[0]; while(!recordListInsert.isEmpty() && dmlExecuteList.size() < 10000) { // Removes first item from recordListInsert and adds it to the dmlExecuteList dmlExecuteList.add(recordListInsert.remove(0)); } insert ...


Yes, you need to order like below SELECT Id, CreatedDate, ZooId ORDER BY ZooId DESC, CreatedDate DESC


To associate multiple Contacts to one Task, your Salesforce org must have Shared Activities turned on. This will allow you to link up to 50 Contacts to a single Task. Without this feature active, you may associated only one Contact to a Task. With Shared Activities, WhoId remains a single field - you can't assign a list to it unless you're using the SOAP ...

Only top voted, non community-wiki answers of a minimum length are eligible