≡ Menu




My Custom Batch class in not appear in task list ?

 

If you consider my last post about creating, deploy and debug the custom batch job In Dynamics Ax 2012.

http://tech.alirazazaidi.com/exploring-the-batch-job-process-in-dynamics-ax-2012-r3/

 

I used X++ job to deploy the batch class as batch process.  But if we have to provide functionality that any person can schedule the class as batch from Dynamics Ax front end. We have to overwrite the canGoBatchJournal() in Class code. The default implementation comes with false return value so Job did not appear in Task List.

 

The complete code of class should be appear something like

 

class ProcessTableIncrement extends RunBaseBatch

 

{

 

 

 

}

 

 

 

public container pack()

 

{

 

return conNull();

 

}

 

 

 

public void run()

 

{

 

 

 

// The purpose of your job.

 

TblBatchHit _hit;

 

 

 

_hit.HitBy ="BatchJob";

 

_hit.hitTime= DateTimeUtil ::utcNow();

 

_hit.insert();

 

}

 

 

 

public boolean unpack(container packedClass)

 

{

 

return true;

 

}

 

boolean canGoBatchJournal()
{

return true;
}


 

 

Now Generate Increment CIL. Close clients on Dynamics and reopen client Dynamics Ax.

 

fffed

{ 0 comments… add one }

Leave a Comment