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 :
Microsoft Dynamics AX (Archived)

Posting a programmatically creating vendor invoice - different behavior

(0) ShareShare
ReportReport
Posted on by 427

Hello,

I've written some code which creates thru X++ vendor invoices in the VendInvoiceInfoTable table.

These invoices are not programmatically psoted.

Instead they can be reviewed with in pending invoices screen (Accounts payables - Common - Vendor invoices pending vendor invoices).

If I open the invoice to review it on screen and use the Post button, the vendor transactions is updated correctly (VendTrans table)

If i post directly from the epnding vendor invoices listpage... nothing is posted! Nothing shows up in VendTrans and even worse, the invoice is deleted from VendInvoiceInfoTable! No errors is reported by AX.

If anyone has an idea, please let know!

Regards,

Eric

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Arkadia2 Profile Picture
    427 on at

    Hmmm, finally figure it out, if anyone is interested read on... :)

    VendInvoiceInfoListPage and VendEditInvocie don't behave quite exactly the same way before doing the actual posting.

    The process launched by VendInvoiceInfoListPage will check if the table VendInvoiceInfoSubTable (linked to VendInvoiceTable) has records match the invoice being posted. If it does not, it deletes the VendInvoiceInfoTable record! Since my invoice creation is not applied to invoices made from P.O., I didn't put much care into VendInvoiceInfoSubTable, especially since where using this used to create invoice reversals, so the P.O. shouldn't be of any concern.

    Bad thinking...

    VendEditInvoice does not try to delete an invoice if it does not have at least one matching VendInvoiceInfoSubTable record.

    I've changed my code to create the related VendInvoiceInfoSubTable  and the invoice can now be posted from either forms.

    PS: If you were not interested but still read it up to here, hope you had a good reading! :)

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 21

#2
dserp Profile Picture

dserp 4

#2
dekion Profile Picture

dekion 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans