Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Automatic Payments while Posting Purchase Invoice with Payment No. Series. instead of the same Invoice no. in the Payment Entry

(0) ShareShare
ReportReport
Posted on by 423

Hi All,

I have a requirement to do automatic payments while posting the invoice.

I used the based functionality 'Payment Methods' with Balance account type as Bank account and then choosing the Bank account and then assigning the payment method in the Vendors also made sure that the purchase invoice is with the Balance account no. It is working fine by posting the Purchase invoice and also posting the Payment entry against it at once.

Now, the requirement is to make the payment entry picking a different 'No Series' than the same purchase invoice no. itself.

I did a customization in Codeunit 90 where it starts to check whether it has the Balance Account No. (It starts with  'IF "Bal. Account No." <> '' THEN BEGIN' ) to pick a 'Payment' no. series from No. Series Line and assign it to Document No. (After this: GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment;).

The Problem is that it is getting Inconsistency error while posting the Purchase invoice. Please find the attached image to look into the error message.

Kindly guide whether there is anyway to achieve a payment no. series for the applied payment entry instead of the same invoice no. itself.

Thanks in advance.

*This post is locked for comments

  • Suggested answer
    npanchal Profile Picture
    npanchal on at
    RE: Automatic Payments while Posting Purchase Invoice with Payment No. Series. instead of the same Invoice no. in the Payment Entry

    You need to carefully, Debug the code as Document No. is used multiple places.

    You can also write seperate code to post payment entry after your invoice gets posed.

  • Sarav Profile Picture
    Sarav 423 on at
    RE: Automatic Payments while Posting Purchase Invoice with Payment No. Series. instead of the same Invoice no. in the Payment Entry

    Would like to know the cause of inconsistency issue in this case. kindly share your inputs.

  • Sarav Profile Picture
    Sarav 423 on at
    RE: Automatic Payments while Posting Purchase Invoice with Payment No. Series. instead of the same Invoice no. in the Payment Entry

    Sorry for missing the error message. Please find it as follows:

    The transaction cannot be completed because it will cause inconsistencies in the G/L Entry table. Check where and how the CONSISTENT function is used in the transaction to find the reason for the error.

    Contact your system administrator.

    Tables can be marked as inconsistent during comprehensive tasks, such as posting. This prevents data from being updated incorrectly.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,253 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans