Sign Up Now! Log In



Before I launch into this cool trick, let me remind you that we're a community. Few people do what we do. Let's help each other. If you find a cool trick like this one, or a nice piece of code please click on the 'Write an Article' link above and share.

Besides, it's pretty cool to be at Convergence and have someone pump your hand and tell you how much you've helped them.

<end of diatribe><smiles/>

This is sooo cool! I've cut and pasted code into a text editor for years to use 'Block Selection'. Like this:

See how that area in the middle is selected?! You can now copy, or delete, or whatever.

I'm getting this error when trying to run an update with Dynamics GP Web Services 2015:

An unhandled exception of type 'System.ServiceModel.CommunicationException' occurred in mscorlib.dll

Additional Information: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.

This is a complete working example for how to update SOP Tracking numbers using Web Services

I so love my job. Every day is something new.

Today I'm trying to display an image in a grid, and the control requires that the image be stored in SQL. It's a pain to write a .NET app do to that, so I researched to see if it's possible to do from SQL.

Below is a short piece of code that creates a SQL table and inserts an image from disk into it.

So, you've modified a form and added a button (not covered here)

Then, you've run Dag.exe against your GP installation

Then, you copied Application.MicrosoftDynamicsGP.ModifiedForms to your bin folder and set a reference to it

Now, we'll show you the code that will allow you to handle a custom button click. The code here is specific to one custom button added to one GP form, you'll have to edit those things for your form.

This is code that will execute the PM seePMAgedTB native stored procedure. It will be useful in creating custom PM Aged Trial Balance report
SQL Code to execute the seepmHATBWrapper native stored procedure, this proc powers the PM Historical Aged Trial Balance report

So, you're trying to do a VBA customization in Dynamics GP, and you can't add any of the buttons to VBA. You used to be able to... but it's not working now with the new menu.

We're here to help.

We received a request in to make the Payment Terms field in the Vendor Options form a required field. We'll show the way that it's supposed to work (and it didn't), then we'll show a work-around using VBA.


My AP department came across this error today.  Errors have been found in this check batch.  Please correct the errors before printing.

Here is how I solved it.

We got in a support case here at 4Penny yesterday that was blog-worthy, so I thought I'd write it up.

It happens that your clients have characters in their data that eConnect won't accept. The errors that you get are various, but they point to data that's legal in Dynamics but not in XML.


This sounds like such a simple task, but I defy you to figure it out on your own.

In Dynamics forms, there is the concept that a text field can be linked to it's label, or 'prompt'. There is also the concept that the linked label will then respond in tandem to it's 'linkor', Linking can affect a label's Visible, Editable, and Required properties (read Mariano for more: http://dynamicsgpblogster.blogspot.com/2009/02/importance-of-linking-your-fields-to.html).

At any rate, our job at DynDeveloper is to provide RAD guidance: guidance to get you quickly coding. True to form, here is a short tutorial on how to link text boxes and labels in Modifier



I have multi-bin enabled and am trying to transfer serial item from one bin/location to another bin/location.  I am getting the error "Error Number = 5234 Stored Procedure= taIVTransferMultiBinInsert Error Description = The quantity passed in for Multi Bin is > what was passed to the line
Node Identifier Parameters: taIVTransferMultiBinInsert"

Am I taking the correct approach in formatting this?  Any help is appreciated.  Thank you

Here is my XML:

<?xml version="1.0" encoding="utf-8"?>
        <eConnectProcessInfo xsi:nil="true" />
        <taRequesterTrxDisabler_Items xsi:nil="true" />
        <taUpdateCreateItemRcd xsi:nil="true" />
                <SERLNMBR>AABB9               </SERLNMBR>
                <TOBIN>100            </TOBIN>
                <SERLNMBR>AABB10              </SERLNMBR>
                <TOBIN>100            </TOBIN>
        <taIVTransferLotInsert_Items xsi:nil="true" />
        <taAnalyticsDistribution_Items xsi:nil="true" />
                <TOBIN>100            </TOBIN>
                <SERLTNUM>AABB9               </SERLTNUM>
                <TOBIN>100            </TOBIN>
                <SERLTNUM>AABB10              </SERLTNUM>
            <BACHNUMB>ALERT 21015</BACHNUMB>

Hi we are getting an error trying to update a sales order with the tracking number. Any help would be appricated




the inner exception is this

Object reference not set to an instance of an object.
at Microsoft.Dynamics.GP.BusinessLogic.FilterUpdateList[T](List`1 newList, List`1 originalList)

   at Microsoft.Dynamics.GP.SalesDocumentDefaultStrategyImplementation.FilterTrackingNumbers()

   at Microsoft.Dynamics.GP.SalesDocumentDefaultStrategyImplementation.DefaultingForUpdate(Object sender, BusinessObjectUpdateEventArgs e)

   at Microsoft.Dynamics.GP.SalesDocumentDefaultStrategy.DefaultingForUpdate(Object sender, BusinessObjectUpdateEventArgs e)

the exception detail is

Exception has been thrown by the target of an invocation.

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

   at System.Delegate.DynamicInvokeImpl(Object[] args)

   at Microsoft.Dynamics.Common.EventManager.RaiseEvent(Object source, String targetName, String eventName, EventArgs args)

   at Microsoft.Dynamics.Common.BusinessEventManager.RaiseEvent(Object source, String eventName, BusinessObjectEventArgs args)

   at Microsoft.Dynamics.Common.BusinessService.Update(BusinessObject businessObject, Context context, Policy policy)



The code is this

Imports WS_CompanyName.CompanyName
Imports System.ServiceModel
Module SendTracking

    Public Sub SendTracking()
        Dim SalesOrderNumber As String = "235119"
        Dim TrackNums() As String = {"664496187640"}
        Dim companyKey As CompanyKey
        Dim context As Context

        Dim UpdSalesOrderPolicy As Policy
        Dim wsDynamicsGP As New DynamicsGPClient
        Dim myCred As System.Net.NetworkCredential = New System.Net.NetworkCredential(Credentials go here removed by author)
         wsDynamicsGP.ClientCredentials.Windows.ClientCredential = myCred

        ' Create a context with which to call the service
        context = New Context()
        ' Specify which company to use (sample company)
        companyKey = New CompanyKey()
        companyKey.Id = (3)
        ' Set up the context object
        context.OrganizationKey = CType(companyKey, OrganizationKey)
        UpdSalesOrderPolicy = wsDynamicsGP.GetPolicyByOperation("UpdateSalesOrder", context)
        Dim SlsTrackNums(1) As SalesTrackingNumber
        Dim Indx As Integer = 0
        For Each strTrack As String In TrackNums
            SlsTrackNums(Indx) = New SalesTrackingNumber()
            SlsTrackNums(Indx).DeleteOnUpdate = True
            SlsTrackNums(Indx).Key = New SalesTrackingNumberKey()
            SlsTrackNums(Indx).Key.Id = strTrack
            SlsTrackNums(Indx).Key.SalesDocumentKey = New SalesDocumentKey()
            SlsTrackNums(Indx).Key.SalesDocumentKey.Id = SalesOrderNumber

        Dim SO As New SalesOrder()
        SO.BatchKey = New BatchKey
        SO.BatchKey.CompanyKey = companyKey
        SO.BatchKey.Id = "20160406"
        SO.TrackingNumbers = SlsTrackNums
        SO.Key = New SalesDocumentKey()
        SO.Key.Id = SalesOrderNumber
        Dim InvDate As Date = DateTime.Now
        SO.ActualShipDate = InvDate.ToShortDateString()
        SO.InvoiceDate = InvDate.ToShortDateString()
        SO.LineTotalAmount = MakeMoneyAmtObj("29.00")
        SO.FreightAmount = MakeMoneyAmtObj("4.50")
        SO.ShippingProcessStatus = ShippingProcessStatus.Shipped
        SO.TotalAmount = MakeMoneyAmtObj("33.50")
        Dim PO As SalesDocument

        wsDynamicsGP.UpdateSalesOrder(SO, context, UpdSalesOrderPolicy) ERROR OCCURS HERE WHILE STEPPING THROUGH THE CODE
    End Sub
    Private Function MakeMoneyAmtObj(ByVal DollarAmount As String) As WS_CompanyName.CompanyName.MoneyAmount
        Dim dblAmount As Double = 0
        If Double.TryParse(DollarAmount, dblAmount) = False Then
            Console.WriteLine("Error converting " & DollarAmount & " to a double, GP2013_Invoices.MakeMoneyObj")
        End If
        Dim SubTtl As New WS_CompanyName.CompanyName.MoneyAmount
        SubTtl.Currency = "USD"
        SubTtl.DecimalDigits = "2"
        SubTtl.Value = dblAmount
        Return SubTtl
    End Function
End Module


We have a user who needs to be able to put a customer on Hold by checking the Hold box on the customer card.

Currently, only Powerusers have this ability and we do not want to make the user a Poweruser.   What security areas does this user need to have in order to be able to do this function?  She is an accounting manager, AR clerk, customer service rep, and an order processor right now.

When she clicks the Hold button, she gets an error:  

Unhandled database exception:

A save operation on table 'RM_Customer_MSTR' failed accessing SQL data.



Thank you.

K. Koehle

Hello all,

 I have data on invoices and payments in another system that I need to create the applies to. Documents already exists in GP and are posted. Using VS for GP, I am able to fill VendorID and Docnumber of payment. This fills scroll window. I need to loop through each line of scroll window get the Docnumber see if it's one that I have to apply an amount, if so then fill the Apply amount cell, go on to next line.

I am having trouble getting the doc number of line and looping through. any ideas how to get doc number? What field name is it? I tried using VS classes and running Dynamics Continuum.

 Thank you in advance.

Here is some code I have. It's a bit of a mess cause I'm just doing trial and error at this point my apologies.


01.    string errMsg;
02.    short err=0;
03.    string doc;
05.    const string scrollWinName = "PM_Applied_Document_Scroll";
06.    const string FormName = "PM_Apply_To_Maintenance";
08.    Dynamics.Application compilerApp = (Dynamics.Application)Activator.CreateInstance(Type.GetTypeFromProgID("Dynamics.Application"));
10.    Microsoft.Dexterity.Applications.Dynamics.Forms.PmApplyToMaintenance.PmApplyDocument.VendorId.Value = "STYLI002";
11.    Microsoft.Dexterity.Applications.Dynamics.Forms.PmApplyToMaintenance.PmApplyDocument.VendorId.RunValidate();
13.    Microsoft.Dexterity.Applications.Dynamics.Forms.PmApplyToMaintenance.PmApplyDocument.DocumentNumber.Value = "W00074165";
15.    Microsoft.Dexterity.Applications.Dynamics.Forms.PmApplyToMaintenance.PmApplyDocument.DocumentNumber.RunValidate();
16.   // Microsoft.Dexterity.Applications.Dynamics.Forms.PmApplyToMaintenance.PmApplyDocument.PmAppliedDocumentScroll.LocalAppliedAmount
17.    err = compilerApp.ExecuteSanscript(string.Format("focus field '(L) Applied Amount' of window '{0}' of form '{1}';", scrollWinName, FormName), out errMsg);
18.    var lineDocNumber = Microsoft.Dexterity.Applications.Dynamics.Forms.PmApplyToMaintenance.PmApplyDocument.PmAppliedDocumentScroll.DocumentNumber.Value;
20.    //err = compilerApp.MoveToField(string.Format("'(L) Applied Amount' of window '{0}' of form '{1}';", scrollWinName, FormName));
21.    Microsoft.Dexterity.Applications.Dynamics.Forms.PmApplyToMaintenance.PmApplyDocument.PmAppliedDocumentScroll.LocalAppliedAmount.Value = 50;
22.    Microsoft.Dexterity.Applications.Dynamics.Forms.PmApplyToMaintenance.PmApplyDocument.PmAppliedDocumentScroll.LocalAppliedAmount.RunValidate();
24.    err = compilerApp.ExecuteSanscript("Window_ScrollScrollingWindow(window 'PM_Applied_Document_Scroll' of form 'PM_Apply_To_Maintenance', SCROLLTYPE_NEXT);", out errMsg);
26.    if (err != 0)
27.        MessageBox.Show(string.Format("{0}  {1}", err, errMsg));
29.    //Microsoft.Dexterity.Applications.Dynamics.Forms.PmApplyToMaintenance.PmApplyDocument.PmAppliedDocumentScroll.DocumentNumber.Focus();
30.    //doc = Microsoft.Dexterity.Applications.Dynamics.Forms.PmApplyToMaintenance.PmApplyDocument.PmAppliedDocumentScroll.DocumentNumber.Value;
31.    //Microsoft.Dexterity.Applications.Dynamics.Forms.PmApplyToMaintenance.PmApplyDocument.PmAppliedDocumentScroll.ActualApplyToAmount.Value = 100;
33.    //err = compilerApp.ExecuteSanscript(string.Format("focus field 'Document Number' of window '{0}' of form '{1}';", scrollWinName, FormName), out errMsg);
34.    //err = compilerApp.MoveToField(string.Format("'Document Number' of window '{0}' of form '{1}';", scrollWinName, FormName));
35.    //doc = compilerApp.GetDataValue(string.Format("'Document Number' of window '{0}' of form '{1}'", scrollWinName, FormName));
36.    //err = compilerApp.ExecuteSanscript(string.Format("run script 'Document Number' of window '{0}' of form '{1}';", scrollWinName, FormName), out errMsg);
40.    //err = compilerApp.ExecuteSanscript(string.Format("focus field 'Actual Apply To Amount' of window '{0}' of form '{1}';", scrollWinName, FormName), out errMsg);
41.    //err = compilerApp.SetDataValue(string.Format("'Actual Apply To Amount' of window '{0}' of form '{1}'", scrollWinName, FormName), "100.00");
42.    //err = compilerApp.ExecuteSanscript("Window_ScrollScrollingWindow(window 'PM_Applied_Document_Scroll' of form 'PM_Apply_To_Maintenance', SCROLLTYPE_NEXT);", out errMsg);
44.    //if (err != 0)
45.    //    MessageBox.Show(errMsg);





Necesito imprimir una listado de todos los Smarlist Creados por nosotros, no no los originarios de gp.

Es esto Posible?

I need to print a list of all Smarlist Created by us, not those from gp. Is that possible?



Disculpa mi falta de conocimiento actual, debo llenar los siguientes puntos, los cuales debo extraer de las tablas de GP10.0 pero no encuentro como:

  1. Listado de las Pantallas modificadas
  2. Listado de los reportes modificado
  3.  Archivos en HTML de los reportes de Permisos, Roles, Usuarios, Seguridad en Formularios, etc

tendrias alguna forma de ayudarme a encontrar esta información y el punto 3, como paso eso a HTML..




Forgive my lack of current knowledge , I must meet the following points, which should draw from the tables but can not find GP10.0 as : 
1. List of modified Screens 
2. List of modified reports 
3. Files in HTML reports Permissions, Roles, Users, Security Forms , etc.

You would have some way to help me find this information and point 3 , as a step that to HTML ..


Can GP handle A/R rebate accruals through regular or extended prixing set up,, either iin G/L or a module level table?

someone can tell me why I'm getting this error PLEASE?

Error Number = 85  Stored Procedure= taSopHdrIvcInsert  Error Description = Freight tax detail amount does not match the header freight tax
Node Identifier Parameters: taSopHdrIvcInsert
SOPNUMBE = 2181879
Related Error Code Parameters for Node : taSopHdrIvcInsert

this is my XML

<?xml version="1.0" encoding="utf-16" ?>
                <ITEMDESC>XPound Density Memory Foam Mattress Topper with 18 Inch Fitted Cotton Cover</ITEMDESC>
                <ShipToName>XXX and Associates</ShipToName>
                <CNTCPRSN>XXX and Associates</CNTCPRSN>
                <ADDRESS1>123000 OCEANGATE STE 1254003</ADDRESS1>
                <CITY>LONG BEACH</CITY>
            <ShipToName>XXX and Associates</ShipToName>
            <ADDRESS1>154100 OCEANGATE STE 12056044</ADDRESS1>
            <CNTCPRSN>XXX and Associates</CNTCPRSN>
            <CITY>LONG BEACH</CITY>
            <PYMTRMID>Net 30</PYMTRMID>

You can make a text field is multiline in a grid, so that expands downward when the amount of text beyond the right edge?

This is GP 10.0
We have a billing program and generate an XML which is then charged to gp through eConnect. The problem arises when an article invoiced amounts not in the warehouse of gp, which causes the xml be rejected.
When invoice in GP directly and there is no article proceeds creating a fictitious batch and adding the unit or units required for the bill to generarlse.
Question: Is there way to do this demodo it is recorded in the xml and let pass all the bills without exección?

I'm trying to create a PO using eConnect.  I need to populate POP10110.JOBNUMBR but taPoLine_ItemsTaPoLine doesn't seem to offer a corresponding property.  Am I missing anything?

 I'm using GP2015 and I've tried eConnect 12 & 14.

Thank you, James

I am attempting to create a HATB ( Accounts Payable Historical Aged Trial Balance)

With the following columns:


Vendor Number

Vendor Name

Invoice Date

Payment Terms

Payment Type (Check, ACH, etc)

Amount Due

A column for the different aging buckets (Current Period, 31-60 days, 61-90 days, 91 and Over)

I have SQL and Anyview at my disposal, would anyone mind helping me out with this, at least with the proper tables.


Thank you




 The documentation for the taBankTransactionHeader node says "This node uses document exchange for updates. All existing values are overwritten with the value specified by the update document. If a field in the update is blank, the existing value is changed to be blank."  (https://msdn.microsoft.com/en-us/library/jj193288.aspx) However, I am having difficulty getting updates to work.

Basically, if I create a BRBankTransactionType and send it to econnect via the CreateTransactionEntity() method, it creates an entry in the CM20200 table as expected, with the proper checkbook ID and check number.   It creates the one required distribution, and I am creating the matching distribution for the proper account.  From the documentation, I expected that using the UpdateTransactionEntity() method would allow me to update the transaction, assuming that the checkbook ID and check number matched an existing record.  The actual behavior is that using UpdateTransactionEntity() creates a second record in CM20200, so that I now have duplicate records with the same checkbook ID and check number, exactly the same as if I had used CreateTransactionEntity().  Using DeleteTransactionEntity() gives the same result.

 What am I doing wrong, here?  I could use BRBankTransactionVoidType to void the check and then re-enter it, however a) I'm not sure how that will work with Positive Pay (i.e. will the void and the re-entry be sent in the same batch?), and b) there will be a problem if duplicate checkbookID-checknumber records already exist - the void will fail, requiring a control number, and I'm not sure how it should be handled.  I would prefer to just update the existing record.

Error: The Pay Type is Overtime or Doubletime and the Pay Factor multiplied by the Based On Rate does not agree with the Pay Rate Amount (PAYRTAMT)

 Background:  Prior to this point, I had updated paycode "HOUR 1" from a payrate of 13.00 to 13.50 .  Paycode "OVT" is based on "HOUR 1", with a multiplier (pay factor) of 1.5 .  

 I also updated another paycode "EDU1", which is based on "HOUR 1", but has no multiplier (0.00), and was successful in updating that from 13.00 to 13.50

After updating "HOUR 1" successfully, I did note that the "OVT" paycode record continued to show 13.00 as the based on rate value.  It was then that I hit the 9498 error.


Error: PO Status for Header and Line items do not match

In the project accounting distribution tables there is a column DISTTYPE.  I am trying to confirm that type 3 is project loss in the closing PA33502 and revenue recognition distribution table PA33305.

Hello all,

Having trouble retrieving the vendor item key using GP web services.  The system throws out a system exception 'There is an error in XML document(1, 980).' This happens in line 2 in the code excerpt below:

ItemVendorKey itemVendorKey = new ItemVendorKey() {ItemKey = new ItemKey() { Id = item }, VendorKey = new VendorKey() { Id = vend }};
ItemVendor itemVendor = wsDynamicsGP.GetItemVendorByKey(itemVendorKey, context);
itemVendor.VendorItemNumber = vitem;

Stack Trace:

   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
   at Microsoft.Dynamics.GP.EConnectAdapter.GetByKey(IKey key, Context context, Type type)
   at Microsoft.Dynamics.GP.GreatPlainsBusinessService.GetByKeyFromSource(Key key, Context context, Type type)
   at Microsoft.Dynamics.Common.BusinessService.GetByKey(Key key, Context context, Type[] types)

Request XML:

<?xml version="1.0"?>
  <ItemVendorKey xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Context xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/dynamics/2006/01">
    <OrganizationKey xsi:type="CompanyKey">
    <CultureName />
      <Id xmlns="http://schemas.microsoft.com/dynamics/security/2006/01">e18b321a-9548-48fb-b75a-dee0a618ddaa</Id>
    <TenantName />

Thank you in advance!