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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
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 443

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

I have the same question (0)
  • Sarav Profile Picture
    443 on at

    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.

  • Sarav Profile Picture
    443 on at

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

  • Suggested answer
    npanchal Profile Picture
    on at

    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans