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 GP (Archived)

GP 2010 Web Services PayablesDocument - Get next voucher number

(0) ShareShare
ReportReport
Posted on by 190

I have developed a C# program which uses the GP 2010 R2 web services model to import expense reports into a payable batch.  After getting through many difficult issues I have found myself with one last one, how to get the CreatePayablesInvoice method to auto populate the key field or PayablesDocumentKey object (Voucher Number field on screen 'Payables Transaction Entry') with the next available number.

I have found a way to use an eConnect SQL Stored Procedure to get the next number but I just don't understand why Web Services does not provide this.  While I have not used eConnect it appears that it does provide this functionality and since Web Services is based on it why not do the same thing?  I feel like I am missing something really simple here.

Ed Morris

*This post is locked for comments

I have the same question (0)
  • Verified answer
    sandipdjadhav Profile Picture
    18,306 on at

    ED,
    I feel same thing, finally I created custom webservice using eConnect methods so we don't have to install eConnect client on each workstation.
    Please find enclosed following code for Next Purchase Receipt Number.

    [WebMethod]
           
            public string NextPOPReceiptNumber()
            {
               // GetNextDocNumbers myPOPNumbers = new GetNextDocNumbers();
                GetNextDocNumbers myPOPNumber = new GetNextDocNumbers();
                try
                {

                    string sConnectionString = ConfigurationManager.ConnectionStrings["GpeConnectConnectionString"].ToString();

                    string CurrentPOPNum = myPOPNumber.GetNextPOPReceiptNumber(IncrementDecrement.Increment, sConnectionString);
                    return CurrentPOPNum;
                }
                catch (Exception ex)
                {// If an error occurs, diplay the error information to the user
                    throw ex;
                }
                finally
                {
                  //  myPOPNumbers.Dispose();
                    myPOPNumber.Dispose();
                }
            }

    It may helpful to create custom webservice for Purchase Invoice No

    Let me know how it goes.

    Thanks
    Sandip

  • Matt Olson Profile Picture
    85 on at

    Ed,

    Have you considered a cheap integration tool like Dynamics GP SSIS Toolkit available here: www.keelio.com/.../DynamicsGPSSISToolkit.aspx ?

    It's much simpler to integrate these types of documents (payables) into Dynamics GP without the need for web services (meaning much faster integrations).

    There is even a payables sample in the toolkit download.

    Thanks,

    Matt

  • Ed Morris Profile Picture
    190 on at

    Matt,

    I appreciate your reply.  

    We own Scribe which looks similar to Keelio however I have very little control over the format of the input file and frankly the design made it very difficult to process.  These are also files which are downloaded by users interactively from a website so it is much simpler for them to process them from their PC.  I liked Integration Manager for this but it was even less successful at importing this file.  In my case I know the Web Services pretty well so it was not a very long process to create the program but for many users it would be better to use other integration methods.

    Thanks,

    Ed

  • Ed Morris Profile Picture
    190 on at

    Sandip,

    That is a great idea and I have tested with success.  I will likely take this approach with other missing features and hope that Microsoft adds them into future versions.

    Thanks,

    Ed

  • sandipdjadhav Profile Picture
    18,306 on at

    ED,

    I always create custom webService for missing features..which is available on eConnect but not in WebServices. I have done same for Purchase Receipt with Shipment/Invoice type which is not available on WebService but eConnect schema is available.

    Thanks

    Sandip

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 GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans