Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Econnect Blank taBRBankTransactionDist Node is being placed in xml file and causing this error: '@I_vOption parameter is not being supplied'.

(0) ShareShare
ReportReport
Posted on by

Here is my code that I am using to populate my xml file with data from my database for the bank transactions. In each distribution array a blank node is being placed 

  <taBRBankTransactionDist xsi:nil="true" />. I did a trace table to ensure that I am not placing a blank node, and the code below is not. Is there a default node that is being placed?? Any help would be great Thanks.

Dim intBatchEntries As Integer = 0

       Dim intTransactionTypeCount As Integer = GetBankRecNumberLines()

       Dim intTransactionCount As Integer = 0

Dim intRowcount As Integer = pubset.Tables(0).Rows.Count

       'create array of journal entries

       Dim bankRecDist() As taBRBankTransactionDist_ItemsTaBRBankTransactionDist

       Try

           'populate xml files

           For i As Integer = 0 To intRowcount - 1

               'retrieve data from dataset

               strChekBkId = Convert.ToString(pubset.Tables(0).Rows(i)("checkbookid"))

               strCmTrxNum = Convert.ToString(pubset.Tables(0).Rows(i)("CmTrxNum"))

               strTrxAmt = Convert.ToString(pubset.Tables(0).Rows(i)("journalamount"))

               strBachNumb = Convert.ToString(pubset.Tables(0).Rows(i)("mgpbatchnumber"))

               strTrxDate = Convert.ToString(pubset.Tables(0).Rows(i)("d_transdate"))

               strJournalNumber = Convert.ToString(pubset.Tables(0).Rows(i)("i_sourcebatchid"))

               'create BRBankTransactionType

               Dim bankRecType As New BRBankTransactionType

               'get the number of entries for a new sourcebatchid

               If Not strJournalNumberHold = strJournalNumber Then

                   Dim intBatchCount As Integer = 0

                   intBatchEntries = GetNumberEntries(strJournalNumber, pubset)

                   ReDim bankRecDist(intBatchEntries)

                   Console.WriteLine("intbatchentries")

                   Console.WriteLine(intBatchEntries)

                   'create header

                   Dim bankRecHeader As New taBRBankTransactionHeader

                   'bank header

                   With bankRecHeader

                       .Option = 1

                       .CHEKBKID = strChekBkId

                       .CMTrxNum = strCmTrxNum

                       .TRXAMNT = strTrxAmt

                       .CMTrxType = 5

                       .DSCRIPTN = strCmTrxNum

                       .BACHNUMB = strBachNumb

                       .TRXDATE = strTrxDate

                   End With

                   'assign header

                   bankRecType.taBRBankTransactionHeader = bankRecHeader

                   Dim intTest As Integer = i + (intBatchEntries - 1)

                   Console.WriteLine("intTest")

                   Console.WriteLine(intTest)

                   'create journal entries

                   For batchEntry As Integer = i To intTest

                       'initialize variables

                       strActNumSt = Convert.ToString(pubset.Tables(0).Rows(batchEntry)("AgentReceivableGLNumber"))

                       debit = Convert.ToString(pubset.Tables(0).Rows(batchEntry)("Y_DEBITBALANCE"))

                       'add journal line

                       Dim bankRecDistLine As New taBRBankTransactionDist_ItemsTaBRBankTransactionDist

                       With bankRecDistLine

                           .Option = 1.0

                           .ACTNUMST = strActNumSt

                           .DEBITAMT = debit

                           .DistRef = strCmTrxNum

                       End With

                       'add journal entry

                       bankRecDist(intBatchCount) = bankRecDistLine

                       'increase journal line count

                       intBatchCount += 1

                       Console.WriteLine("batchentry")

                       Console.WriteLine(batchEntry)

                       Console.ReadLine()

                   Next

                   'place current source batch in the hold variable'

                   strJournalNumberHold = strJournalNumber

                   'assign the batchcount to the for counter variable to

                   'start at correct row in the dataset

                   i = i + intBatchEntries - 1

                   'assign journal transaction lines to the transaction type

                   bankRecType.taBRBankTransactionDist_Items = bankRecDist

                   'add transaction type to econnect

                   ReDim Preserve eConnect.BRBankTransactionType(intTransactionTypeCount)

                   eConnect.BRBankTransactionType(intTransactionCount) = bankRecType

                   intTransactionCount += 1

               End If

           Next

*This post is locked for comments

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Almas Mahfooz Profile Picture

Almas Mahfooz 3 User Group Leader

Featured topics

Product updates

Dynamics 365 release plans