Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

Integration Manager - Voucher Already Assigned

Posted on by 22,782

I have a payables management integration I'm running where I have some VBA to get the next voucher number which is used to populate a couple of custom tables.

However, when the commit occurs I receive the following error on all rows:

This voucher number already exists. You must provide a new voucher number.

I've checked and this voucher number DOES NOT exist anywhere in Payables Management.

*This post is locked for comments

  • Ian Grieve Profile Picture
    Ian Grieve 22,782 on at
    RE: Integration Manager - Voucher Already Assigned

    Sanjay,

    1. I've used this stored procedure before. I adjusted where I was getting the voucher number and it stopped crashing.

    2. I am populating a couple of custom tables which require the voucher number so I need to get it manually.

    3. When I was getting this error it was one that did not exist anywhere. Since switching to the sproc I don't get the message.

    4. See 3

    5. No error message beyond Integration Manager has crashed. Debug or End were the only two options.

    Thanks.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Integration Manager - Voucher Already Assigned

    Ian,

    Couple of things you can do.

    1) I tested the VBA method to call e Connect stored procedures and it runs ok, you can find my notes here www.sanjaykumar.us/.../using-e-connect-stored-procedure-integration-manager - did you do some thing different ?

    2) Why use the scripts to get next voucher number, setting it to default - integration manager will automatically get next voucher numbers.  You don't have to provide a source - destination mapping.

    3) When you get the already used message, take note of the voucher number.  search for the tables the voucher number exists.  How to do it see here www.sanjaykumar.us/.../search-db-useful-script

    4) Once you have the table list, check the max value for voucher number at those tables.  ensure the next voucher number is max value +1.

    5) You can post your error message when it crashes.

    Cheers!

    Sanjay

  • Ian Grieve Profile Picture
    Ian Grieve 22,782 on at
    RE: Integration Manager - Voucher Already Assigned

    Thanks Sanjay.

    I'd borrowed from another integration and used the code from there which did not use that stored proc. I've updated it to use the sproc and the integration does accept the voucher number.

    It crashes after 10 documents though. This is IM 10 which I am running over an RDP session which I think is known to be problematic.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Integration Manager - Voucher Already Assigned

    Call e connect next document  stored proc from integration manager.

    dynamicsgpblogster.blogspot.com/.../getting-next-voucher-number-for.html

    If you want to locate where the voucher number is used  read below post.

    blogs.msdn.com/.../updated-spsearchonalldb-sql-stored-procedure-to-search-an-entire-database.aspx

    Cheers!

    Sanjay

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Integration Manager - Voucher Already Assigned

    If you're in test you could try flipping the allow duplicates in  Payables Management to rule out the historical trace.

  • Ian Grieve Profile Picture
    Ian Grieve 22,782 on at
    RE: Integration Manager - Voucher Already Assigned

    Frank,

    While I haven't tried running Check Links, I have tried voucher numbers well outside the range ever used.

  • Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 4,029 Super User 2024 Season 2 on at
    RE: Integration Manager - Voucher Already Assigned

    Ian, I ran into something similar recently.  What I found was that the voucher number had existed at one time and had been subsequently removed (I think directly via SQL) which apparently left a trace of the record sitting in a table.  I ran checklinks on the payables tables and that resolved the error.  Have you tried that yet?

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans