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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Posting PO in a Batchjob

(0) ShareShare
ReportReport
Posted on by 15

Hi Guys,

When I post PO from a batch job (in Ax2009), records are getting created in PurchParmTable.  As I use Late selection it generates records and shows them in the posting dialog. It holds the records after the completion of the transaction.  This gives problem during the next batch transaction if it found records in the posting dialog.   How could if remove records from this posting dialog(ParchParmTable) after the completion of the posting process?

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    239,031 Most Valuable Professional on at

    The next posting should have a different ParmId and therefore records for the previous posting shouldn't be used for the new one. Do you agree?

    Are you sure that your query (used for late selection) filters out records that we're already posted?

  • Nadeem ahmad Profile Picture
    15 on at

    Hi Martin.

    Thanks for your prompt response. I could see ParmID is not going to change in any iteration. it is fixed although I have select the late selection in my query select form. What went wrong? where can I make it changeable for every iteration when it is the late selection?

    Thanks

  • André Arnaud de Calavon Profile Picture
    303,706 Super User 2026 Season 1 on at

    Hi Nadeem,

    Late selection means that during the batch run, it will try to find all purchase orders which meets the criteria. Why is a second batch transaction already running? Can you explain the scenario?

  • Nadeem ahmad Profile Picture
    15 on at

    Hi  André Arnaud ,

    The first iteration finished after posting the PO and by saving a record for this PO in the PurchParmTable. The second iteration takes the same ParmID and tries to post the previously posted PO.

    2nd iteration works fine if I remove the record from the PurchParmTable.  Do it required a new ParmId to resolve this issue?  where should I can create a new ParmId?

    I'm thinking to remove the record from the PurchParmTable. in that case, I want to know in which class or method I can do it.

    Thank you in advance.

  • André Arnaud de Calavon Profile Picture
    303,706 Super User 2026 Season 1 on at

    Hi Nadeem,

    Can you tell which exact parm ID is used/created? Can you verify the System number sequence? It should not be set to continuous.

  • Nadeem ahmad Profile Picture
    15 on at

    Hi André,

    A parmid is defined when I create PO posting batch job, this parmid is fixed and used for each iteration for this batchjob.
    I want to remove processed records from PurchParmTable. I want to know a place where I can put my delete code.
    I tried to delete records in run/mainOnServer methods of PurchFormLetetr classes.

  • Martin Dráb Profile Picture
    239,031 Most Valuable Professional on at

    That's not how it should work, AFAIK. How exactly did you set it up? Isn't the batch job a customization?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans