Archives

 
This article contains a code example on how to use the Telerik Multicolumn Dropdown control    

As part of our data access library, we post commonly used stored procedures for Dynamics

This article contains a select statement for the IV40400 Item Class table, it would be used to populate dropdown lists

As part of our data access library, we post commonly used stored procedures for Dynamics

This article contains a select statement for the RM00201 Customer Class table, it would be used to populate dropdown lists

As part of our data access library, we post commonly used stored procedures for Dynamics

This article contains a select statement for the TX00101 Tax Schedule table, it would be used to populate dropdown lists

As part of our data access library, we post commonly used stored procedures for Dynamics

This article contains a select statement for the RM00301 Salesperson table, it would be used to populate dropdown lists

Recently I was involved in an Integration Manager integration that required SOP Payments, and some of those payments were credit cards. If they were credit cards there would be an expiration date; if cash or check there would be none

The challenge was converting '2013' to and integer value that would equate to the index of the dropdown box. There are about 10 items in the (GP2010) dropdown box, 1 = 2013, 2 = 2014, etc.

That realization alone took hours. This article is a short VBScript example of code that goes in the Expiration Year script that will make all this work .

Many of the articles here on DD are of the 'non-ground-breaking' variety, and... this one is no different.

Often, when coding the Winform RadGridView I need to set default values in the new row. This is a short code example on how to handle that.

You may ask why I would blog something so simple... the answer is that when coding I keep the DD Telerik menu open, and all these code examples add up to faster coding.

 

This article will be our repository for common coding techniques for the Telerik RadSpinEditor control

 

I know that I didn't phrase that title exactly correct, but here's the concept: This piece of code will allow you to create an .rdlc file (an SSRS report) in your Visual Studio project and then call that report from code; the SSRS report server will not be called. This is all Visual Studio and .NET, but produces a report.

This is a step by step guide to creating the report, it includes screen shots and code samples

 

If you need to place code behind a WinForms RadGridView that does something when the grid row changes, the CurrentRowChanged event is the place to do it. This article is a short code example of how to code that event
Script logs in GP can give you a lot of useful information when developing, especially when coding in Dexterity or VS Tools.  I most commonly use them when trying to determine parameters for native Dex procedures and functions.  They also help when trying to code against third party ISV products.  Microsoft sometimes asks you to run one and send to them for certain Tech Support calls as well.                      

http://dynamicsgpblogster.blogspot.com/2009/01/how-to-schedule-dynamics-gp-to.html

I've got a need to schedule Integration Manager to run nightly; this blog from Mariano Gomez look like it might do the trick. There is no content in this article, I just wanted to record the link so I would not lose it.

 

 

I just spent way too long trying to find this piece of code.

When you're in a Telerik Grid and you need to cancel the new row, you need the line of code below. It's not really intuative, so I'm going to write it down <smiles>

                       

Good afternoon...

I am using vb.net with eConnect to GP and am trying to upload sales orders. I had it all working fine until I needed to upload taxes on an order. I would prefer to do this at the header level but I read somewhere that you cannot upload a fixed tax amount in the header without forcing it to calculate the tax on gp.

so I have tried adding into my code...

                    Dim taxLineItems(1) As taSopLineIvcTaxInsert_ItemsTaSopLineIvcTaxInsert

                   Dim taxsalesLine As New taSopLineIvcTaxInsert_ItemsTaSopLineIvcTaxInsert
                    With taxsalesLine
                        .SOPTYPE = 2
                        .LNITMSEQ = salesOrderx.taSopLineIvcInsert_Items(0).LNITMSEQ
                        .CUSTNMBR = gpcustid
                        .TAXDTLID = "Other"
                        .TDTTXSLS = (useprice * (orderqty * orderqtymultiplier))
                        .TDTTXSLSSpecified = True
                        .TXDTOTTX = (useprice * (orderqty * orderqtymultiplier)) + taxtotal
                        .TXDTOTTXSpecified = True
                        .TAXTYPE = 0
                        .STAXAMNT = taxtotal
                        .SALESAMT = (useprice * (orderqty * orderqtymultiplier))
                    End With
                    taxLineItems(0) = taxsalesLine
                    ReDim Preserve salesOrderx.taSopLineIvcTaxInsert_Items(1)
                    salesOrderx.taSopLineIvcTaxInsert_Items = taxLineItems


but that throws the error...

Procedure or function 'taSopLineIvcTaxInsert' expects parameter '@I_vSOPTYPE', which was not supplied.

If I can do without the line item tax, that would be preferable...

any help would be greatly appreciated.

Scot

I am trying to develop a custom job cost report using Crystal reports. I know Crystal fairly well but I know very little about table architecture of GP / Wennsoft.

The environment we use is both Great Plains and WennSoft for job cost. I am most interested in ALL CUMULATIVE DETAIL transactions that effect the actual cost of jobs. My question is which Great Plains and/or WennSoft table(s) will provide me with the detail I need? Also, is there any documentation available to me that explains the architecture of data flow within the GP/WennSoft system? Apparently some types of transactions originate in Great Plains, then are "posted" to WennSoft. This is what I mean by "flow", despite the direction.

 

 

hi

what table(s) are used to assign an employee to a given pay code?

I found what I was looking for.

But I don't lnow how to delete/remove a question... yet.

 

 

hi,

i need to get the next timesheet number, but am unable to figure out where to get it from.

there is a dd article http://dyndeveloper.com/articleview.aspx?ArticleID=76 that explains how to do this, but i find it hard to believe i have to create a stored procedure to do this.  i would think there is already one to get the next ts number.

i suppose i could just query the table pa timesheet history tables, get the max number and do my own increment, but i would rather use a built-in function from gp to do it.

 

thanks.

In which table(s) can I find "estimated costs" amounts for a job, cost code, cost element level?

Where can I find "estimated revenue" amounts on the same level?

 

 

I'm trying to import mutiple rows of data from a table I created with the data I have in order to create RMA's, I'm trying to create RMA's through inserting the data in the SVC Tables, not using GP Interface.  I thought I have figured out all the tables that need data to be imported into which are SVC05000, SVC05020, SVC05030, SVC05255, SVC00300, SVC00310. I also thought SVC05200 was a table that data needed to be imported, but viewing the data thats created by GP Interface when creating an RMA it doesnt create a row for it, So I don't know. So basically I need to know all the tables that I need to import data into or update certain fields in tables to make an RMA look similiar to one being created in the RMA Interface? Also when I go back into the Interface and click on new RMA, it doesnt start with the next one after the last RMA number in GP, It will start with the next RMA Number after the last RMA created in the Interface?

I know SQL pretty good, In my script I created a cursor, and created queries to create the RMA numbers and all other fields that are consective numbers on the last RMA number in the fields I search for.

 

Are eConnect calls developed against GP2010 compatible with GP2013, or do I need to rewrite (yet again) my eConnect logic?

Thanks.

hi all,

well, im getting much closer in my timesheet import project.  however, i ran into a snag. 

Day one: 2/1/2013 - employee #0001 and #0002 both with 8 hours.

Day two: 2/2/2013 - employee #0001 with 8 hours.

so if you already have a timesheet setup for an employee, and you need to simply add a new line to an existing timesheet, then using "CreateTransactionEntity()" might not be the answer. 

I figured that "UpdateTransactionEntity()" would be the way to go.  However, you cant just add the line to the xml document, since it must have the header part as well.   so i made sure that the xml document had the header AND the new line to insert, but then it complains that the timesheet document already exists (even when using the updatetransactionentity econnect command).

so at this point i decided that if the timesheet already exists, to just do an insert directly using the stored procedure "taPATimeSheetLineInsert".  This worked just fine, i inserted the line for 2/2/2013 for 8 hours for employee 0001.  the problem is when i get back into GP and look at that timesheet, it throws an error saying the distributions are not correct.

So how would you enter new lines in a timesheet that already exists?  Each employee gets their own timesheet, and there will be a project timesheet for each day, so i need to be able to add lines to existing timesheets.  Is there another stored procedure that runs that does these distributions?  in the database, there are some extra stored procedures "taPATimeSheetLineInsertPost" and "taPATimeSheetLineInsertPre".  what do these do?

 

Here is my work-around if all else fails:

if timesheet exists for employee, then create a dataset with header and detail tables,

1.  pull in the header and all detail lines from the timesheet in PA10000/PA10001 

2.  add new timesheet line to this in memory dataset. 

3.  delete existing timesheets in PA10000 and PA10001 that match that ts number

4.  re-create timesheet using econnect from the in memory dataset

NOT EFFICIENT AT ALL.  but would be a work around.

 

 

thanks in advance.

hi guys.

so i am making this timesheet import thing.  i have written and re-written this thing a few times now.

my code works....i can import 2/1, then 2/2, then 2/3......but......

for any given employee, i have to destroy the existing timesheet in the GP database, so i can re-issue the complete document via eConnect.  So, at day 4 for a shop timeticket, one employee will have 4 detail lines.   so at day 4, i pull the existing records from GP (pa10000 and pa10001) into a local dataset.  then i pull the next timesheet and add another detail record to that dataset.  then i serialize the dataset into the econnect document type for a pa timesheet.

once i issue the command "CreateTransactionEntity(oeConnectType)", everything looks like it works.   when i go to the database and look at what has been created, ALL of those detail lines have the most current date....so in other words, it forced that last date into ALL detail lines in the PADT field.....this is not good.

now, for this employee's timesheet, i have 4 entries in the PA10001 table all saying they were hours for the same date.

what the hell????????

Hi Guys, 

Have been a subscriber for an year, now looking for your help. 

Using the code below to create an invoice with manual distributions, instead of default. Have the following 2 problems - 

1. Get the distribution account(s) are missing or invalid error. However, I can see the accounts in the distribution window. 

2. The tax is not being imported.  

 

Function CreateSOPHeader(ByRef eConnect As eConnectType, ByVal SOPHeader As SOPHeaderType, _
    ByRef sError As String, ByVal dSubTotal As Decimal, ByVal bPostImmediately As Boolean) As Boolean
        Try
            CreateSOPHeader = False
            Dim CustomerType As New SOPTransactionType
            Dim MySOPHeader As New taSopHdrIvcInsert
            'Insert our customer data from the winform into the MyCustomer Class object.
            With MySOPHeader
                .CUSTNMBR = Trim(SOPHeader.AccountNumber)
                .SOPTYPE = SOPHeader.TransactionType '1=Quote, 2=Order, 3=Invoice, 4=Return, 5=Backorder
                ' No need to specify .DOCID as it is automatically determined from .SOPTYPE. AM 2/11/2005
                If IsNothing(SOPHeader.DocIDString) Then
                    .DOCID = DocIDFromTypeArr(.SOPTYPE) ' Identifies source of record.
                Else
                    .DOCID = SOPHeader.DocIDString ' Identifies source of record.
                End If
                .SOPNUMBE = SOPHeader.InvoiceNumber
                If IsNothing(SOPHeader.DocDate) OrElse SOPHeader.DocDate = Date.MinValue Then
                    .DOCDATE = Today.Date
                Else
                    .DOCDATE = SOPHeader.DocDate
                End If
                If IsNothing(SOPHeader.DueDate) OrElse SOPHeader.DueDate = Date.MinValue Then
                    .DUEDATE = DateAdd(DateInterval.Day, 7, Today.Date)
                Else
                    .DUEDATE = SOPHeader.DueDate
                End If
                .CSTPONBR = SOPHeader.PONumber
                .BACHNUMB = SOPHeader.BatchNumber

                .REFRENCE = SOPHeader.Reference
                .COMMENT_1 = SOPHeader.CommentOnStatement_1
                .COMMENT_2 = SOPHeader.CommentOnStatement_2
                .COMMENT_3 = SOPHeader.CommentOnStatement_3
                .COMMENT_4 = SOPHeader.CommentOnStatement_4
                .SUBTOTAL = dSubTotal
                .DOCAMNT = dSubTotal
                .LOCNCODE = "BELM"
                .USRDEFND1 = SOPHeader.Reference
                .USER2ENT = SOPHeader.EnteredBy
                .CREATEDIST = 0
                If SOPHeader.ChkCredit Then
                    .CKCreditLimit = 1
                Else
                    .CKCreditLimit = 0
                End If
                If SOPHeader.ChkHold Then
                    .CKHOLD = 1
                Else
                    .CKHOLD = 0
                End If

                '1.16 Shipping Addresses
                .ShipToName = SOPHeader.AddressName
                .ADDRESS1 = SOPHeader.Address_Line1
                .ADDRESS2 = SOPHeader.Address_Line2
                .CITY = SOPHeader.City
            End With

            ' Only add a payment record if paying now.
            If Not IsNothing(SOPHeader.PaymentType) Then
                If SOPHeader.PaymentType > 0 Then
                    Dim MySOPPayment As New taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord
                    MySOPPayment.CUSTNMBR = MySOPHeader.CUSTNMBR
                    MySOPPayment.SOPTYPE = MySOPHeader.SOPTYPE
                    MySOPPayment.SOPNUMBE = MySOPHeader.SOPNUMBE
                    MySOPPayment.PYMTTYPE = SOPHeader.PaymentType
                    If SOPHeader.PaymentType = enumPaymentTypes.CreditCard Then
                        MySOPPayment.CARDNAME = SOPHeader.PaymentCreditCardType.Trim ' VISA, BANKCARD, MASTERCARD
                        MySOPPayment.RCTNCCRD = SOPHeader.PaymentCreditCardNo.Trim
                        MySOPPayment.EXPNDATE = SOPHeader.PaymentCreditCardExpiry
                        '[1.13 
                        MySOPPayment.DOCNUMBR = Today.Date.ToString
                        '1.13]
                        ' Note: SJA cheque book ID is not allowed to be supplied for CC transactions 
                        ' - assume this is due to a/c being supplied when setting up CC's in GP.
                    Else
                        MySOPPayment.CHEKBKID = "BW TRADING" ' This is St Johns bank account, not the customers.
                        If SOPHeader.PaymentType = enumPaymentTypes.Cheque Then
                            MySOPPayment.CHEKNMBR = SOPHeader.PaymentChequeNo.Trim
                        End If
                    End If
                    MySOPPayment.DOCNUMBR = "PYMT-" & MySOPHeader.SOPNUMBE
                    ' Add the payment record to the object.
                    ReDim CustomerType.taCreateSopPaymentInsertRecord_Items(0)
                    CustomerType.taCreateSopPaymentInsertRecord_Items(0) = MySOPPayment
                End If
            End If

            CustomerType.taSopHdrIvcInsert = MySOPHeader
            ReDim eConnect.SOPTransactionType(0)
            eConnect.SOPTransactionType(0) = CustomerType

            If bPostImmediately Then
                If PostEconnectDocument(eConnect, sError) Then
                    CreateSOPHeader = True
                End If
            Else
                CreateSOPHeader = True
            End If
        Catch ex As Exception
            sError = ex.Message & vbCrLf & ex.StackTrace
        End Try
    End Function

    ' Handy ref: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/eConnect8.0_MSDN/soptransactiongeneralinformation.asp
    Function CreateSOPLines(ByVal SOPHeader As SOPHeaderType, ByVal SOPLine() As SOPLineType, _
    ByRef sError As String) As Boolean
        Dim eConnect As New eConnectType
        Try
            CreateSOPLines = False

            'Dim CustomerType As New SOPTransactionType
            Dim MyTaxLine As New taSopLineIvcTaxInsert_ItemsTaSopLineIvcTaxInsert
            Dim indx As Int16
            Dim dOrderTotal As Decimal = 0
            Dim dTax As Decimal
            Dim dTotalTax As Decimal = 0
            Dim dtSOPCustomer As DataTable = Nothing
            Dim dtItemAccts As DataTable = Nothing
            Dim dtCustAccts As DataTable = Nothing
            Dim SalesAccount As String = Nothing
            Dim SalesRTNAccount As String = Nothing
            Dim RECVAccount As String = Nothing
            Dim iDistCount As Integer = 0
            Dim oDistribution As New taSopDistribution_ItemsTaSopDistribution

            ' The "CreateSopHeader" function will return the "eConnect" object
            ' populated with the header information. This function can then add
            ' the line detail information before posting to the econnect interface.
            If Not CreateSOPHeader(eConnect, SOPHeader, sError, dOrderTotal, False) Then
                Exit Try
            End If

            ' Prepare the econnect line item array for the number of lines being inserted.
            ReDim eConnect.SOPTransactionType(0).taSopLineIvcInsert_Items(SOPLine.Length - 1)

            '[130107 - manual posting distribution !
            ' check if SOP processing is using Item or Customer ... if using customer we must build the distribution manually from accounts in the items view
            dtSOPCustomer = Check_SOP("SOPType", "", sError)
            
            For indx = 0 To SOPLine.Length - 1

                Dim MyInvoiceLine As New taSopLineIvcInsert_ItemsTaSopLineIvcInsert

                With MyInvoiceLine
                    .CUSTNMBR = Trim(SOPHeader.AccountNumber)
                    .SOPNUMBE = SOPHeader.InvoiceNumber
                    .SOPTYPE = SOPLine(indx).TransactionType '1=Quote, 2=Order, 3=Invoice, 4=Return, 5=Backorder
                    ' No need to specify .DOCID as it is automatically determined from .SOPTYPE. AM 2/11/2005
                    If IsNothing(SOPHeader.DocIDString) Then
                        .DOCID = DocIDFromTypeArr(.SOPTYPE) ' Identifies source of record.
                    Else
                        .DOCID = SOPHeader.DocIDString      ' Identifies source of record.
                    End If
                    .DOCDATE = eConnect.SOPTransactionType(0).taSopHdrIvcInsert.DOCDATE
                    .ITEMNMBR = Trim(SOPLine(indx).ItemNumber) ' Product code - relates to income account.
                    .UNITPRCE = SOPLine(indx).UnitPrice
                    .UNITCOST = SOPLine(indx).UnitCost
                    .QUANTITY = SOPLine(indx).Quantity

                    ' Dont use .TAXSCHID here - it will cause heaps of GST/BAS report grief!!!!!
                    If UCase((SOPLine(indx).TaxCode)) = "G" Then
                        .ITMTSHID = "GSTEX-GST"
                        '[1.11
                        ' dTax = .UNITPRCE * .QUANTITY * 0.1
                        dTax = .UNITPRCE * .QUANTITY * 0.1
                        dTax = Decimal.Round(dTax, 3)   ' Go to 3 decs them check if 3rd dec is 5
                        If Decimal.Remainder(dTax * 100, 1) = 0.5 Then
                            'dTax = Decimal.Round(dTax, 2) + 0.01
                            dTax = Decimal.Round(Decimal.Parse(dTax + 0.005), 2)
                        Else
                            If Decimal.Remainder(dTax * 100, 1) = -0.5 Then
                                'dTax = Decimal.Round(dTax, 2) - 0.01
                                dTax = Decimal.Round(Decimal.Parse(dTax - 0.005), 2)
                            Else
                                dTax = Decimal.Round(dTax, 2)
                            End If
                        End If
                        '1.11]
                        dTotalTax = dTotalTax + Decimal.Round(dTax, 2)
                    Else
                        .ITMTSHID = "GSTEX-FRE"
                    End If
                    '.TAXAMNT = Dont specify, as tax code will calculate this for us if we set 'CREATETAXES=1' in header.
                    .XTNDPRCE = .UNITPRCE * .QUANTITY
                    .ITEMDESC = Trim(SOPLine(indx).Description)
                    If Trim(SOPLine(indx).CommentOnInvoice_1).Length > 0 Then
                        .COMMENT_1 = Trim(SOPLine(indx).CommentOnInvoice_1)
                    Else
                        If Trim(SOPHeader.CommentOnStatement_1).Length > 0 Then
                            .COMMENT_1 = Trim(SOPHeader.CommentOnStatement_1)
                        Else
                            .COMMENT_1 = Trim(SOPLine(indx).Description)
                        End If
                    End If
                    .COMMENT_2 = Trim(SOPLine(indx).CommentOnInvoice_2)
                    .COMMENT_3 = Trim(SOPLine(indx).CommentOnInvoice_3)
                    .COMMENT_4 = Trim(SOPLine(indx).CommentOnInvoice_4)
                    .ReqShipDate = Today.Date ' Required field
                    .FUFILDAT = Today.Date  ' Required field
                    .ACTLSHIP = Today.Date  ' Required field
                    .UOFM = "EACH"
                    .CURNCYID = "Z-AUD"
                    .PRCLEVEL = SOPLine(indx).PriceScale
                    ' Make location for item same as header.
                    .LOCNCODE = eConnect.SOPTransactionType(0).taSopHdrIvcInsert.LOCNCODE

                    ' Returns will not post unless returned qty = total quantity
                    If .SOPTYPE = 4 Then .QTYRTRND = .QUANTITY

                    'Set line item sequence in increments of 16384
                    .LNITMSEQ = 16384 * (indx + 1)
                    '.LOCNCODE = "BELM"
                    dOrderTotal = dOrderTotal + (.UNITPRCE * .QUANTITY)
                End With

                'Do Manual Posting
                ' Add the line item to the econnect object...
                eConnect.SOPTransactionType(0).taSopLineIvcInsert_Items(indx) = MyInvoiceLine

                If dtSOPCustomer.Rows(0)(0).ToString = "1" Then
                    dtItemAccts = Check_SOP("ItemAccts", Trim(SOPLine(indx).ItemNumber), sError)
                    If dtItemAccts.Rows.Count > 0 Then
                        SalesAccount = dtItemAccts.Rows(0).Item(0).ToString
                        SalesRTNAccount = dtItemAccts.Rows(0).Item(1).ToString
                    End If

                    dtCustAccts = Check_SOP("CustAcct", Trim(SOPHeader.AccountNumber), sError)
                    If dtCustAccts.Rows.Count > 0 Then
                        RECVAccount = dtCustAccts.Rows(0).Item(0).ToString
                    End If

                    ReDim eConnect.SOPTransactionType(0).taSopDistribution_Items(SOPLine.Length + 1)

                    Select Case CType(MyInvoiceLine.SOPTYPE, enumSOPTransactionTypes)
                        Case enumSOPTransactionTypes.Invoice
                            ' manually set up distributions for each of the accounts present
                            ' need to find out what dist type, if they include tax or not, are they credit or debit (need an accountant for that!)



                            With oDistribution
                                .SOPTYPE = MyInvoiceLine.SOPTYPE
                                .SOPNUMBE = MyInvoiceLine.SOPNUMBE
                                .CUSTNMBR = MyInvoiceLine.CUSTNMBR
                                .SEQNUMBR = iDistCount
                                .DISTTYPE = enumSOPDistributionTypes.Sales
                                .ACTNUMST = SalesAccount
                                .CRDTAMNT = MyInvoiceLine.XTNDPRCE + dTax
                                .DistRef = "Sales"
                            End With
                            'eConnect.SOPDistributionsType(0).taSopDistribution_Items(iDistCount) = oDistribution
                            eConnect.SOPTransactionType(0).taSopDistribution_Items(iDistCount) = oDistribution
                            iDistCount += 1
                            oDistribution = Nothing
                            'If RECVAccount.ToString.Length > 0 Then
                            '    oDistribution = New taSopDistribution_ItemsTaSopDistribution
                            '    With oDistribution
                            '        .SOPTYPE = MyInvoiceLine.SOPTYPE
                            '        .SOPNUMBE = MyInvoiceLine.SOPNUMBE
                            '        .CUSTNMBR = MyInvoiceLine.CUSTNMBR
                            '        .SEQNUMBR = iDistCount
                            '        .DISTTYPE = enumSOPDistributionTypes.Receiving
                            '        .ACTNUMST = RECVAccount
                            '        .DEBITAMT = MyInvoiceLine.XTNDPRCE + dTax
                            '        .DistRef = "Receiving"
                            '    End With
                            '    eConnect.SOPTransactionType(0).taSopDistribution_Items(iDistCount) = oDistribution
                            '    iDistCount += 1
                            '    oDistribution = Nothing
                            'End If
                            ' do I need 'Sales Returns Account Number' ?
                        Case 2
                        Case 3

                    End Select

                End If

                MyInvoiceLine = Nothing
            Next

            With eConnect.SOPTransactionType(0).taSopHdrIvcInsert
                .CREATETAXES = 1
                .DEFTAXSCHDS = 1 ' Ensures that
                .TAXSCHID = "GSTEX-DEBT"
                '.SUBTOTAL = dOrderTotal
                '.DOCAMNT = dOrderTotal ' Same as subtotal when auto-calcing taxes, otherwise must include tax amount.
                .DEFPRICING = 1 ' Will auto calc subtotal from sop line amounts.
                '1.14 - use value passed in by user
                '.CKCreditLimit = 1 ' Dont post if credit limit exceeded.
                '.CKHOLD = 1 ' Dont post if account on hold.
            End With

            With eConnect.SOPTransactionType(0)
                ' If there is a payment record, then we must state how much we are paying.
                ' We will always pay the entire amount.
                If Not IsNothing(.taCreateSopPaymentInsertRecord_Items) Then
                    If .taCreateSopPaymentInsertRecord_Items.Length > 0 Then
                        .taCreateSopPaymentInsertRecord_Items(0).DOCAMNT = Math.Round(dOrderTotal + dTotalTax, 2)
                        .taSopHdrIvcInsert.PYMTRCVD = .taCreateSopPaymentInsertRecord_Items(0).DOCAMNT
                    End If
                End If
            End With

            ' check if total is negative, change to opposite transaction type if negative
            If dOrderTotal < 0 Then
                Dim newType As GPClass.enumSOPTransactionTypes
                If eConnect.SOPTransactionType(0).taSopHdrIvcInsert.SOPTYPE = GPClass.enumSOPTransactionTypes.Rtn Then
                    newType = GPClass.enumSOPTransactionTypes.Invoice
                End If
                If eConnect.SOPTransactionType(0).taSopHdrIvcInsert.SOPTYPE = GPClass.enumSOPTransactionTypes.Invoice Then
                    newType = GPClass.enumSOPTransactionTypes.Rtn
                End If
                '[1.17
                eConnect.SOPTransactionType(0).taSopHdrIvcInsert.SOPTYPE = newType
                If newType = enumSOPTransactionTypes.Invoice And eConnect.SOPTransactionType(0).taSopHdrIvcInsert.DOCID = "STKRTN" Then
                    eConnect.SOPTransactionType(0).taSopHdrIvcInsert.DOCID = "STKINV"
                Else
                    If newType = enumSOPTransactionTypes.Rtn And eConnect.SOPTransactionType(0).taSopHdrIvcInsert.DOCID = "STKINV" Then
                        eConnect.SOPTransactionType(0).taSopHdrIvcInsert.DOCID = "STKRTN"
                    Else
                        '1.17]
                        eConnect.SOPTransactionType(0).taSopHdrIvcInsert.DOCID = DocIDFromTypeArr(newType)  ' Identifies source of record.
                        '[1.17
                    End If
                End If
                '1.17]
                For Each line As taSopLineIvcInsert_ItemsTaSopLineIvcInsert In eConnect.SOPTransactionType(0).taSopLineIvcInsert_Items
                    line.SOPTYPE = newType
                    If line.QUANTITY <= 0 Then
                        line.QUANTITY = line.QUANTITY * -1
                    End If
                    If line.UNITPRCE <= 0 Then
                        line.UNITPRCE = line.UNITPRCE * -1
                    End If
                    line.XTNDPRCE = line.XTNDPRCE * -1
                    If newType = enumSOPTransactionTypes.Invoice Then
                        line.QTYRTRND = Nothing
                    Else
                        line.QTYRTRND = line.QUANTITY
                    End If
                    line.DOCID = DocIDFromTypeArr(newType)  ' Identifies source of record.
                Next line
                If Not IsNothing(eConnect.SOPTransactionType(0).taCreateSopPaymentInsertRecord_Items) Then
                    eConnect.SOPTransactionType(0).taCreateSopPaymentInsertRecord_Items(0).DOCAMNT = eConnect.SOPTransactionType(0).taCreateSopPaymentInsertRecord_Items(0).DOCAMNT * -1
                    eConnect.SOPTransactionType(0).taSopHdrIvcInsert.PYMTRCVD = eConnect.SOPTransactionType(0).taSopHdrIvcInsert.PYMTRCVD * -1
                    eConnect.SOPTransactionType(0).taCreateSopPaymentInsertRecord_Items(0).SOPTYPE = newType
                End If
            End If
            If PostEconnectDocument(eConnect, sError) Then
                CreateSOPLines = True
            End If
        Catch ex As Exception
            sError = ex.Message & vbCrLf & ex.StackTrace
        End Try
        eConnect = Nothing
    End Function

 

 

Hello there,

I'm trying to find out the tables in GP in which are the link between the custnmbr which I think is the RM00103 table and how to tell which salesperson is associated to what customer.

 

Thanks,

Bobby

I am working with GP 10 and developer toolkit VB.Net

I want to make automatic posting, so I found this method “Dynamics.Forms.GlBatchEntry.Procedures.PostBatch.Invoke

I don’t know what to give for these parameters.

So please advise me.

Thank you

what tables can I find the Freight Amount relating back to the SOPNMBR?

HI ALL

my timesheet import routine seems to be working pretty good (importing infopath timesheet to GP via workflow).  However, i have a question regarding the sys00500 table.   it apparently holds batch info, but the info in this table doesn't reflect the last batch that is valid.  i am writing and re-writing the working tables for PA timesheets for each timesheet that goes through.  so, at the end of the week, when the payroll guy imports say 5 timesheets for batch "DIVER WK 1", the batch totals are off, and subsequently, the batch wont clear automatically ( i assume this is because the totals dont match).

during the import, on each itteration, i clear the working tables pa10000 and pa10001 for the employid i am currently processing, so i can re-construct the timesheet for the employee as a whole eConnect document.....but it doesn't clear the batch table.  so, the field numoftrx will have "75" when the real count for this batch is like "12" and the bchtotal field is 200k when it should be like 12k.

so is there a way to make this reflect the batch actually being submitted, rather than an aggregate of all the other batches sent and erased during processing?

I am building a report to track on each PO from customer, to track the last part received from the supplier for each PO from our customer. I need to know the tables involved that can tell the relationship between the customer PO and our PO to our suppliers. Thanks.

    Hi All

 

I'm using Scribe Insight 7.5 with the GPAdapter for AP and AR integration from a foreign system. For receivables there is an RM Apply object in GP Adapter, bit no PM Apply object exists for payables. This means I can't apply an invoice to a vendor credit.

Has anyone figure out how to do this? If not, it looks like I'll have to write my own SP. Looking at the data, it looks like I need to create an entry in PM10200 for the invoice it applies to and then update CURTRXAM in PM20000. Does this sound correct?

Regards

 

Mark

This article contains a code example on how to use the Telerik Multicolumn Dropdown control    

Many of the articles here on DD are of the 'non-ground-breaking' variety, and... this one is no different.

Often, when coding the Winform RadGridView I need to set default values in the new row. This is a short code example on how to handle that.

You may ask why I would blog something so simple... the answer is that when coding I keep the DD Telerik menu open, and all these code examples add up to faster coding.

 

This article will be our repository for common coding techniques for the Telerik RadSpinEditor control

 

If you need to place code behind a WinForms RadGridView that does something when the grid row changes, the CurrentRowChanged event is the place to do it. This article is a short code example of how to code that event

I just spent way too long trying to find this piece of code.

When you're in a Telerik Grid and you need to cancel the new row, you need the line of code below. It's not really intuative, so I'm going to write it down <smiles>

                       

Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3