ignacio
ignacio

Reputation: 245

GP 10 econnect , What is the use (or possible values) of the second parameter of the GetNextSOPNumber method

I'm using eConnect 10 to insert a document in GP 10, The document can be one of several types, the problem I have is that I do not know the meaning (and what value to pass) of the second parameter of the method, called docIdKey, In the MS documentation there is nothing other than the indication of "STDINV" or "STDORD" for creating orders and invoices.

Can somebody point me (or explain to me) the meaning of this parameter?

Thank, Ignacio

            GetNextDocNumbers sopTransNumber = new GetNextDocNumbers();
            switch (transactionType)
            {
                case GetNextDocNumbers.SopType.SOPQuote:
                    nextTransactionNumber = sopTransNumber.GetNextSOPNumber(GetNextDocNumbers.IncrementDecrement.Increment, ????, GetNextDocNumbers.SopType.SOPQuote, connectionString);
                    break;
                case GetNextDocNumbers.SopType.SOPOrder:
                    nextTransactionNumber = sopTransNumber.GetNextSOPNumber(GetNextDocNumbers.IncrementDecrement.Increment, "STDORD", GetNextDocNumbers.SopType.SOPOrder, connectionString);
                    break;
                case GetNextDocNumbers.SopType.SOPInvoice:
                    nextTransactionNumber = sopTransNumber.GetNextSOPNumber(GetNextDocNumbers.IncrementDecrement.Increment, "STDINV", GetNextDocNumbers.SopType.SOPInvoice, connectionString);
                    break;
                case GetNextDocNumbers.SopType.SOPReturn:
                    nextTransactionNumber = sopTransNumber.GetNextSOPNumber(GetNextDocNumbers.IncrementDecrement.Increment, ????, GetNextDocNumbers.SopType.SOPReturn, connectionString);
                    break;
                case GetNextDocNumbers.SopType.SOPBackOrder:
                    nextTransactionNumber = sopTransNumber.GetNextSOPNumber(GetNextDocNumbers.IncrementDecrement.Increment, ????, GetNextDocNumbers.SopType.SOPBackOrder, connectionString);
                    break;
            }

Upvotes: 0

Views: 212

Answers (1)

Alex Wingrove
Alex Wingrove

Reputation: 35

Microsoft Dynamics GP has user-defined Document Types. You can have multiple Document Types for each SOP transaction type. As each Document Type has its own numbering, you need to know which Document Type you want to use when getting the next SOP Number.

For example, you may have two Document Types set up for SOP Invoices, one named STDINV for normal invoices, and one named SERVINV for service invoices. STDINV may be numbered INV099999, while SERVINV may be numbered SERVINV099999.

Using the above example, you would specify either "STDINV" or "SERVINV" as the second parameter to GetNextSOPNumber() depending on which Document Type you want to use.

You can see the Document Types that are set up in your company by going to Tools >> Setup >> Sales >> Sales Order Processing in Dynamics GP and clicking the Sales Document Setup button. Alternatively you can view the SOP40200 table within SQL Server.

Upvotes: 0

Related Questions