web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Is it possible to have...
Finance forum

Is it possible to have a workflow for a batch job?

(0) ShareShare
ReportReport
Posted on by

Hi I got a requirement to have a workflow to approve free text invoice posting when user tries to post free text invoice through batch job (Account receivable > Batch invoicing > Free text invoice).  As I understand, posting free text invoice through batch trigger CustPostInvoiceJob class which implemented using RunBaseBatch framework.  My question is, is it possible to have the workflow built into this so that after user click "Ok" button on the Batch dialog form, it can trigger the workflow for approval and the actual invoice posting won't happen until workflow is completed with approval?  If this is not technical feasible, what would be the alternative solution for this requirement? 

I have the same question (0)
  • Suggested answer
    Khushhal Garg Profile Picture
    1,514 on at

    There is no workflow available for batch jobs out of the box. If workflow is required for free text invoice then it shouldn't allow to post it via batch job so batch job process can be disabled for free text invoice. This is just one option. There could be more but right now I can think of this.

  • Verified answer
    Khushhal Garg Profile Picture
    1,514 on at

    Ideally, posting shouldn't be allowed until free text invoice is approved so once it is approved for posting then it shouldn't matter how it is getting posted via batch job or without batch job so block posting until free text is approved.

  • Verified answer
    Ties Philippi Profile Picture
    962 on at

    Hi Yvonne,

    It works the other way around. Approval Comes first and then the posting Comes. It is not recommended to reverse or change this process. Could you tell the background of your requirement?

    So you set your batch job up to run periodically (each year / month / week / day / hour/ minute whatever works best for your quantity of invoices and business process) and it Will only pick up the approved invoices and not touch the rest.

    Best regards

    Ties

  • Giorgio Bonacorsi Profile Picture
    3,530 on at

    Hi Huang,

    There is not workflow for the job.

    You can set a workflow to approve the free-text invoice. So, D365FO post only the invoice approved.

    To set the workflow you can go to: Account receivable>Setup>Account receivable workflows.

    Here the name of the workflow is "Customer free text invoice workflow" and this is the most simple flow that you can configure:

    7840.wf.png

    Then, during the creation of the free text invoice, your approver should approve the invoices without posting.

    Finally, you can launch your batch, D365FO will posts only the invoices approved

    Best regard,

    Giorgio Bonacorsi

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans