Hot answers tagged

7

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>


4

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. ...


4

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. ...


2

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 ...


2

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


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