Site Search:
Sign in | Join | Help

eConnect makes me stupid... :(

Last post 03-04-2008 1:58 PM by sendow. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 02-01-2008 4:22 PM

    eConnect makes me stupid... :(

    So I have been given a project that need to work with GP.   I need to be able to submit Payables Transaction Entries from a web page.  I am making some basic assumptions and trying to find the correct schema and process to provide this functionality.  I hope someone here can validate my assumptions or point me in the right direction

    Assumption 1 -  I need a valid VendorID In order to submit a Transaction Entry.

    This means that I need to retrieve a list of valid VendorIDs from GP, and allow the user to select a Vendor.  I then would need to retrieve the default information about that Vendor (Address, Currency, etc) to populate my Transaction Entry with valid values. 

    How do I use eConnect to provide a list of Vendors and Vendor information. 


    Thanks
    Terahex  AKA  The eConnect challenged slacker...

    • 12.129.11.131
  • 02-01-2008 4:44 PM In reply to

    Re: eConnect makes me stupid... :(

    I get this kind of question frequently. Here's my 'hello world' post:

    http://vstoolsforum.com/forums/p/402/819.aspx#819

    I would not use eConnect to get vendors, they're stored in the PM00200, just run a query.

    Read the help file, read the post above, and send me questions. Also, please send improvements to the 'hello world' post.

    If it all works perfectly the first time... send money <smiles>

     

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • 216.77.101.2
  • 02-04-2008 2:40 PM In reply to

    Re: eConnect makes me stupid... :(

     

    Thanks for the reply Steve and great 'Hello World' post.  I will surely be referencing that to help me get started.

    It was recommended by another person to stay away from interacting with the GP tables directly.  They said I could do everything through eConnect.  Perhaps they were stating not to update any tables directly??? 

    Looking through the database it appears that I can get then vendors from PM00200 and a list of their addresses from PM00300.  What is the best method to create the voucher number?  Once I have all this information I can create a xml file similar to the following.  Would this file be valid to submit using your ‘Hello World’ example?

    <taPMTransactionInsert>

                    <Batchnum>OCR020408</Batchnum>

                    <Vchnumwk>VoucherNumber</Vchnumwk>

                    <Vendorid>CompanyA</Vendorid>

                    <Docnumbr>123456</Docnumbr>

                    <Doctype>1</Doctype>

                    <Docamnt>512.99</Docamnt>

                    <Docdate>02/04/2008</Docdate>

    <Vaddcdpr>Primary</Vaddcdpr>

    </taPMTransactionInsert>

     

     

    Thanks so much for your replies

    Harold

     

    • 12.129.11.131
  • 02-04-2008 3:12 PM In reply to

    Re: eConnect makes me stupid... :(

    terahex:
    It was recommended by another person to stay away from interacting with the GP tables directly

    Never INSERT or UPDATE the dynamics tables. I don't see the harm in writing queries, though. I do that all day long.

    terahex:
    What is the best method to create the voucher number?

     

    The voucher number is a char(21), and it is free form. Anything you want. Maybe 'VCHR000001', or something like that.

    There is a setup table in Dynamics (PM40100) that defines the next voucher number that the system will use, but that requires some skill to use - you have to lock the table, increment the number and replace the number, then unlock. Otherwise you'll have multiuser issues.

    Can you just maintain your own schema for 'next number'?

     Here is a link to our PM table schema post

    http://vstoolsforum.com/blogs/dynamicsgp/archive/2007/04/28/dynamics-gp-payables-management-rm-tables.aspx

    There are more on the home page, toward the bottom.

     

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • 71.100.137.9
  • 02-04-2008 5:29 PM In reply to

    Re: eConnect makes me stupid... :(

    Thanks again for the info.  In addition to creating a new TransactionEntry, I need to include a note with that Transaction.   Looking through the database some more, I found the PM10000 table appears to store the Payables Transactions.  I also found the NOTEINDX field that appears to reference the SY03900 table. Is there a way to submit the notes through eConnect?

     

    Thank you

    Harold
     

    • 12.129.11.131
  • 02-05-2008 10:20 AM In reply to

    Re: eConnect makes me stupid... :(

    I'm not seeing any way. The help file for GP 9 and 10 don't say anything about notes in a Payables transaction

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • 71.100.137.9
  • 03-04-2008 1:58 PM In reply to

    Re: eConnect makes me stupid... :(

    After many attempts trying to use GP's next voucher number, and much frustration, I would strongly, strongly recommend maintaining your own next doc number table.

     I made 3 attempts at using the PM40100 table to get the next voucher number.  Each time it appeared to work, but what I found is that in an environment with multiple AP clerks entering vouchers, the voucher number that my integration retrieved from the table, despite locks and tons of code to prevent dups, would eventually be a number that had been retrieved previously by a GP user.

    On my 3rd attempt I reverse engineered the GP stored procedure that is used to get the next voucher number (it is very scary code) and used that design and code in my integration to try and avoid the duplicate voucher numbers, but even that didn't work 100%.  I honestly don't know how GP is doing it reliably, unless they have additional logic in the application to further try and prevent dups.
     
    The good news is that as soon as I switched over to my own voucher number table, things worked perfectly and I never had a problem or error again related to that issue.  I created a table with a Prefix field and a Number field, so that I could easily increment the number and just append it to the prefix.  So, perhaps Web site imports are "WEB" + "100001", vendor electronic billing files are "VEN" + "100001", etc.  If you add a few additional fields (ImportType = PMVCH, RMINV, etc.) you can use the same table for all document numbers (except perhaps GL JEs, if you want those in sequence).

    Good luck!

    Filed under:
    • 24.180.23.199
Page 1 of 1 (7 items)