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
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.
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
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.
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
If you're in test you could try flipping the allow duplicates in Payables Management to rule out the historical trace.
Frank,
While I haven't tried running Check Links, I have tried voucher numbers well outside the range ever used.
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?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156