Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Batch processing not working (RunBaseBatch)

(0) ShareShare
ReportReport
Posted on by 8

Hi,

I created a class which inherits from RunBaseBatch.

I have a form  which is using my Class.

I implemented all methods from Tutorial_RunBaseBatch and also compared my code to some standard classes and I don't see what is wrong.

When I check button Batch processing seems like it doesn't get affected at all, the process gets run immediately instead of adding job to the batch queue. Any thoughts? Thanks in advance

pastedimage1677058916913v1.png

  • Martin Dráb Profile Picture
    Martin Dráb 230,900 Most Valuable Professional on at
    RE: Batch processing not working (RunBaseBatch)

    You said nothing about about any form before, therefore we couldn't take that into account. Now you seem to be saying there is no problem in the class you asked about; you had a bug in the form. In either case, it's great that the problem's been resolved.

    By the way, please always use Insert > Code (in the rich formatting view) to paste source code to this forum. It'll prevent the extra space between lines, among other benefits. For example:

    public boolean canClose()
    {
    	boolean canClose = super();
    
    	if (canClose && element.closedOk())
    	{
    		canClose = myClass.checkCloseDialog();
    	}
    
    	return canClose;
    }

  • techAx Profile Picture
    techAx 8 on at
    RE: Batch processing not working (RunBaseBatch)

    I guess because I am used to RunBaseBatach but I will investigate SysOperation

  • techAx Profile Picture
    techAx 8 on at
    RE: Batch processing not working (RunBaseBatch)

    I am getting that notification now after I did what I described oin my last comment

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: Batch processing not working (RunBaseBatch)

    Hi, I assume you are doing this for practice purpose. As Martin mentioned you should explore SysOperation Framework.

    Check this out

    For runbase batch

    dynamics365musings.com/.../

    For SysOperation Framework

    dynamics365musings.com/.../

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Batch processing not working (RunBaseBatch)

    After setting the batch process to yes - Did you got any notification - You will get a notification like "Job is added to the batch queue".

    It will be added to Batch jobs on the inquiry form under system administrator. module.

    Thanks,

    Girish S.

  • techAx Profile Picture
    techAx 8 on at
    RE: Batch processing not working (RunBaseBatch)

    Hi Martin,

    In the meantime I did this

    Overriden method canClose in my form that I am using as a dialog

     public boolean canClose()

       {

           boolean canClose = super();

           if (canClose && element.closedOk())

           {

               canClose = myClass.checkCloseDialog();

           }

           return canClose;

       }

    And now seems that it works

  • Martin Dráb Profile Picture
    Martin Dráb 230,900 Most Valuable Professional on at
    RE: Batch processing not working (RunBaseBatch)

    I wonder why you use RunBaseBatch instead of the newer framework: SysOperation. It's easier to implement (e.g. you don't need to implement serialization by yourself and you can get a dialog generated by the system) and you also have more execution modes to choose from.

    If you want to use RuBaseBatch anyway, you can use the debugger to find out where things go wrong. RunBaseBatch.runOperationNow() may be a good starting point. You may also give us your code for a review.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,074 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,900 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans