Id [] ids=new Id []{'500e0000000gev6','500e0000000gevB'};
string q='select id, subject from case where id in ';
case [] cs=database.query(q+' :ids');
public static void create_recurrences(List<Id> templates){... ...
... ...
Map<String, Schema.SObjectField> M = Schema.SObjectType.Case.fields.getMap();
string q='SELECT Id ';
for (Schema.Sobjectfield f : M.values()){
if (f.getDescribe().isUpdateable()){
q+=', '+f.getDescribe().getName();
}
}
q+=' FROM Case WHERE Id in ';
for (Case c : Database.query(q+' :templates ')){
I'd imagine if you're doing any kind of partner apps, this type of thing could get used a lot.
No comments:
Post a Comment