Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Error Number = 68 Stored Procedure= taSopHdrIvcInsert Error Description = Document ID is invalid

Posted on by 75

 hello, I am trying post below xml for creating Sales Invoice but getting Document ID is invalid, I tried to create the same invoice in GP and it works fine.. I tried changing various Document ID but no success. any idea would be great help?

 

Error Number = 68  Stored Procedure= taSopHdrIvcInsert  Error Description = Document ID is invalid
Node Identifier Parameters: taSopHdrIvcInsert
SOPNUMBE = JW-1106-339
SOPTYPE = 3
Related Error Code Parameters for Node : taSopHdrIvcInsert
DOCID = 28166
SOPTYPE = 3


<taSopHdrIvcInsert>
  <SOPTYPE>3</SOPTYPE>
  <DOCID>28166</DOCID>
  <SOPNUMBE>JW-1106-339</SOPNUMBE>
  <DOCDATE>2014-11-06</DOCDATE>
  <CUSTNMBR>01160</CUSTNMBR>
  <SUBTOTAL>500</SUBTOTAL>
  <BACHNUMB>LAMSUPP</BACHNUMB>
</taSopHdrIvcInsert>
 ---> Microsoft.Dynamics.GP.eConnect.eConnectException: Error Number = 68 Stored Procedure taSopHdrIvcInsert  Error Description = Document ID is invalid  


   --- End of inner exception stack trace ---
   at Microsoft.Dynamics.GP.eConnect.EntityMessageProcessor.ExecuteSqlCommands(XElement transactionNode, EntityMessage message)
   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.ProcessMessageImport(EntityMessage message)
   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.EntityImportImplementation(String connectionString, String sXML, Boolean isTransaction)
   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.CreateTransactionEntity(String connectionString, String sXML)
   at DLCGP.Connection.SendMessage() in d:\DLC\DLCGP\DLCGP\Connection.cs:line 61
2014-11-06 15:27:34,765 [36] DEBUG DLCGP.Logger                                       - DLCGP : Leaving the Sales Invoice Create

 

XML Message:

<eConnect xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SOPTransactionType>
    <eConnectProcessInfo xsi:nil="true" />
    <taRequesterTrxDisabler_Items xsi:nil="true" />
    <taUpdateCreateItemRcd xsi:nil="true" />
    <taUpdateCreateCustomerRcd xsi:nil="true" />
    <taCreateCustomerAddress_Items xsi:nil="true" />
    <taSopSerial_Items xsi:nil="true" />
    <taSopLotAuto_Items>
      <taSopLotAuto>
        <SOPTYPE>3</SOPTYPE>
        <SOPNUMBE>JW-1106-339</SOPNUMBE>
        <LNITMSEQ>0</LNITMSEQ>
        <ITEMNMBR>1007</ITEMNMBR>
        <LOCNCODE>AT SEA</LOCNCODE>
        <QUANTITY>2</QUANTITY>
        <LOTNUMBR>JW-110</LOTNUMBR>
        <UOFM>BAG</UOFM>
      </taSopLotAuto>
    </taSopLotAuto_Items>
    <taSopLineIvcInsert_Items>
      <taSopLineIvcInsert>
        <SOPTYPE>3</SOPTYPE>
        <SOPNUMBE>JW-1106-339</SOPNUMBE>
        <CUSTNMBR>01160</CUSTNMBR>
        <DOCDATE>2014-11-06</DOCDATE>
        <LOCNCODE>AT SEA</LOCNCODE>
        <ITEMNMBR>1007</ITEMNMBR>
        <UNITPRCE>250</UNITPRCE>
        <XTNDPRCE>500</XTNDPRCE>
        <QUANTITY>2</QUANTITY>
        <UOFM>BAG</UOFM>
      </taSopLineIvcInsert>
    </taSopLineIvcInsert_Items>
    <taSopLineIvcInsertComponent_Items xsi:nil="true" />
    <taSopTrackingNum_Items xsi:nil="true" />
    <taSopCommissions_Items xsi:nil="true" />
    <taSopLineIvcTaxInsert_Items xsi:nil="true" />
    <taCreateSopPaymentInsertRecord_Items xsi:nil="true" />
    <taSopUserDefined xsi:nil="true" />
    <taSopDistribution_Items xsi:nil="true" />
    <taAnalyticsDistribution_Items xsi:nil="true" />
    <taSopMultiBin_Items xsi:nil="true" />
    <taSopHdrIvcInsert>
      <SOPTYPE>3</SOPTYPE>
      <DOCID>28166</DOCID>
      <SOPNUMBE>JW-1106-339</SOPNUMBE>
      <DOCDATE>2014-11-06</DOCDATE>
      <CUSTNMBR>01160</CUSTNMBR>
      <SUBTOTAL>500</SUBTOTAL>
      <BACHNUMB>LAMSUPP</BACHNUMB>
    </taSopHdrIvcInsert>
    <taSopToPopLink xsi:nil="true" />
    <taSopUpdateCreateProcessHold xsi:nil="true" />
    <taCreateSOPTrackingInfo xsi:nil="true" />
    <taMdaUpdate_Items xsi:nil="true" />
  </SOPTransactionType>
</eConnect>

*This post is locked for comments

  • Almas Mahfooz Profile Picture
    Almas Mahfooz 11,003 User Group Leader on at
    RE: Error Number = 68 Stored Procedure= taSopHdrIvcInsert Error Description = Document ID is invalid

    28166 is the master number not the document ID, your ids are 'STANDARD' and I noticed you have defined it same for Order,Invoice and Return.

    You have to pass invoice id from one of the ids you have defined, see screen shot below.

  • Tim Wappat Profile Picture
    Tim Wappat 5,701 on at
    RE: Error Number = 68 Stored Procedure= taSopHdrIvcInsert Error Description = Document ID is invalid

    Your DOCID corresponds to the field shown below in sales transaction entry.

    Thus, if you click on the underlined "Invoice ID" in the screen indicated in your screen shot, and then scroll through the ORDER ID types you need to check you have one called 28166. This is because you are passing DOCID = 28166 in your econnect document example from your first post, into that field. 

    Alternatively you click the magnifying glass next to UKINVOICE, as shown in my screen shot to select 28166 and try to manually create a sales order that way. Apologies if this is what you have already tried, I just want to check we are not talking at cross purposes.

  • jainmnsh Profile Picture
    jainmnsh 75 on at
    RE: Error Number = 68 Stored Procedure= taSopHdrIvcInsert Error Description = Document ID is invalid

    hello, thanks for your help and response. I checked it looks like and I have tryed 16665 as in screen, same error. yes I am connecting Econnect, all info looks good. because purchase transactions are processing without any issue.

  • Tim Wappat Profile Picture
    Tim Wappat 5,701 on at
    RE: Error Number = 68 Stored Procedure= taSopHdrIvcInsert Error Description = Document ID is invalid

    It must be invalid for the company you are posting the xml to.

    Check that in Microsoft Dynamics GP>>Tools>>Setup>>Sales>>SalesOrderProcessing

    That you have under [Sales document setup] button>>invoice, "28166" set up as an invoice ID.

    This should also show in the of choices list box next to "invoice" on Sales Transaction Entry.

    Are you posting the econnect doc to the correct company in GP, you might have test company that does not have this id, or example company? - Check what company is specified in your code.

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans