Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Batch with "Late Selection" - Invoice and Order Confirmation will not be executed

(0) ShareShare
ReportReport
Posted on by 50

Hi All,

When I try to run invoices or Order confirmation in a recurring Batch in combination with the Late Selection Parameter, the Sales Orders are NOT Invoiced / Confirmed. When I do the same without the Late Selection un-"Ticked" it works fine.

What I have do so far:

1. Recompile AOT - result OK.

2. Complete CIL - result OK.

3. Synchronise - result OK.

4. Restarted AOS.

5. Deleted the Folder XPILL.

Remark(s): if I look into the SalesParmTable I see the records what should be Invoiced/Confirmed but they have the ParmJobStatus = "Waiting". If I look in the Batch Job and look at the Parameters I see the Sales Orders what should be Invoiced/Confirmed, probably from the SalesParmTable.

Question; why are they not being executed...... ?

Thanks.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Batch with "Late Selection" - Invoice and Order Confirmation will not be executed

    Check if the SQLFormLiterals is set to 1 in your server configuration

    If such is the case, then you need a code fix to force the literals for the Late Selection Batch Job method to work

  • csteenbe Profile Picture
    csteenbe 50 on at
    RE: Batch with "Late Selection" - Invoice and Order Confirmation will not be executed

    Thanks Crispin.

    The Hotfix I only find is the 3646601, but this is implemented...

    Searching further ;-)

  • Crispin John Augustine Profile Picture
    Crispin John Augustine 37,081 on at
    RE: Batch with "Late Selection" - Invoice and Order Confirmation will not be executed

    I'm sure, you are at the very right place. And my earlier comment regarding a hotfix was exactly for this, because the same condition is related to initialising the ParmData, and I'm fairly certain that you can resolve this with the hotfix.. Just that I don't seem to find it..

    You see, it's got to do with the createParmData() call..

  • csteenbe Profile Picture
    csteenbe 50 on at
    RE: Batch with "Late Selection" - Invoice and Order Confirmation will not be executed

    Hi,

    Still investigating the probem, and found something out if multithreading is used than it will NOT work. I have shut off the multithreading when using the Late Selection and than it will work.

    I have made a change to the FormLetterService Class in the MEthod run i have set the variable parallelismDisabled on TRUE, and it works fine with the Late Selction.

    But ofcourse this is not a solution.......

  • csteenbe Profile Picture
    csteenbe 50 on at
    RE: Batch with "Late Selection" - Invoice and Order Confirmation will not be executed

    Hi, checked all hotfixes and they are all in.

  • Crispin John Augustine Profile Picture
    Crispin John Augustine 37,081 on at
    RE: Batch with "Late Selection" - Invoice and Order Confirmation will not be executed

    I remember a hotfix for this. The solution was an extra condition on a where clause to read from SalesParmTable, somewhere in a SalesFormLetter** class..

    In Standard, there was only a where on ParmId, and the hotfix had an additional field. I don't precisely remember it..

    You can either look for the hotfix, or try to find the Code where SalesParmTable is read...

    I also think, the Scenario Sagar mentioned could be a potential result of this missing condition as well..

  • csteenbe Profile Picture
    csteenbe 50 on at
    RE: Batch with "Late Selection" - Invoice and Order Confirmation will not be executed

    Checked sakesId, it is filled.

    SalesParmTable is getting larger and larger with records with jobstatus WAITING....

  • csteenbe Profile Picture
    csteenbe 50 on at
    RE: Batch with "Late Selection" - Invoice and Order Confirmation will not be executed

    Thanks Sagar, the batch job is every time executed and it does not throw any errors.

    Will check the salesid!

  • Sagar Suman Profile Picture
    Sagar Suman 6,004 on at
    RE: Batch with "Late Selection" - Invoice and Order Confirmation will not be executed

    Hi csteenbe,

    I remember facing a similar issue while trying to execute the sales invoice batch job and the job would not be saved in my case and used to throw an error "Sales order must be filled in"

    No matter what we did this will not be saved and later we found that in SalesParamTable there were some orphan records with blank sales id field causing the issue. We deleted the orphan records and it was saved and worked perfectly since then.

    Is your batch job getting saved?

    Or your batch job is saved but will never be executed even for the first time and remains in waiting state forever?

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…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans