You need to sign in to do that
Don't have an account?
tukmol
Batch Apex and Knowledge Article
Hi, is it not possible to batch knowledge article object?
See this batchacble class for example, this gives internal salesforce.com error whenever i try to run this.
public class EnumerateExpiredArticles implements database.Batchable<sobject> { public Database.QueryLocator start(Database.BatchableContext BC) { // Access initialState here return Database.getQueryLocator([SELECT Title, Summary, OwnerId FROM Knowledge_Article__kav WHERE PublishStatus = 'Online' AND Language = 'en_US' AND LastPublishedDate = LAST_N_DAYS:180]); } public void execute(Database.BatchableContext BC, List<sObject> batch) { for (Knowledge_Article__kav ka : (List<Knowledge_Article__kav>) batch) { //send notification to owner } } public void finish(Database.BatchableContext BC) { } }
But if replace the object with something else (i.e. case, account, etc), it goes fine.
any help?
thanks
Hi,
Did you try this code with Spring'13 or Summer'13? Because it should work in summer'13.
Spring 13 is where i've encountered the error. Will try to get hold of our Summer 13 sandbox.
Thanks
Unfortunately, it gives the same error in Summer 13: "Internal Salesforce.com" error.