Discussion:
eConnect - Creating IV Adjustment Trx Error
(too old to reply)
EC Dev
2011-07-26 16:35:14 UTC
Permalink
Weird problem with eConnect on version 9. I'm creating an Inventory
Adjustment Transaction. It's a simplified test. The transaction is
created every time, but I still get an exception. The eConnect Error
Log says this:

Event Type: Error
Event Source: Microsoft.GreatPlains.eConnect
Event Category: None
Event ID: 791
Date: 7/26/2011
Time: 8:49:16 AM
User: N/A
Computer: WEBDEV
Description:
Microsoft.GreatPlains.eConnect Version=9.0.0.0
.Net SqlClient Data Provider

Procedure or function 'taIVTransactionLineInsert' expects parameter
'@I_vIVDOCNBR', which was not supplied.
at
Microsoft.GreatPlains.eConnect.eConnectMethods.ExecStoredProcedures(String
xml)
at
Microsoft.GreatPlains.eConnect.eConnectMethods.eConnect_EntryPoint(String
ConnectionString, ConnectionStringType ConnectionType, String sXML,
SchemaValidationType ValidationType, String eConnectSchema)

The XML is this:

<?xml version="1.0"?>
<eConnect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<IVInventoryTransactionType>
<eConnectProcessInfo />
<taRequesterTrxDisabler_Items xsi:nil="true" />
<taUpdateCreateItemRcd xsi:nil="true" />
<taIVTransactionSerialInsert_Items xsi:nil="true" />
<taIVTransactionLotInsert_Items xsi:nil="true" />
<taIVTransactionLineInsert_Items>
<taIVTransactionLineInsert>
<IVDOCNBR>000462</IVDOCNBR>
<IVDOCTYP>1</IVDOCTYP>
<ITEMNMBR>001012-2A</ITEMNMBR>
<UOFM>EACH</UOFM>
<TRXQTY>1</TRXQTY>
<TRXLOCTN>VCM</TRXLOCTN>
</taIVTransactionLineInsert>
</taIVTransactionLineInsert_Items>
<taAnalyticsDistribution_Items xsi:nil="true" />
<taIVTransactionMultiBinInsert_Items xsi:nil="true" />
<taIVTransactionHeaderInsert>
<BACHNUMB>TEST</BACHNUMB>
<IVDOCNBR>000462</IVDOCNBR>
<IVDOCTYP>1</IVDOCTYP>
<DOCDATE>07/26/2011</DOCDATE>
</taIVTransactionHeaderInsert>
</IVInventoryTransactionType>
</eConnect>

The transaction created in Great Plains seems to post OK, but I'm not
sure why an exception keeps getting thrown. The original exception I
get in .NET says (minus the stack trace):

System.Data.SqlClient.SqlException (0x80131904): System error.

I can create other transaction types throw the same instance of
eConnect.

Ideas?
b***@gmail.com
2013-12-13 21:34:23 UTC
Permalink
This post is probably late, but I'll put it out there to possibly help others.

eConnect has a method to generate the next available DOCNUMBER (or PONumber, etc). This is what I have used:

string DocNumber = econnClient.GetNextIVNumber(IncrementDecrement.Increment, IVDocType.IVAdjustment, connString);
Loading...