Posts

Showing posts from June, 2018

Batch Job in Dynamics 365

In Dynamics 365 Batch job is created using RunBaseBatch. Below is the sample code to create batch job. 1: class StudentBatchJob extends RunBaseBatch 2: { 3: server static StudentBatchJob construct() 4: { 5: return new StudentBatchJob(); 6: } 7: public boolean canRunInNewSession() 8: { 9: return true; 10: } 11: public container pack() 12: { 13: return conNull(); 14: } 15: public boolean unpack(container packedClass) 16: { 17: return true; 18: } 19: public static ClassDescription description() 20: { 21: return "StudentBatchJob"; 22: } 23: public static void main(Args args) 24: { 25: StudentBatchJob batchProcess; 26: batchProcess = StudentBatchJob::construct(); 27: if(batchProcess.prompt()) 28: { 29: batchProcess.runOperation(); 30: } 31: } 32: public void run() 33: { 34: #OCCRetryCount