I have an object with a lot of fields, is there a method in apex which returns a list of the object's fields?
123443
I am new to Apex, but it is apparent to me that most (if not all) standard objects probably have an ID field. However, this field does not appear in the reference for the standard objects in the Soap API Developer's Guide. Instead, it reads:     To verify the complete list of fields for an object, you can use a   describe call from the API, or inspect with an appropriate tool, for   example, inspecting the WSDL or using a schema viewer.   If I want to find out for sure whether an object has an ID field, or what the field is named (is it ID, Identifier, id, etc), it sounds like I need to use a "describe call" or "an appropriate tool" or inspect the "WSDL" using a "schema viewer".  Now, I am an experienced software developer, but those solutions are so ambiguous I have no idea where to look next to figure out how to get an object's ID. Can anybody either refer me to more specific documentation, or explain how to find the complete field documentation via a "describe call", "appropriate tool", or "schema viewer"?
68403
I have this controller but I am getting this error      System.QueryException: List has no rows for assignment to SObject   public class MyController {     private final Account account;      public MyController() {         account = [SELECT Id, Name, Site FROM Account                     WHERE Id = :ApexPages.currentPage().getParameters().get('id')];             }      public Account getAccount() {         return account;     }      public PageReference save() {         update account;         return null;     } }
30764
We need to get all the instances of objects that implement a given interface - can we do that, and if so how?
84091
ok, ive a class and i pass an object as property.  the object that i pass is a List&lt;X&gt;  in my class im trying to access the Object index by reflection BUT I CAN'T!!!   Example:  this class works i just wrote down the part i want to show you and i need help.  class MyClass {     private object _recordSet;     public object RecordSet     {         get { return _recordSet; }         set { _recordSet = value; }     }      public string Draw()     {         system.reflection.Assembly asem = system.reflection.Assembly.getAssembly(_dataSource.GetType());          object instance;          instance = asem.CreateInstance(_dataSource.GetType().UnderlyingSystemType.FullName);          //to access de Count of my List         int recordcount = int.Parse(_dataSource.GetType().GetProperty("Count").GetValue(_dataSource,null));          //i need to do a          for(int cont = 0; cont &lt; recordCount; cont++)         {             _dataSource[cont].Name; // &lt;-- THIS PART IS NOT WORKING!!! because i cant access the Index Directly.... WHAT TO DO!! ???         }     } }
120559
I'm storing an ArrayList of Ids in a processing script that I want to spit out as a comma delimited list for output to the debug log. Is there a way I can get this easily without looping through things?  EDIT: Thanks to Joel for pointing out the List(Of T) that is available in .net 2.0 and above. That makes things TONS easier if you have it available.
46349
Hi I have a list with two fields "Regions" &amp; "Countries" I am using a rest api to retrieve the list of just regions like so: http:mysitename/_api/web/lists/getByTitle('TaxTool')/items?$select=Region  In the results there are lots of duplicates and I was wondering how to return unique values.
15700
Basically the question is how to get from this:   foo_id   foo_name 1        A 1        B 2        C   to this:   foo_id   foo_name 1        A B 2        C
60211
I have an List and I'd like to wrap it into an IQueryable.  Is this possible?
85521
I am trying to create a map from a result of a SOQL query, this map contains the name of the fields as keys and the values of the query as values for example:     List accounts = [SELECT Name, Email FROM Account];   and the map Map has this structure:  key         value name        123  email       test@test.co.uk   any ideas please ?
71324
I want to get records from custom object sort by a field as number. The field I want to sort is string type. Is there any way to do that? I am storing result in list, is there a way to sort list based on the string field but sort it as number?
79724
I'm looking for something similar to this, or other:  len(bpy.context.selected_objects)
16849
Is it possible to retrieve the values of a Global Picklist/GlobalValueSet using Schema class without a SOQL ?
66157
I am looking for a way to get the 15 character entity ID for a custom field on my Lead object in an Apex controller. I have tried this:  private String getEntityIdFor(String fieldName) {         Map&lt;String, Schema.SObjectField&gt; fieldMap = Schema.SObjectType.Lead.fields.getMap();         return fieldMap.get(fieldName).getDescribe().getId();     }    Of course, there is no getId() method, but this is the closest I got.   Thanks for any help.
76755
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&lt;Id&gt; structure to pass to another method that I don't have control of (and thus can't change the method signature of).  How can I turn my returned List&lt;SObject&gt; into a Set&lt;Id&gt;? Is the best option just a for loop?
52016
Given a Python object of any kind, is there an easy way to get the list of all methods that this object has?  Or,  if this is not possible, is there at least an easy way to check if it has a particular method other than simply checking if an error occurs when the method is called?
79209
I know how to delete saved form data in Chrome, but I'd like to be able to see all of the entries stored for fields.   When I type a into a form, I get a list of a few items that I have typed before in that field which begin with a.   I would like to see a complete list, though.
89428
I have a field in a list that accepts an SPFieldUser object. I have an SPUser object that I would like to populate that field with, but I cannot implicitly convert from one to the other.  How would I do this conversion?