开发者

Create a purchase order in Dynamics GP

My main question is what fields are required for creating a PO using the web services. I keep getting an exception, so I feel like im leaving some info out. Any ideas? Here is my code:

Public Sub CreatePurchaseOrder(ByVal shipToAddress As BusinessAddress,
                               ByVal billToAddressKey As AddressKey,
      开发者_高级运维                         ByVal purchaseOrderLines As PurchaseOrderLine(),
                               ByVal venKey As VendorKey,
                               ByVal venName As String,
                               ByVal poDate As Date,
                               ByVal custKey As CustomerKey)
    Dim po As PurchaseOrder = New PurchaseOrder
    po.BillToAddressKey = billToAddressKey
    po.Lines = purchaseOrderLines
    po.ShipToAddress = shipToAddress
    po.VendorKey = venKey
    po.VendorName = venName
    po.Date = poDate
    po.CustomerKey = custKey
    po.Type = PurchaseOrderType.Standard



    Dim cxt As Context = getContext()
    Dim poPol = wsDynamicsGP.GetPolicyByOperation("CreatePurchaseOrder", cxt)
    wsDynamicsGP.CreatePurchaseOrder(po, cxt, poPol)
End Sub


To actually create it, all you need is a vendor key with an Id and an Purchase Key with an Id

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜