Decimal Places passed in on XTNDPRCE does not match setup

Error Number = 4647 Stored Procedure= taSopLineIvcInsert Error Description = Decimal Places passed in on XTNDPRCE does not match setup
Node Identifier Parameters: taSopLineIvcInsert
SOPNUMBE = 684426
SOPTYPE = 3
Related Error Code Parameters for Node : taSopLineIvcInsert
XTNDPRCE = 4.70

Resolution:

We had moved a GP company to another dynamics system db and ran check links.  Check links did not find the currency ID and auto created the currency id with 0 decimal. Comparing MC40000 and dynamics..MC40200 was the key for resolution.  Updated the decimal places for currency – the error econnect was able to process the transaction successfully.

Cheers

Sanjay

 

 

 

 

e Connect – SOP invoice – example

Imports System
Imports System.Xml
Imports System.Xml.Serialization
Imports System.IO
Imports System.Text
Imports Microsoft.VisualBasic
Imports Microsoft.Dynamics.GP.eConnect
Imports Microsoft.Dynamics.GP.eConnect.Serialization
Public Class SOPinvoice
    Public Sub eConnectSend()
        'Serialized XML File         
        Dim xmldocument As String
        'Connection String         
        Dim sConnectionString As String
        'Result         
        Dim xmlobject As String
        sConnectionString = "data source=[SQLSERVER];initial catalog=TWO;integrated security=SSPI; persist security info=False;packet size=4096"
        Dim NextNumberObject As New GetNextDocNumbers
        Dim SOPnumber As String = NextNumberObject.GetNextSOPNumber(IncrementDecrement.Increment, "STDINV", SopType.SOPInvoice, sConnectionString)

        Using eConCall As New eConnectMethods
            Try
                SerializeObject("c:\TEST\xmlfile1.xml ", SOPnumber, sConnectionString)
                Dim xmldoc As New Xml.XmlDocument
                xmldoc.Load("c:\TEST\xmlfile1.xml")
                xmldocument = xmldoc.OuterXml
                xmlobject = eConCall.CreateTransactionEntity(sConnectionString, xmldocument)
            Catch exp As eConnectException
                MsgBox(exp.ToString)
            Catch ex As System.Exception
                MsgBox(ex.ToString)
            Finally
                eConCall.Dispose()
                MsgBox("Success," + SOPnumber + " Created")
            End Try
        End Using
    End Sub
    Public Shared Sub SerializeObject(ByVal filename As String, SOPnumber As String, sConnectionString As String)
        Try
            Dim econnect As New eConnectType
            Dim SOPINV As New SOPTransactionType
            'header record
            Dim SOPINVHEAD As New taSopHdrIvcInsert
            With SOPINVHEAD
                .SOPTYPE = 3
                .DOCID = "STDINV"
                .SOPNUMBE = SOPnumber
                .DOCDATE = "04/12/2017"
                .CUSTNMBR = "AARONFIT0001"
                .BACHNUMB = "TEST"

            End With
            SOPINV.taSopHdrIvcInsert = SOPINVHEAD

            'line record
            Dim SOPLINE(0) As taSopLineIvcInsert_ItemsTaSopLineIvcInsert
            Dim SOPLINE1 As New taSopLineIvcInsert_ItemsTaSopLineIvcInsert
            With SOPLINE1
                .SOPTYPE = 3
                .DOCID = "STDINV"
                .SOPNUMBE = SOPnumber
                .CUSTNMBR = "AARONFIT0001"
                .ITEMNMBR = "100XLG"
                .QUANTITY = 1
                .DOCDATE = "04/12/2017"
                '.Print_Phone_NumberGB = 0
                '.PRINT_PHONE_NUMBERGBSPECIFIED = False

            End With
            SOPLINE(0) = SOPLINE1
            SOPINV.taSopLineIvcInsert_Items = SOPLINE

            ReDim Preserve econnect.SOPTransactionType(0)
            econnect.SOPTransactionType(0) = SOPINV

            Dim fs As New FileStream(filename, FileMode.Create)
            Dim writer As New XmlTextWriter(fs, New UTF8Encoding)
            Dim serializer As New XmlSerializer(GetType(eConnectType))
            serializer.Serialize(writer, econnect)
            writer.Close()
        Catch ex As ApplicationException
            MsgBox(ex.ToString)
        End Try
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        eConnectSend()
    End Sub

End Class

Adapted from Microsoft Dynamics GP eConnect Samples installed during eConnect installation.

Line breaks are issued to fit script within screen. Remove line breaks.

THIS CODE AND INFORMATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE

Cheers!
Sanjay