Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

taGetPaymentNumber eConnet Error 3413: Unable to increment next document number from Document Type Setup after 1000 attempts (RM40401)

(0) ShareShare
ReportReport
Posted on by

Hi,

I am using eConnect to generate big cash receipt transaction batch in GP2015. However sometimes I get error as below. Not all the time.

Please advise what might cause the next document number for cash receipt not getting updated in RM40401.

What if user forgot to close the cash receipt window. Will the next cash receipt number gets occupied in setup and can't get updated?

Exception message:

Source Procedure: taGetPaymentNumber

Error Number: 3413

Error Description: Unable to increment next document number from Document Type Setup after 1000 attempts (RM40401)

Stack Trace:

   at Microsoft.Dynamics.GP.eConnect.GetNextDocNumbers.DocumentNumberRetrieval(String procName, Int32 docType, IncrementDecrement incdec, SqlConnection sqlConnection)

Thanks in advance!

Huan 

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: taGetPaymentNumber eConnet Error 3413: Unable to increment next document number from Document Type Setup after 1000 attempts (RM40401)

    Hi Matt,

    Thanks for the response.

    Is there a way to replicate the case in GP? So that I can tell user to not to in order to avoid the error.

    Thanks,

    Huan

  • MattPaulen Profile Picture
    6,912 on at
    RE: taGetPaymentNumber eConnet Error 3413: Unable to increment next document number from Document Type Setup after 1000 attempts (RM40401)

    "Error Description: Unable to increment next document number from Document Type Setup after 1000 attempts (RM40401)"

    This part can happen whether it's eConnect or just through the application.  That means that it's looking at the Next Document Number, in this case the next payment number, and tries the next 1000 in sequence.  If it can't find an available one within the next 1000, it errors out.

    Typically the fix for this is adjusting the Next Payment number to a higher number.  You could run a script to see what the last payment number used was and then update it to that.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,996 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans